Google Analytics Replace Homepage URL as "/" to Something Else - google-analytics

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.

Related

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.

google analytics page uri link repeating the domain

In my Content Drilldown, when I go to the second page path level of one of my domains the link that displays duplicates the domain in the uri.
For example..
If I have the following:
events.company.com/
When I drill down the link above I will get:
/http:/
/
/some-directory/
When I click the Page dimension I will then get these links:
events.company.com/
events.company.com/http://events.company.com/index.php#
events.company.com/http://events.company.com/index.php#view/all
So you'll see that the links above like below is incorrect:
events.company.com/http://events.company.com/index.php#
It needs to be
events.company.com/index.php#
....but I don't why it's coming through like that and how to correct it.
Any suggestions?
Thanks
Actually, seems like someone followed the "right" instructions from GA help:
By default, the data in your reports includes only the Request URI and
not the domain name:
URL of page: http://www.example.com/foldername/page.html
Request URI: /foldername/page.html
Domain name: www.example.com
If you'd like to see the domain name as well as the Request URI in
your reports, create an Advanced filter for your view with the
following settings:
Filter Type: Custom filter > Advanced
Field A: Hostname
Extract A: (.*)
Field B: Request URI
Extract B: (.*)
Output To: Request URI
Constructor: $A1$B1
Note that creating URL rewrite filters like the one described above
can affect Analytics' ability to match your goals properly.
If you're using Analytics filters to rewrite your URLs, you need to
make sure that your goal settings reflect these changes. Like all
filters, URL-rewrite filters are applied to the raw data coming into
your account, before goals are processed. As a result, your goal and
funnel URLs should reflect the final, rewritten format of the URL.
https://support.google.com/analytics/answer/1012243?hl=en
However, it does messes data quite a lot. I believe this is an issue with GA, at least this documentation is misleading. Such filter also affects URL matching on Goals and funnels, so I would not recommend it.

Tracking a change of web directory in Google Analytics

We recently changed the directory structure for our website. For example the following page was listed changed as follows:
Previous: /degrees/msm-technology/
Current: /degrees/masters/ms-management/technology/
They are the same directory with the same pages just listed differently.
I'm attempting to do a custom filter Search and Replace to update the previous page so that there is not an interruption in data when tracking the pages. However it doesn't seem to be working.
Filter Field Request URI -
Search string ^/degrees/msm-technology/
Replace string: /degrees/masters/ms-management/technology/
The data for the previous page listed ends this week, while the other begins.
You need to escape the hyphen like this
Search string: ^/degrees/msm\-technology/
because GA filters use POSIX Regex.
[source: https://support.google.com/analytics/answer/1034836?hl=en]
Hope this helps.

Google Analytics: simple request uri filter

I need to exclude from the analitycs tracking all the pages that contain the url parameter no_index
Example: http://www.mysite.com/page.php?product=54&no_index=1
All I have done it's putting into the filter pattern no_intex with nothing else.
Is that right or what would be a correct regexp for this?
This is a screenshot to clarify.
Many thanks for your help
Set your filter pattern to this:
\bno_index\b
I do the same thing in one of my accounts to remove all requests with a specific URL param and it works perfectly. Before saving your filter, click "Verify this filter" and it will show you the resulting effects so that you can verify it before saving.
Here is a screenshot of the exact configuration settings in Google Analytics that should work
Try this for your Filter Pattern: \/(.*)\&no\_index(.*)
The Request URI starts directly after the hostname.
So your example,
http://mysite.com (hostname)
/page.php?product=54&no_index=1 (Request URI)
So, your filter pattern, no_index, would look for no_index directly after http://www.mysite.com/no_index=1

Google Analytics Goals: Prevent tracking of URL parameters of subfolders

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

Resources