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
Related
I am trying to create a report in google analytics which should include this /customer/account/create?signup=1&invitation_url as a part of the landing page. When I create the custom report for filters when I add
/customer/account/create?signup=1&invitation_url and use regex I am getting null values. What regex expression can I use to get this?
Basically I need all sessions from the landing page that includes
/customer/account/create?signup=1&invitation_url
You need to screen special symbols with "\".
\/customer\/account\/create\?signup=1&invitation_url
Good tool to test regex:
https://regex101.com/
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.
We have an instance of cross-domain tracking within Google Analytics with a single sign-on between sites. The sites are on GTM. The single sign-on generates a Google Analytics id such as (?_ga=1.18339449.1954186898.1485354375) which are appended to the end of page URL's.
Our preference is that the id's do not appear within page level reporting as GA treats each page as unique which in turn increases the chances of sampling. We've been unable to use the "Exclude URL Query Parameters" feature found within the view settings to remove the parameters from page level reporting.
I could not find blog or stack overflow posts specifically stating how to remove the id parameters from within Google Analytics reporting.
Is there a suggested alternative to prevent the id parameters from being appended to the sites page URL's?
If you aren't able to use the Exclude URL Query Parameters option to strip the parameter from the URL...that stinks. You might want to let Google know the feature isn't working as expected.
Another option is to use an Advanced filter with regex to strip the parameter from the Page. You can do this with the following settings:
Field A: Request URI
Pattern: ^(.+)\?_ga
Output To -> Constructor
Request URI
Pattern: $A1
This is a quick and dirty filter that will strip off all query parameters when _ga is the first parameter shown.
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.
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