No statistics shown when using CMP Plugin
-
Hi there,
Great plugin thank you. We will definitely be moving to the pro version as soon as I get this issue resolved.
I have the CMP plugin active which shows a landing page with text coming soon etc.
However, I still want to track who has visited the site while the coming soon mode is active. At the moment that does not seem to be the case.
Is there any way around this?
Thank you.
-
Hi @xiexiema,
Thank you for your message and your interest in the Pro version.
To assist you properly, could you please confirm the exact name of the “Coming Soon” plugin you’re using?
In most cases, the issue can be resolved by manually enqueuing our tracking script using a suitable hook from that plugin.
Looking forward to your update.
Best regards,
MehmetHi there and thank you for your quick reply.
The plugin is: CMP https://niteothemes.com/cmp-wp-plugin/
I don’t think there are any settings within the plugin to adjust this although there are some SEO options which may affect it.
Look fwd to hearing back from you.
Thank you
Hello @xiexiema,
To set this up, please follow these steps:
- Go to CMP Settings > CMP Advance Setup > Custom External Scripts > Footer Scripts.
- Copy and paste this link there:
https://yourwebsiteurl.com/wp-content/plugins/wp-statistics/assets/js/tracker.js - Replace yourwebsiteurl.com with your actual website address.
- Save the settings.
Next:
- While logged in as admin, open your website and right-click on the page, then select View Page Source.
- Press Ctrl + F and search for the phrase:
wp-statistics-tracker-js-extra. - Copy the content including the two
<script>tags around it. It should look something like this:
<script id="wp-statistics-tracker-js-extra">
var WP_Statistics_Tracker_Object = {"requestUrl":"http:\/\/localhost\/wp-statistics\/wp-json\/wp-statistics\/v2","ajaxUrl":"http:\/\/localhost\/wp-statistics\/wp-admin\/admin-ajax.php","hitParams":{"wp_statistics_hit":1,"source_type":"home","source_id":0,"search_query":"","signature":"f5f879c107e57b34433e14c1cc94c05a","endpoint":"hit"},"onlineParams":{"wp_statistics_hit":1,"source_type":"home","source_id":0,"search_query":"","signature":"f5f879c107e57b34433e14c1cc94c05a","endpoint":"online"},"option":{"userOnline":true,"dntEnabled":false,"bypassAdBlockers":false,"consentIntegration":{"name":null,"status":[]},"isPreview":false,"trackAnonymously":false,"isWpConsentApiActive":false,"consentLevel":"disabled"},"jsCheckTime":"60000","isLegacyEventLoaded":"","customEventAjaxUrl":"http:\/\/localhost\/wp-statistics\/wp-admin\/admin-ajax.php?action=wp_statistics_custom_event&nonce=5c1620695d"};
</script>Then:
- Go to CMP Settings > SEO & Analytics > Website Analytics,
- Choose the Other option,
- Paste the copied script there and save the settings.
Also, please make sure that from the path:
Statistics > Settings > General > Bypass Ad Blockers
this option is disabled.This way, the analytics will correctly track this pageβs statistics.
If you need any further help, just let me know!
Best regards,
Mehmet,Hi there,
Thank you very much I have just 2 small questions.https://www.yourwebsiteurl.com/wp-content/plugins/wp-statistics/assets/js/tracker.js
First step: should I use “www” as my site is www by preference.
The script copied from page view was very different from your example, (I have changed the URL and put “xxx” in the place of signature etc. Just for privacy, I also removed the line that mentions contact-form-7 (there is a contact form on the coming soon page):</script>
(I REMOVED THIS LINE) <script type="text/javascript" src="https://www.MYWEBSITE.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=6.1.1" id="contact-form-7-js"></script>
<script type="text/javascript" id="wp-statistics-tracker-js-extra">
/* <![CDATA[ */
var WP_Statistics_Tracker_Object = {"requestUrl":"https:\/\/www.MYWEBSITE.com\/wp-json\/wp-statistics\/v2","ajaxUrl":"https:\/\/www.MYWEBSITE.com\/wp-admin\/admin-ajax.php","hitParams":{"wp_statistics_hit":1,"source_type":"home","source_id":627,"search_query":"","signature":"xxx","endpoint":"hit"},"onlineParams":{"wp_statistics_hit":1,"source_type":"home","source_id":627,"search_query":"","signature":"xxx","endpoint":"online"},"option":{"userOnline":"1","dntEnabled":"","bypassAdBlockers":"","consentIntegration":{"name":null,"status":[]},"isPreview":false,"trackAnonymously":false,"isWpConsentApiActive":false,"consentLevel":"disabled"},"jsCheckTime":"60000","isLegacyEventLoaded":"","customEventAjaxUrl":"https:\/\/www.MYWEBSITE.com\/wp-admin\/admin-ajax.php?action=wp_statistics_custom_event&nonce=5792635e1c"};
/* ]]> */
</script>I wonder if I should have been viewing the page source of the CMP page but that is not really possible when logged in.
Thank you once again, we will be purchasing the full version on Friday, and I will give you my full name and details then.-
This reply was modified 10 months ago by
xiexiema.
Ok I used this, does this look OK?
<script type="text/javascript" id="wp-statistics-tracker-js-extra">
/* <![CDATA[ */
var WP_Statistics_Tracker_Object = {
"requestUrl":"https:\/\/www.MYWEBSITE.com\/wp-json\/wp-statistics\/v2","ajaxUrl":"https:\/\/www.MYWEBSITE.com\/wp-admin\/admin-ajax.php","hitParams":{"wp_statistics_hit":1,"source_type":"home","source_id":627,"search_query":"","signature":"XXX","endpoint":"hit"},"onlineParams":{"wp_statistics_hit":1,"source_type":"home","source_id":627,"search_query":"","signature":"XXX","endpoint":"online"},"option":{"userOnline":"1","dntEnabled":"","bypassAdBlockers":"","consentIntegration":{"name":null,"status":[]},"isPreview":false,"trackAnonymously":false,"isWpConsentApiActive":false,"consentLevel":"disabled"},"jsCheckTime":"60000","isLegacyEventLoaded":"","customEventAjaxUrl":"https:\/\/www.MYWEBSITE.com\/wp-admin\/admin-ajax.php?action=wp_statistics_custom_event&nonce=5792635e1c"
};
/* ]]> */
</script>OK Actually it is OK I have just checked using VPN from a random country and it is working as expected. Thank you very much.
Hi @xiexiema,
Just following up to check if everything is still working as expected on your end.
Were you able to successfully track visits through the CMP landing page?
Please feel free to reach out if you need any further help.
Best regards,
MehmetHi there,
Thank you for your reply. I did test using VPN and a random country and the country showed up in stats shortly afterwards. So, it is generally tracking visits as far as I can tell. Thank you.
I guess the only thing really is that the actual page, (for example in page insights) doesn’t show up. This would be a tough one I guess? As the URL of the landing page is simply “www.mywebsite.com”.
I mean it would be amazing if the stats showed “Landing Page” or “CMP Page” or something like that. I wonder if that may be possible.
My best regards.Hi @xiexiema,
Thank you for your detailed explanation.
Since the CMP page is actually your main landing page, there is no way to separate them in the statistics as they share the same URL.
However, you can use the date filter to specify a time range.
By doing this, you can identify which statistics belong to the period when the CMP was active and which ones are from before it was enabled.Please let us know if you need any further assistance.
Best regards.
That is great thanks.
Perhaps a suggestion for the future. Ability for user to tag a certain page with a name that would be easily recognisable in the Stats panel.
Thanks once again. πThank you very much for your valuable suggestion.
We really appreciate your feedback and will definitely consider adding the ability to tag pages for easier recognition in the Stats panel in a future update.If you have any other ideas or questions, please feel free to share them with us.
https://feedback.veronalabs.com/boards/wp-statistics
Weβre always here to help!Thanks again for your support.
Best regards.
The topic ‘No statistics shown when using CMP Plugin’ is closed to new replies.