0

I am running a SolarWinds synthetic transaction against my existing web site which is connected to GA. The synthetic transaction looks like a hit from vanilla IE (based on the agent string). Because of that, I am unable to filter it from the logs. Also, I am a GA newb.

The transactions are coming from agents running in Azure - so I cannot use IP addresses to filter them out (they are not static).

I can modify the initial hit from the monitor to add something to the querystring, but that is about it.

Does anyone know of another way to isolate this traffic so that GA can ignore it?

Thanks,

Judd

JuddGledhill
  • 149
  • 1
  • 1
  • 11

1 Answers1

0

If you have a query string you can set an exclude filter in your views (Admin->Views->Filter->Custom Filter->Exclude) on the request uri field (with a pattern matching your query string), this will delete the hits before they are recorded (and take care not to remove the query string in the view setting or another filter as they are processed in sequence).

Filters will only work hit based, since you say "initial hit" (which suggest there are subsequent hits without a custom query string) you would need to create a session-based solution by persisting that value (via a cookie or localstorage) and pass it in to the Google Analytics tracking call e.g. as a hit-based custom dimension and use that for filtering.

ga('create', 'UA-XXXX-Y', 'auto');
// Set value for custom dimension at index 1.
ga('set', 'dimension1', myCookieVar);
// Send the custom dimension value with a pageview hit.
ga('send', 'pageview');

And the filter

enter image description here

Eike Pierstorff
  • 31,996
  • 4
  • 43
  • 62
  • That is great. I am looking for a way to do the tracking completely outside of the app - with no change to the apps themselves. That cookie approach seems to indicate that I would have to do something on the app side to make the cookie for subsequent hits. Any other ideas? I might be able to make that happen, but it might be a high hurdle (this is for a series of disparate apps in a small enterprise). – JuddGledhill May 02 '16 at 19:48
  • As far as I know filtering does only work hit-based. So you'd need to append the query string to every hit in the monitor programm, and it that case you can filter by the query string in the request uri. Else you can create a segment (exclude sessions where Landingpage contains query string), but that's not permanent. – Eike Pierstorff May 02 '16 at 20:03
  • Awesome, let me give it a shot and then I will mark your answer.I might be able to modify the requests from the monitors to pass some sort of query on every call - need some investigation there. Thank you. – JuddGledhill May 02 '16 at 20:21
  • Question... Can I filter by domain name instead of IP address? Azure likes that better. – JuddGledhill May 12 '16 at 19:06
  • I was only able to work it out with static IP addresses. Thank you for the help! – JuddGledhill Aug 04 '16 at 17:44