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.
Related
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.
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.
I have some problems with the google analytics not working on production, I have made some fixes and used some plugins to check that the information sent to google is ok, but the problem is I cannot test properly on my sandbox since I do not have the credentials for the analytics account used on production instance. I will not have access to that account and I do not want to create a dummy account linked to my sandbox because I cannot have my sandbox address indexed by google. Is there any way to install a local server that emulates GA? Or a way to create a GA account and prevent it from indexing my sandbox address? I have found the urchin software that would have given me the possibility to install a local sandbox, but this was discontinued by google and I was not able to find it anywhere.
If by "indexing" you mean "becoming a part of the Google search index an appearing in result pages", that is not in any way related to analytics. If you have a problem that your pages Urls show up in GA (which really is the whole point of Analytics) you can programmatically pass dummy urls to the tracker:
ga('send', {
'hitType': 'pageview',
'page': '/home' // pass a virtual adress here per page
});
That way your sites structure will not be recognizable in GA (however this will make testing more difficult).
If at all possible you should have Google Tag Manager installed on the live page. GTM has a preview mode that allows you to directly in the live site without affecting other users (tags are only visible to visitors with the preview cookie).
As for emulating locally, no, not really. If you still use asynchronous tracking (ga.js) you can use setlocalGifPath and _setLocalServerMode to have the tracking data send to your own server, but that will not give you the interface - it just means you can create a log file with the google parameters that you have to parse yourself.
Universal Analytics does not (to my knowledge) have corresponding methods (they are a remnant from urchin days when people wanted to reprocess their data locally. As you've said urchin is now defunct and it would have been too expensive for a bit of local testing in any case).
I need to track an intranet site's traffic and would prefer to use Google Analytics because we have several other properties already being tracked there.
Google Analytics requires a public address to set up a new property for tracking. If I create a subdomain (intranet.domain.com) to satisfy that requirement, I believe the rest should work fine. (External .js file for Google is outbound-reachable from within our network, inbound-external access is blocked to protect confidential information.)
Does anyone have experience with this situation? Can you confirm the
proposed method will work?
Will the new tracking code work from any URL, regardless of the registered property address?
Thanks!
Google Analytics records data via parameters on tracking pixel requests. You need to make sure that requests for google-analytics.com/__utm.gif will go through from your intranet. (I'm guessing it shouldn't be an issue since you said google-analytics.com/ga.js is not blocked.)
It's also not a problem using the web property ID ('UA-xxxxx-x') on different domains than it was originally created for.
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.