-
I have installed google analytics and fired tags through GTM a month ago. but now the code is not present in the website page source. i do not know why it is suddenly removed. I am also getting a message in google analytics
“Data collection isn’t active for your website. If you installed tags more than 48 hours ago, make sure they are set up correctly.”
-
Hello,
I’m sorry to hear about the issue you’re facing with Google Analytics tags being removed from your website. If you’ve installed Google Analytics and fired tags through GTM a month ago but now the code is not present in the website page source, it could be due to various reasons such as changes in the website code, plugins, or theme updates.
To resolve this issue, please follow these steps:
-
Check if the Google Analytics tracking code is still added to your website:
- Look for the presence of the measurement ID (G-XXXXXX) in the source code.
- Search for
google_gtagjsto trace the measurement ID in the source code easily.
-
Ensure that the "Install Analytics Code" option is enabled in Rank Math:
- Go to Rank Math’s Analytics settings and enable the "Install Analytics Code" option if you are not using any other plugin or theme to add the Google Analytics code.
-
Verify the correct implementation of the Google Analytics tracking code:
- Clear your site’s cache and check for the tracking code added to the front end.
- Use Google Tag Assistant to verify if the correct Analytics code has been added to the frontend.
If after following these steps, you still face issues with the Google Analytics tags being removed and see the message "Data collection isn’t active for your website," please ensure that the tags are set up correctly and have been active for more than 48 hours.
If you need further assistance, please feel free to reply here, and a human agent from the Rank Math Support team will assist you promptly.
Thank you for reaching out with your concern.
Sources:
Resolving Rank Math Analytics Related Issues » Rank Math
How to Install Google Analytics With Rank Math SEO » Rank Math
Making the Most of the Analytics in Rank Math
Why Did My Website Disappear From Google Search? » Rank MathHello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
Thank you for contacting support.
By looking at the website with the Tag Assistant we can see that it’s detecting the tags properly and firing fine which you can see the same here: https://tagassistant.google.com/
Don’t hesitate to get in touch if you have any other questions.
Yes, it is showing now because I have inserted the code in my header.php file today again.
But the problem is I have already done that before in the month of May. Then why it is suddenly removed.
Can you also please tell me why the rankmath analytics is also not showing any results.
Should i have to accept some consent in google analytics to work properly?
Hello,
To solve this issue, you need to fetch fresh data from Google. This is a simple process that you can do by following the steps below:
1. Head over to WP Dashboard > Rank Math > Tools & Status > Database Tools and click the
Rebuild Indexbutton. This is the first process before you will update the data manually unlike what was suggested by the bot.2. After that, head over to WordPress Dashboard > Rank Math > General Settings > Analytics tab, click the
Delete Databutton and then click theUpdate Data Manually3. This will start the new data fetch from Google. You can reload the page to see the notice related to the import process.
4. Once the process is complete. Please re-check the Analytics page and all the data should be showing up correctly.
Following the above steps should fix the issue.
You can refer to this guide for reference: https://rankmath.com/kb/zero-search-traffic-error/
However, if it does not, please check if there is a pending Scheduled Action by heading over to WordPress dashboard > Tools > Scheduled Actions > Pending or you can try visiting the following URL:
https://yourdomain.com/wp-admin/tools.php?page=action-scheduler&status=pendingThen Run the
rank_math/analytics/data_fetchscheduled action and wait for the data fetch to complete.This is how it should look like:
Once done, please allow Rank Math a while to fetch data from Google and you should be able to see the updated data.
You might see other actions that are scheduled to RUN as well, it is quite normal and you don’t have to worry.
Let us know how that goes.
Thank you.
Thank you so much. It is resolved with your help 🙂
Hello,
We are glad to know that this issue has been resolved. Thank you for letting us know.
This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.
We appreciate your patience and cooperation throughout this process.
Thank you for choosing Rank Math.
-
The ticket ‘Google tags removed’ is closed to new replies.