google analytics page uri link repeating the domain - google-analytics

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.

Related

To set goal for Dynamic URL for an E-commerce Project

URL : https://steroidsoutletuk.com/checkout-2/?order=1324&key=wc_order_jYwEIF1DEuCjf
& URL is always changes after checkout-2 means this only (order=1324&key=wc_order_jYwEIF1DEuCjf)when a user place an order for it?
Do you have any filters applied to the GA View that change the default reporting behavior of pages in the Behavior > Site Content > All Pages report, such as a cross-domain filter?
If not, create a destination goal with regex as the goal match type and enter ^/checkout-2/.*$ as the goal url.
If there is a filter being used that prepends the hostname to the requestURI, create a destination goal with regex as the goal match type and enter ^https://steroidsoutletuk.com/checkout-2/.*$ as the goal url.

Is there a way to remove the ga cookie id parameters after a ? mark in a page URL from Google Analtyics Reporting

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.

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

Getting the base URL for a property via Google Analytics API?

I'm working with the Google Analytics API, and am pulling a lot of data from it successfully. The accounts feed (https://www.google.com/analytics/feeds/accounts/default) returns a list of web properties connected to the account you're authorized for, in the following format (most actual values replaced, not sure how sensitive any of it is):
<entry gd:etag="W/"<charsblahblahblah>."" gd:kind="analytics#account">
<id>http://www.google.com/analytics/feeds/accounts/ga:########</id>
<updated>2011-08-04T12:01:33.467-07:00</updated>
<title>www.afifthofnothing.com</title>
<link rel="alternate" type="text/html" href="http://www.google.com/analytics"/>
<dxp:property name="ga:accountId" value="#####"/>
<dxp:property name="ga:accountName" value="My Sites"/>
<dxp:property name="ga:profileId" value="######"/>
<dxp:property name="ga:webPropertyId" value="UA-#####-#"/>
<dxp:property name="ga:currency" value="USD"/>
<dxp:property name="ga:timezone" value="America/Los_Angeles"/>
<dxp:tableId>ga:#######</dxp:tableId>
</entry>
I've previously been using the <title> element as the base URL for the property, which usually works because that's the default title that Google Analytics assigns to the property. But if a user edits this (I'm querying my end-users' accounts, so I don't have control there) to something like "A Fifth Of Nothing", then the Analytics API will dutifully return that as the title, leaving me with no way to find the base URL.
I've scoured the Analytics API documentation and googled around, searched SO, but don't see any way to get the base URL of a web property from Google Analytics. I've tried querying the id field via the OAuth Playground for more info, and it just gives me more errors, saying the last part has to be /default.
Is there a way to get the base URL for a user's properties from the data API? It seems like this would be something pretty basic. If not, I'll have to resort to trying the title, and if it's not URL-like just have the user enter it themselves, which is not very user-friendly, but is the only thing I can come up with at this point.
The strategy to use is to do a query against the ga:hostname dimension for ga:visits and sort descending. You typically can use this to reveal the host/base url.
I don't think there is such a property for the "base url" because technically you can put the google tracking code on multiple websites. And in this instance you would have multiple base url.
View Full Page URL In Reports
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. For example:
If your site's URL:
/directory/download/file.html
is rewritten by a filter to look like:
/download/file
then your goal should match
/download/file and not /directory/download/file.html

Resources