Analytics
5.3K members online now
5.3K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Missing Tracking Code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all, 

 

Our google analytics keep saying missing tracking code which I don't know why. We have already added Google Tag and waited more than 24 hours. Just wondering if anyone knows how to solve this problem? Thank you very much! 

"No valid tracking code found for property Victoria Women's Transition House Society's default URL http://www.transitionhouse.net/. Make sure your pages are tagged with a supported version of the tracking code." 

 

Thanks,

VWTH

 

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Victoria Womens Transition House S
July 2016

Re: Missing Tracking Code

Top Contributor
# 8
Top Contributor

Let's do this the hard way :-) Remove what you've done so far Smiley Very Happy Go to your Wordpress admin then go to Appearance > Themes > Editor

 

Find your theme and locate the Header (header.php) in the dropdown menu at top right of page.

In the editor, locate the place where it says </head>

RIGHT BEFORE THAT, insert the following code:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-62898205-1', 'auto');
  ga('send', 'pageview');

</script>

 

Click the save button to save changes and congrats, your site now has Google Analytics tagging ;-)

(you may need to purge your Wordpress cache) 

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

View solution in original post

Re: Missing Tracking Code

Top Contributor
# 2
Top Contributor
Hi VWTH :-)

I'm not seeing any tracking code for Google Analytics as being installed.

The site seems to be using WordPress, what method was used for installing the GA Tracking Code?

If your theme has an admin option for adding scripts to the head section of the site, the tracking code should be added there.
If not, then i recommend using a plugin as it removes the need for editing any theme core files and should ensure the tracking code
gets installed in the correct part of the site
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Missing Tracking Code

Top Contributor
# 3
Top Contributor
I was going to suggest that since the site already uses Yoast's SEO plugin, you could install Yoast's Google Analytics for Wordpress plugin ;-)
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Missing Tracking Code

Top Contributor
# 4
Top Contributor

Hi @Julien Coquet :-)))
Yoast hasn't developed/maintained that plugin for a while and it seems to have been removed from his website and also the WP Plugin section.

 

I think this may be very similar now under different devs

https://wordpress.org/plugins/google-analytics-for-wordpress/

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Missing Tracking Code

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi Bronwyn,

Thank you for the reply! This is what the website tracking says...I don't really understand it though
&lt;script&gt;
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-62898205-1', 'auto');
ga('send', 'pageview');

&lt;/script&gt;

Re: Missing Tracking Code

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Hi Brownwyn,

I have already downloaded the plugin you mentioned, but it's a zip file and which file should I open? Thank you!

Re: Missing Tracking Code

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi @Julien Coquet ,

Thank you for the reply ! Which plugin do you mean? I can't find the Yoast's Google Analytics for Wordpress, thank you!
Marked as Best Answer.
Solution
Accepted by topic author Victoria Womens Transition House S
July 2016

Re: Missing Tracking Code

Top Contributor
# 8
Top Contributor

Let's do this the hard way :-) Remove what you've done so far Smiley Very Happy Go to your Wordpress admin then go to Appearance > Themes > Editor

 

Find your theme and locate the Header (header.php) in the dropdown menu at top right of page.

In the editor, locate the place where it says </head>

RIGHT BEFORE THAT, insert the following code:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-62898205-1', 'auto');
  ga('send', 'pageview');

</script>

 

Click the save button to save changes and congrats, your site now has Google Analytics tagging ;-)

(you may need to purge your Wordpress cache) 

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Re: Missing Tracking Code

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭
Hi Julien,

Thank you for the direction! There is something new pops up at the top of our website, but when we login in to google analytics, it stills says "Missing tracking" code...(with the red 1) Do you know why?

Re: Missing Tracking Code

Top Contributor
# 10
Top Contributor
Good job! You're fine as-is.

But it seems you also installed Google Tag Manager.
If you have already installed GTM, you could have just created a pageview tag inside Google Tag Manager instead of inserting the tracking code.
VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan