Google Analytics: simple request uri filter - google-analytics

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

Related

Will Google Analytics treat url parameter as part of URL?

I need to incorporate my own parameters as part of url. (e.g. #student=DD&start=Date1&end=Date2). However, I am cerncerning about if I add my part to the url, will it mess up my google analytics tracking? Basically, now my url is something like -- MywebsiteUrl?userID=AAA#student=DD&start=Date1&end=Date2&utm_source=CC....
What url Google analytics will track? is my website url -- MywebsiteUrl, or ``MywebsiteUrl?userID=AAA#student=DD&start=Date1&end=Date2`?
Thanks in advance!
Google Analytics will treat query parameters as part of the URL. However it will not treat #student=DD&start=Date1&end=Date2 as having query paramaters. As far as (native) Javascript and the GA tracking code is concerned the URL ends after the fragment identifier (#).
So your complete example
MywebsiteUrl?userID=AAA#student=DD&start=Date1&end=Date2&utm_source=CC
you will get MywebsiteUrl?userID=AAA. If the userID parameter contains personally identifiable information you need to remove it to conform to Google's terms of service. You can use a filter or the exclude parameters-box in the view settings.

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).

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.

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