Addition to source code
-
In gapp_get_post_pageviews() function change $permalink from
$permalink = '/' . (($ID != 1) ? basename(get_permalink($ID)) : null);
to
$permalink = '/' . (($ID != 1) ? basename(get_permalink($ID)) . '/' : null);
and from
$permalink = '/' . basename(get_permalink());
to
$permalink = '/' . basename(get_permalink()) . '/';
When plugin makes call to google analytics api he uses ‘ga:pagePath’ filter. So if we have 2 articles where permalink of 1st is ‘website.com/permalink-part’ and 2nd is ‘website.com/permalink-part-two’, and we will ask google analytics about statistics on 1st article – we will get summary statistics of 1st and 2nd, because permalink of 2nd match to regular expression that takes information from google analytics on 1st.
- The topic ‘Addition to source code’ is closed to new replies.