4
votes

I configured GTM to load Mixpanel on every page on my domain and added click tracking on buttons like described on this blog: https://mixpanel.com/blog/2015/03/27/community-tip-implementing-mixpanel-via-google-tag-manager

This is not deployed to any server yet, just localhost, but it seems whenever clicks are being tracked, I get bogus events in mixpanel coming from the US on this url: https://gtm-msr.appspot.com/render2?id=GTM-XXXXX with this user agent: Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; EIE10;ENUSWOL; rv:11.0) like Gecko

Anyone encountered this before? Any idea's what is happening here?

3
Looks most likely like bot activity. After quick googling, found this post on Google product forums (a few years back, but still applicable): productforums.google.com/forum/#!msg/tag-manager/puMzbX-cLs8/…nyuen
Found that to. But the project is only on my localhost, didn't deploy anywhere, so it can't be bot activity. It is more like GTM makes an iframe to the URL mentioned above and sends some activity there.Marcel Panse
same issue with noise data being captured via Inspeclet (a heatmapping tool)Max

3 Answers

1
votes

This seems to happen whenever Google Tag Manager configurations are changed, possibly somewhere in the build process it's tested on an environment from the .appspot domain.

This can be rectified by only initializing mixpanel on non-offending domains:

if (document.location.href.search('.appspot.') == -1)
    mixpanel.init(YOUR_TOKEN);
0
votes

As a workaround I added a check in the mixpanel tracking code in GTM to filter out the bogus user agent. Of course, this works for now, until they change the user agent.

<script type="text/javascript">
  if (navigator.userAgent != 'Mozilla/5.0 (Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; EIE10;ENUSWOL; rv:11.0) like Gecko') {  
    var pagePath = {{Page Path}};
    mixpanel.track("Page Loaded", {"Page Path": pagePath, "User Agent": navigator.userAgent});
  }
</script>

Adding a filter in GTM itself doesn't work either, GTM ignores it.

0
votes

I'm having the same issue and was thinking of checking where the page load was coming from before executing the code. This may be more convenient (doesn't depend on the user agent):

<script type="text/javascript">
  if (document.location.href.search('.appspot.') == -1) {
    /* run your code */
  }
</script>

What you search for could be tweaked, but the odds this part of the URL will change is much less likely than the user agent.