AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.5K members online now
4.5K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Google analytics not removing filter traffic and visits showing twice...

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Can anyone advise how to rectify the following problems?

I have an affiliate website/webpage that has two tracking IDs within the code - one from me and one from my supplier...

The two problems I have are

1) The filter to prevent showing traffic from my own IP isn't working
and
2) Each single visit that I make is showing up as 2 visits

the 'REAL TIME' visits also seem to 'linger' for several minutes - more so than I think they should


The ID numbers are changed for privacy but the code is as follows

<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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxxxxx-1', 'auto');
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
ga('create', 'UA-xxxyyyy-2', 'auto', {'name': 'supplier'});
ga('seeTickets.send', 'pageview');
</script>

Google analytics not removing filter traffic and visits showing twice...

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

2) You didn't name your first tracker (default tracker) and named your 2nd tracker `supplier`, but one pageview is sent to the default tracker and I assume the other pageview might also be sent to the default tracker, because the tracker `seeTickets` does not exist (https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_w...). It needs to be sent to the existent tracker `supplier` instead. ga('supplier.send', 'pageview');

Google analytics not removing filter traffic and visits showing twice...

Participant ✭ ✭ ☆
# 3
Participant ✭ ✭ ☆

Hi Neil,

 

1. Can you please share with us how you set up your filter? 

2. You need to create a named tracker for the other GA (@Hansueli F is right). I modified your code as follows:

 

<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','//www.google-analytics.com/analytics.js','ga');

  
  ga('create', 'UA-xxxxxxx-1', 'auto');

  ga('create', 'UA-xxxyyyy-2', 'auto', 'supplierGA');

 

  ga('require', 'linkid', 'linkid.js');

 

  ga('send', 'pageview'); //Send pageview to your Google Analytics property
  ga('supplierGA.send', 'pageview'); //Send pageview to your supplier's Google Analytics property
</script>

 

I hope my answer helps.

Regards,

Güney