coltonfranco
coltonfranco

Reputation: 147

Google Analytics Exclude URL Query Parameters

I am trying to exclude all URLs that contain a PHP query (? in the URL).

Example:

 example.com/mypage?Go_Away

Should Register through Google Analytics as

example.com/mypage

I'm sure there is a way to do it with filters but I would rather use Google Analytics Exclude URL Query Parameters option if I can.

I am using /? Which should register as a question mark and not return any URLs with a? in them yet it is still doing it...

Does anyone have any ideas on how I could achieve this?

Upvotes: 1

Views: 1212

Answers (1)

Eike Pierstorff
Eike Pierstorff

Reputation: 32780

The "exclude query parameters" takes a list of named parameters (with ?param=Query you woukd need to enter "param"). This won't work for you. So you either have to use filters after all, or you use virtual urls in your trackingcode and pass the url withwout parameters (for example uf you're using the asynchronous tracking code you could use the "pathname" property of the window.location object as a second parameter to your trackpageView call).

Upvotes: 1

Related Questions