Hi @eddievet,
My general recommendation is to make sure that nothing is affecting WPP’s and/or GA’s ability to track visits:
- WPP’s JS code and GA’s JS code are working under the exact same conditions (eg. both WPP and GA are set to track all page views, WPP and GA’s scripts are inserted into all of your posts & pages, etc).
- Make sure that there are no JavaScript errors from other scripts that may be hindering WPP’s and/or GA’s ability to work.
- If you’re using a caching plugin (and from your comments it seems you are) make sure that you have followed all of the recommendations made on this FAQ so WPP can do its thing: Is WordPress Popular Posts compatible with caching plugins?
- If you have a security / firewall plugin installed on your website make sure that it allows WPP to communicate with the REST API, see Is WordPress Popular Posts compatible with firewall / security plugins?
- etc. etc. etc.
Even the smallest thing can make a difference so -again- make absolutely sure that both tools are working under the exact same conditions to get more accurate statistics – and even then you’re still not guaranteed to get the exact same results: Popular Posts’ views count different than Jetpack’s? (long read but applies to this situation as well).
Hope that helps.
Oh, and from your previous posts here on ww.wp.xz.cn it seems that you’re using the AMP plugin on your website. If that’s still the case then I must let you must know that WordPress Popular Posts is not AMP compatible and so any page views you get from the AMP version of your posts & pages are most likely not being tracked by WPP at all. That’s one thing that would certainly make a difference between what WPP reports and GA’s statistics.
-
This reply was modified 4 years, 8 months ago by
Hector Cabrera. Reason: Rephrased for clarity
Thread Starter
EddieG
(@eddievet)
Hi Hector
Yes, i use AMP. Thank you for clearing out the issue for me. Now it all makes sense.
Thank you!
-
This reply was modified 4 years, 8 months ago by
EddieG.
-
This reply was modified 4 years, 8 months ago by
EddieG.
-
This reply was modified 4 years, 8 months ago by
EddieG.
One thing I forgot to mention: since you’re using a caching plugin don’t use the views count indicator on the front-end to compare pageviews tracked by WPP vs what GA reports. Remember that your caching plugin is caching everything on the page, including the pageviews counter (unless your theme is loading the pageviews counter via AJAX?)
Use the Statistics shown on Settings > WordPress Popular Posts instead to get non-cached views data so you can make a more accurate comparison.
-
This reply was modified 4 years, 8 months ago by
Hector Cabrera. Reason: Fixed typo
Thread Starter
EddieG
(@eddievet)
Hi Hector
It is more for the user than for me. I get the data i need from GA
Can you make this plugin AMP compatible?
I can probably make the plugin at least partially compatible with AMP.
Getting WPP to track pageviews when using AMP is likely doable -would need to check AMP’s developer documentation first, not really familiar with it yet- but I’m not so sure about the WPP widget / block. These have some features that rely on JS to work and AMP’s JavaScript support is very, very limited (AFAIK at least).
Thread Starter
EddieG
(@eddievet)
Hi Hector
I am interested to know your development on AMP. Please keep me updated on the matter.
Best of luck on the development!