Analytics
5.6K members online now
5.6K 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

Same web property ID is tracked twice

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi 

 

Just wondering why Tag Aassistant on this website (http://www.rezare.co.nz/) says 2 pageview requests while I only find one instance of GA code with the tracking id UA-64957624-1 through source code? 

 

rezare.png

 

Also another script with tracking code of UA-64957624-2 is showing error No HTTP response detected what could be possibly causing this issue?

 

Many thanks.

 

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Ann Z
May

Same web property ID is tracked twice

Participant ✭ ☆ ☆
# 4
Participant ✭ ☆ ☆

Hi Ann,

 

You should remove one of the tracking snippets and add a named tracker object.

 

Your snippet should look like this:

 

<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-12XXXXX3-1', 'auto');
ga('create', 'UA-12XXXXX3-2', 'auto', 'mySecondGA'); // This is your named tracker named 'mySecondGA' . You can name it as you want.

ga('send', 'pageview');
ga('mySecondGA.send', 'pageview');

</script>

 

I hope my answer helps.

Regards,

Güney

View solution in original post

Re: Same web property ID is tracked twice

Participant ✭ ☆ ☆
# 2
Participant ✭ ☆ ☆

Hi Ann,

I checked your website. You have 2 Google Analytics tracking snippet on your website:

2ga.png

 

If you need to use multiple Google Analytics on your website, you should use named GA tracking object. Please let me know if you need further explanation.

 

I hope my answer helps.

Regards

 

Same web property ID is tracked twice

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thank you @Gny

 
I think I have done this before but didn't cause any problem? Could you explain a little bit more how it should work? Do I need modify the tracking code to make it work?
 
Many thanks.

 

Marked as Best Answer.
Solution
Accepted by topic author Ann Z
May

Same web property ID is tracked twice

Participant ✭ ☆ ☆
# 4
Participant ✭ ☆ ☆

Hi Ann,

 

You should remove one of the tracking snippets and add a named tracker object.

 

Your snippet should look like this:

 

<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-12XXXXX3-1', 'auto');
ga('create', 'UA-12XXXXX3-2', 'auto', 'mySecondGA'); // This is your named tracker named 'mySecondGA' . You can name it as you want.

ga('send', 'pageview');
ga('mySecondGA.send', 'pageview');

</script>

 

I hope my answer helps.

Regards,

Güney

Same web property ID is tracked twice

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

@Gny Thanks a lot.