Using Google Analytics from an Intranet - google-analytics

We have setup GA from an intranet, however we are not sure if everything is tracked correctly. We should be getting more unique hits/page views than GA reports.
All of our intranet users gets the same external IP address and we are not sure if this makes GA believe that all the requests are coming from the same user or a limited number of unique users at least.
How does GA determine the uniqueness of a the requests? and is there a way to provide another "unique" key if needed?

Google Analytics does not IP adresses for that purpose. It creates an id for every browser where the tracking code is run and stores it in a cookie (on browser that do not allow cookies data will still be sent but will not be grouped into user sessions, however with Universal Analytics you can choose to provide a uuid yourself).
Since you intranet users are presumably authenticated you could use the user id feature in Universal Analytics. However this should not be necessary (it was developed to recognize authenticated users across devices, so it might be useful if you users log in to different computers).
But as long as javascript is enabled and allowed to set cookies (and of course there is an internet connection) there should be no problems. IP is used for geolocation only.

Related

Cross Application Tracking using the Measurement protocol

Hi I have a customer who is using Universal Analytics on their web page and then when you click on a link it goes into their app that is using measurement protocol.
They UA code is the same but the CID changes.
Example website:
cid=1387132168.1487081747
When i get into the app with the same browser
cid=47d9e140-f6ed-41c2-bd2d-9f3fb91df6b2
I suspect that Google Analytics starts a new user and session when the CID changes and just need some confirmation that that is the case.
The field Cid anonymously identifies a particular user, device, or browser instance. For the web, this is generally stored as a first-party cookie with a two-year expiration. For mobile apps, this is randomly generated for each particular instance of an application install.
You might consider seeing if you cant figure out how to assign a Uid and send that around between the web and mobile apps Uid will override cid.
Cid and Uid are both used to denote specific users and sessions. So yes if it changes its a different session.

Can you implement google analytics with no domain binding?

We have a web service which is installed on different stations. Each has a different ip and domain. we want all of them to report to the same suite.
Can this be done?
The JavaScript tracker for Google Analytics can be used if you allow calls to the Google Servers, if you allow your clients to execute JS and either can set cookies or provide a client id in some other way (must not be personally identifiable data).
If you cannot use Javascript then you could still collect data via the measurement protocol, although this might require substantial development effort.
The domain setting in the Google Analytics interface does not affect data collection, it is used in the (soon to be removed) in-page analytics feature and as base url for the "open document" feature in the behavior reports.
Google Analytics does not collect by domain, but by property ID (UA-XXXXXXX-X), else cross-domain tracking would not be possible (it is actually a documented feature).
Cross domain tracking would be important if somebody could hop from one of your stations/domains to the other and you wanted this to be tracked as a single session. This does not seem to be your use case.
The only pitfall is that the reports display page paths, not full URIs. So if you have similar paths on all your stations the metrics for the page paths will be lumped together unless you do a breakdown by hostname. A common workaround is to add a filter to your data view that prepends the hostname to the path, or to provide custom paths in the first place.
But basically this is not a problem. If you do not need cross domain tracking you'll be okay if you dump the same tracking code in all your sites.

Can we use google analytics for Internal website?

I have an Intranet application which is accessible from within company firewall. To track some specific pages, I want to implement Google Analytics in my Intranet application. This application is accessible from outside only when user system has some specific certificate installed.
Is it possible to implement Google Analytics in my Intranet application?
Will this Google analytics work inside company firewall?
How Google analytics work i.e. what is the actual flow of google analytics?
Yes, Google analytics can be used for internal web applications too. Please visit this URL which will clear your doubts. If you click on the given link and able to access analytics.js file from your internal network you can use Google analytics for your internal applications protected from corporate firewall.
Please note that after implementation, tracking data would be available around 24 hours only. So, you need to wait for 24 hours first. Even if you are not able to view the tracking data, please visit this link. You will find the possible reasons behind not working your analytics code.
In order for Analytics to generate reports for your corporate intranet
usage, your corporate network must be able to reach the Analytics
JavaScript file (analytics.js).
...
Your intranet must also be accessible
through a fully qualified domain name such as
http:// intranet.example.com. The Analytics JavaScript won't work if
your intranet can only be accessed using a domain name that isn't
fully qualified, such as http:// intranet
Ref: https://support.google.com/analytics/answer/1009688?hl=en
In your example, if a person without the certificate you mentioned can still reach the domain (that is, there is a public DNS entry for the domain name) even if they get an 'access denied' or similar message, the tracking should still work.
Google Analytics is Software as a Service and runs on the Google Servers. If your clients cannot reach the Google server than you cannot send tracking data and Google Analytics will not show anything. You may need to adjust your firewall rules to let calls to the Analytics servers pass (are you that you want a third party javascript to send data from your intranet to the internet, though ? There might be legal ramifications, too, after all implementing a script basically means to hand control of the clients to a third party).
If the server for your intranet is connected to the internet you could collect all hits in a log and pipe this to Google Analytics.
However Google Analytics might not be the best choice. You most certainly do not need campaign data, you probably do not have ecommerce in your company and depending on your type of company geo data and technology data might not be relevant (after all you probably know what computers your employees use and where they are). And for a page counter a self hosted solution will do just as well.
Google Analytics requires that you place a script on each page you wish to track. Whenever a page with the script is loaded, the script runs and sends data to GA, so your users must be connected to the internet as well as the intranet for their usage statistics to register. One security issue to consider is the titles of your intranet's pages will be sent externally across the intranet, which your IT security may have an issue with.
For basic intranet analytics, I'd recommend starting with Piwik which is open source and installs on your server.
It will give you a lot of initial usage data and if your customer decides they want more, you can look into more sophisticated products.

Universal Analytics clientId vs userId

The docs describe the clientId as:
This anonymously identifies a particular user, device, or browser instance.
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid
It can be used to send server side hits to analytics while still tying them to a particular user.
There is also a feature in closed beta called userId, which you will be able to pass once a user has authenticated: https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id
userId is fairly self-explanatory. However, UA also allows you to pass your own clientid if you choose to. For developing CRM type tools, can one just associate the clientid with a user in the same way that you would with a userid? The goal is primarily to be able to track offline interactions and connect them with visitors in Analytics.
maembe,
clientID is a random number generated by Google Analytics, and keep in mind it's always required and its value should always be a random UUID (version 4) (you could technically use your own, but I am not sure how practical and reliable this would be). Most importantly, you can easily access it with predefined get function (see documentation).
For your needs, this is exactly what you should do -- if someone sings ups, store ClientID in your CRM and then if there is any offline purchase, record the transactions with measurement protocol using the stored clientID. Google Analytics will then make the link (attribution) with that visitor and you will see this in your reports. Also, take advantage of newly available custom metrics and dimensions which can store pretty much anything you want (think of customer segmentation etc.). Beware of storing PII though.
Hope this helps :)
I am curious how UserID is going to work, it might change everything, but for now, I wouldn't rely on it as there is very little information available.
This Analytics support page now states the differences between Client ID and User ID - https://support.google.com/analytics/answer/6205850?hl=en#clientid-userid
Essentially client IDs represent unauthenticated users, and are automatically randomly generated.
User IDs represent authenticated users, and must be set manually.
It's worth noting that user IDs cannot be things like an email address, or other data that would allow Google to identify the user
You will not upload any data that allows Google to personally identify an individual (such as certain names, Social Security Numbers, email addresses, or any similar data), or data that permanently identifies a particular device (such as a unique device identifier if such an identifier cannot be reset).
If you upload any data that allows Google to personally identify an individual, your Google Analytics account can be terminated, and you may lose your Google Analytics data.
Taken from: https://developers.google.com/analytics/devguides/collection/protocol/policy
I'd imagine User ID is designed to differentiate the behavior of an authenticated user. here

Can I anonymize IPs in Google Analytics and still track unique visitors?

I am most interested in an answer for Android, though it would be great to know if the answer is generalizable to websites, iOS, etc. Can I anonymize IPs (using setAnonymizeIp()) in Google Analytics and still track unique visitors? I understand Google Analytics uses cookies for websites, and so I thought it might be possible (or perhaps even automatic).
Yes. The only effect that the anonymizeIp function is that it instructs Google to remove the last octet of the IP address from it's logs.
So, if your user's IP is:
123.45.678.90
And you run this function, Google will store it as:
123.45.678.XX
The only practical effect is that this results in less accurate Geographic reporting, but that's it. It won't affect counts of unique visitors in any way, and is totally unrelated to how GA tracks unique visitors, since Google Analytics does not rely on IP addresses for unique visitor identification. For websites, maintaining unique user identification is done by the Google Analytics cookies. In this specific case, the Google Analytics Android SDK handles the user session management for you using a local storage mechanism analogous to cookies.
I dont know if the accepted answer is correct. I've enabled setAnonymizeIp myself on my app, and it had a huge effect on my analytics results.
Pages/visit shot up.
Visits halfed.
Avg time on site shot up.
Ip address is not the value used to identify a unique visitor/user on Google Analytics, so it shouldn't be an issue. Analytics uses a unique identifier in a cookie or mobile app data so attach to all of the user's hits in order to identify as a unique visitor, so I don't see a reason why ip masking should affect it.

Resources