Last week I changed my WordPress theme from SocialMe to Schema. I did all the setup, created menus, designed sidebar, proper logo, and fonts.
But, I forgot about one important thing. Google Analytics tracking code.
If you are a MyThemeShop user, then you would know that we have a section to add codes within ‘theme options.’ Some other themes also provide this features or else they recommend to use a WordPress plugin like “Insert Header and Footer.”
So, I had my Google Analytic Tracking Code to the footer section of my previous blog which I forgot to add in the new theme.
I do not check Google Analytics daily, and hence I was unaware that all my page views were getting untracked. So after a week when I checked my analytic to see how my blog is performing, I was devastated with the result.
At first, I thought I was hit by a Google penalty and my blog is not organic page views. But I saw that there’s a warning at the top right corner.
It was the first time I was happy after seeing a notice. Any penalty didn’t hit me, but I’m missing my tracking code. The error looked like this –
How to Fix Google Analytics Missing Tracking Code Error
Here the exact steps I took to fix this issue and get my analytic working back again.
Login to your Google Analytics account and choose the blog property.
Once you are on the analytic page, click on the Admin tab which would take you this page.
Make sure that the correct user account and the property are selected.
Next, Go to Tracking info > Tracking Code.
It will take you to a page where you can find your tracking ID and Tracking Script which you need to add to your website.
Copy the script code and log in to your WordPress Dashboard.
Steps For MyThemeShop Users:
1. Go to Appearance > Theme Options > General Settings.
2. Scroll down to find the Footer Code section and Paste the code you copied earlier in that section.
3. Save the Changes.
For Other Third Party Theme Users:
1. Login to your WordPress Dashboard.
2. Go to Plugins > Add New and search for Insert Header and Footer. Install and Activate the first plugin in the search result.
3. Once installed and activated, you can find that plugin by visiting Setting > Insert Header and Footer.
4. Paste your Google Analytics Tracking Code in the footer section and save the changes.
Now again visit your Google Analytic Page and Go to that notification bar. Click on ‘Check Again, ’ and the information will be marked pending verification.
You’ll start seeing the analytical data from the next day, and your error will be marked as resolved within 24 hours.
What I learned from this huge mistake is to keep every small thing in mind while changing WordPress themes.
I hope this guide would have helped you Fix Google Analytics Missing Tracking Code Error.
Do share this post with your friends and followers and it might assist them.
Share your suggestions and views in the comment section below.
Have a great day.