Can a private IP address change? - google-analytics

Okay, this may be a stupid question. I have setuped a Google Analytics account to analyze the traffic of my own site (online portfolio).
My question is: How can I exclude the traffic from me?
Can I just simply get my public IP address and exclude it? Will it change?
If it will, how can I effectively exclude the internal traffic? Many thanks!!!

Just set up Ghostery plugin on your main browser and use only this browser for working with Your site.
Simple and very effective.

Yes, your IP address is likely to change over time.
IP filtering is best used for corporate networks, which have static IP addresses (or range of IP addresses). IP filtering is unlikely to be useful for individuals.
The best way to filter out your own traffic would be to create a Custom Dimension for User Type, and have your CMS/Portfolio application fill out its value depending on visitor's log-in status.
1. Create a Custom Dimension in Google Analytics
Navigate to the Admin Section of Analytics, and create a new Custom Dimension for User Type.
For reference and/or more details, see the official Google
documentation about creating Custom
Dimensions.
2. Create filtered Views in Analytics
Still in Google Analytics, you can set up multiple Views and use filters to remove yourself from the traffic logged.
For example:
Leave the default View provided as a "Raw & Unfiltered View".
Create a new View, "Visitors only", and apply an "Exclude Filter" based on your Custom Dimension, preventing "Administrator" hits from being displayed.
For reference and/or more details, see the official Google
documentation about creating a
View and
managing View
filters.
3. Have your CMS/Portfolio print the user status for each view
For example:
When User is logged in as Administrator/Contributor, have the application output:
ga('set', 'dimension1', 'Administrator');
When User is anonymous, have the application output:
ga('set', 'dimension1', 'Visitor');
Unfortunately, you might have to look for plugins and/or do code it yourself, depending on your application.

Related

Real-Time Data shows visits of pages that don't exist for the selected domain

In Google Analytics, I have navigated to All Accounts-> SomeDomain.
I see a lot of traffic to that domain.
However, most pages listed there are from another domain of mine.
Real-Time for example shows this:
This is hilarious because this page doesn't exist on that domain.
I thought that it shows only traffic to the domain that I have selected above after "All accounts".
Is that not correct?
Or does anybody know any situation where this might happen?
This goes on since months already.
My GA is managed via GTM.
I don't use any CMS.
In GTM, I have a GA Page View Trigger:
I don't see where I could have made a mistake.
Does anybody do?
Thank you.
Create a custom report with dimension Hostname and metric Sessions (for example). You'll see what domains send data to your GA Property.
May be somebody stole code of your site (including trackers).
You can filter alien domains in GA settings for View.
UPD. Lookup table to push GA ID's depending on Hostname.

Partial IP Anonymization using DTM

Is there a way to anonymize IP based on the URL address. The site runs across many countries, and we need to anonymize the IPs for the traffic coming from a specific country only. The subdomains are different based on the countries.
My analytics setup utilizes DTM (Dynamic Tag manager) and is configured to send data to GA (Google Analytics)
You should be able to use the "Customize Page Code" field - test the url if your user comes from a domain that requires anonymization and if so set a call to anonymizeip.
if(location.hostname.indexOf('some_site.de') > -1) {
ga('set' 'anonymizeip' true);
}
Since the custom code is run before the first pageview this should work to anonymize the IP for that domain. I admit I haven't tested this, but you can look into the network tab, if the call to the Google servers contains the parameter "&aip" then the IP is anonymized.
Here is a pirated screenshot from the Adobe documentation to show where the Customize Page Code field is (bottom of the image). Hit the "open Editor" field to insert your code.

Google Analytics API: Include profile domain in Profile Feed

Using the Google Analytics API I would like to display the domain associated with each GA profile. Is this possible or is there another way to do it? I have been unable to find any documentation for the domain.
http://code.google.com/apis/analytics/docs/gdata/gdataReferenceAccountFeed.html#accountResponse
http://code.google.com/apis/analytics/docs/mgmt/mgmtFeedReference.html#profileFeed
I can't use profileName because depending on how the user has their GA account setup, it may just be a string and not a domain.
One thing you might do is perform a query using ga:hostnames as the dimension and either ga:visits or ga:pageviews as metrics. This will yield a chart of the host name (what is in the browser address bar) to reach that site. Sort of a hack in a way. Technically you can use a single GA Tracking code on multiple sites. So there is no "Official" domain name associated with a profile.
Unfortunately, I don't think it's possible with the current API. Furthermore, you can't explicitly depend upon the domain they enter as the only domain the profile is tracking since there is further customization that allows the user to specify if they want to track subdomains and/or top-level domains. I believe your only option is to ask the user the same information Google asks the user and help the user understand they will have to manually keep two lists in sync due to limitations of the Google API.

Does anyone use Google Analytics? How Google does it to avoid counting the owner of the website as visitor?

I don't want to be counted as visitor every time I test my page in the hosting. Does Google know i'm the owner of the site by checking if i'm logged in my Gmail account?
I don't think Google does anything like this automatically. But they do provide instructions for excluding based on IP address (or range) and apparently also now by cookie. If you use a CMS or admin interface, you could put the code they provide in an HTML file that you then include into the admin interface pages by IFRAME (to ensure that the cookie stays set for anyone who uses that interface).
One option is to install Ghostery addon your browser. Ghostery can block trackers and scripts used on webpages likes google analytics, google adword and other adwares.
You can also block or unblock the trackers for a specific site or specific tracker for a particular site.This add on is available for Firefox and chrome browsers. If you have this installed on your browser, your visit wont be counted as google analytic script wont be executed.
You can learn more about ghostery at: http://www.ghostery.com/about
There are also often application specific ways of blocking google from counting administrators. For example I've used a wordpress analytics plugin that would automatically not include the tracking code if the user was logged in as an administrator. If you are application has the concept as admin then you could write something similar that controls when the code is added.
If you visit your site frequently from connections with a dynamic IP address, eg. home broadband, then excluding IP addresses is not particularly practical. To go beyond IP exclusion, you can create an isolated page on your site that only you know about that includes a call to Analytics to label your cookie.
The Google Analytics _setVar() function lets you label yourself with an arbitrary string, eg. 'internal'. You only need to do this once per browser as long you don't clear your cookies.
Having labelled yourself as 'internal', you can create an Advanced Segment within Google Analytics to exclude visitors with that label.
Google Analytics relay on you embedding a call to their JavaScript see this link - do not confuse it with how Google does page ranking.
So the answer to your question is that your pages should be smart enough to recognize when the request comes from you and skip the call to the JavaScript.

Can I use the same Google Analytics tag for a blog subdomain of my site as the main site?

I have my site.com and blog.mysite.com on a different IP address. Can I use the same Google analytics ID for both sites? Does Google analytics look at what IP address the recorded visitor information is from? If it doesn't, what prevents random sites from including your Google analytics tag and sending random data to your account?
You have to modify your script tag a little. Google's FAQs cover this:
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55524
You can run any UA-XXXXX-YY on any website (any domain name, on any IP), it will end in your profile stats.
Yes, your stats could get completely messed up if some site would put your UA id on its site.
To prevent this, you can setup an include filter on your GA profiles, and Include only your domain names by using a regep like this "www.domain1.com|www.domain2.com|www.domain2.com" on the hostname field.
Be careful, the Include filter is exclusive (If you have 3 Include filters on the field hostname, only the first one will be applied).
The alternative is to create an advanced segment based on the hostname, you'll get mostly the same result but could be exposed to data sampling effects if you have a large audience. But it allows a quick fix afterwards, while filters need to be set before you get into trouble.
Sure. you can use the same for both. You will be able to segment traffic by domain name.

Resources