Google Analytics Goals: Prevent tracking of URL parameters of subfolders - google-analytics

On my site I am tracking the URL /shop/ as goal by head match. As there are some URL parameters I cannot use exact match here.
Additionally, I am tracking a goal by exact match which is a URL to subfolder: /shop/process/paid.php
The problem is that GA tracks this subfolder with the head match as well, and thus saves the URL parameters that come along with paid.php, e.g. paid.php?email=customer#home.com
How can I prevent GA to track the URL parameters?
How would the setup look like?
Thanks!

That should work with a custom filter:
admin->profile->filters->custom filter->search and replace.
Search for
/shop/process/paid.php\?.*
(that's your url with arbitrary query parameters, the "\" is an escape sign since "?" is also an control character in regular expression. Dot means any character and "*" means any number of the preceding (in that case any) character) and replace with the desired url ( /shop/process/paid.php).
There is probably a more elegant solution but like most people I'm not good at this regex stuff. This should work however.
Alternatives:
If those query parameters are nowhere needed in the tracking data you can exlude them completely in the profile settings.
You can created a profile for the subdirectory based on the directory (include filter->request uri contains "/shop" and set only this profile to remove query parameters

Related

How to remove URL parameters from Google Analytics reports

My Google Analytics record pages with dynamic parameters. URL looks like:
/iframe/dashboard/214301/customercare/cc
/iframe/dashboard/842904/customercare/serviska-fb
/module/customercare/serviska-fb/842904
The problem is that site content report cannot merge these URLs as an access to the same page /customercare.
How can I solve it?
I know that I can add a custom filter in the account settings, but how to setup regular expression?
Search and Replace Filters supports regular expressions so you might have a filter like:
Search string: /customercare(\/.*)
Replace string: /customercare
where (\/.*) is a part of a regular expression matching all the characters following /customercare

Google Optimize Experiment targeting wrong URL

I've setup an experiment on a specific URL in which I send no traffic
(same domain name that I use for other landing pages but with different parameter in the URL)
I've started the experiment few days ago without sending any traffic
And now I see that the experiment got triggered around 5000 times.
I double checked on my analytics reports and I see no access to the main page that is supposed to trigger the test. To explain with example:
This is what I have running:
http://domain1/landingpages?id=1
http://domain1/landingpages?id=2
this is the test that I created:
http://domain1/landingpages?id=3
with a 50% redirect on:
http://domain1/landingpages?id=4
The Experiment should only be triggered on id=3 page, but it did got triggered with id=1 and id=2 pages. Any idea how I can make the trigger only happen when "id=3" is in the url ?
Currently my configuration is as follow:
"WHEN Url Matches "http://domain1/landingpages?id=3" "
The URL targeting documentation explains your situation. (Emphasize by me.)
Use matches when there are query string parameters in URLs that you
don’t want to include in the matching. Matches can be more flexible
than equals because it adheres to the following rules:
Ignores query string parameters and fragments.
Case insensitive.
Normalized to remove a www. prefix.
Normalized to a remove a trailing slash.
HTTP and HTTPS are optional (HTTP will match HTTPS).
Verifying this in Optimize:
So you should either simply select Equals operator and use http://domain1/landingpages?id=3 as a value.
If other parameters might occur, then you could build a regex for this, to containt id=3 among various parameters. E.g.:
http:\/\/domain1\/landingpages\?(.*&)?id=3(&|$)
Optionally, you can use Query parameter targating, and build a rule for the base URL, and for the id parameter separately.

Google Analytics Replace Homepage URL as "/" to Something Else

I'm looking to find a way to replace the home page URL that Google deems as "/" in my Google Analytics reports. I know Google sets "/" as the home page but in my reports, I want it to display "Home" instead.
I haven't found any solutions through Google. I'm thinking it's through filters somehow.
I've tried going through the GA settings and did a search on filters how to change this but no solutions. Thanks!
Although I would not recommend this, you can create a filter in a view (possibly not the default one as it's bad practice) with the following fields:
Regex explaination:
^ asserts position at start of a line
\/ matches the character / literally
$ asserts position at the end of a line
Filter configuration if the SS gets lost:
Filter type: Custom
Checbox: Search and Replace
Filter field: Request URI
Search string: ^(\/)$
Replace string: Home
Remember to verify your filter and to create an additional view if you do this.

Does Google Analytics Destination Goal Tracking match query params?

I'm investigating Google Analtyics Goal tracking. I would like to append a query param to specific urls to indicate goal completion. Eg.
/some/path?goal=goal_name
I do not want to use the path part of the url for matching, only the query param. If I setup a destination regex matcher, will Google Analytics match the param part of the url? Eg.
goal=goal_name
Yes, it does. If you use regexp as match type remember to escape your question mark if you use the full url (i.e. /some/path\?goal=goal_name).
You can actually test this easily - the realtime reports have a "conversion" menu item that shows goal conversions immediately (not e-commerce-transactions, though). I usually create a separate view to test new goals and filters so I don't mess up my live data - I recommend you do the same.

Use wildcard to filter URL in AppDynamics

I'm trying to filter on AppDynamics to get all the request to a particular REST URL, the REST URL is not fixed as long as in the URL
/AppEngine/rest/evac/${id}/createNewActivity
On the Transaction Snapshots you have the option to filter results, and in the filters you can filter by URL:
If I search for a concrete URL (with ${id} defined) I can search it, but I cannot find how to use a wildcar to find this URL with any ${id}. I tried so far to use
/AppEngine/rest/evac/*/createNewActivity
/AppEngine/rest/evac/.*/createNewActivity
With no results.
The one with works just a bit is using /AppEngine/rest/evac/* which also retrieves other REST which start with the same URL, so I can export the results and filter outside AppDynamics.
But there is a way to use a wildcard so I can find the desired results in AppDynamics?
Even it is not the desired behaviour, if filtering by URL and specifying only createNewActivity worked for me (as long as there are no other REST URLs matching this).

Resources