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.
Related
I have used Amplitude analytics in the past in my react Web app to send event data. However I just started with Google Tag Manager and noticed it does not run because being blocked by adBlockers. Amplitude was always functional because I loaded their Javascript SDK through NPM install 'github:amplitude/Amplitude-Javascript' and initialized it at app load with client API key. I like the approach of Google Tag manager where I dont have redeploy app to make changes to my analytics logic. How can I take a similar approach to avoiding being blocked by adblockers.
It may very well be that Google products are popular so Adblock specifically just block google analytics products not other analytics products.
You don't. If people don't want to be tracked, that is their decision. You should not be forcing people to provide you with any data they do not want to provide. Especially by using some shady "bypassing" measures. Instead-
You could use a cookie to permanently disable your tracking of those who do not wish to be tracked, to help you preserve reliable analytics. See: http://www.multiminds.eu/2016/05/19/how-to-disable-tracking-via-google-tag-manager/
Or, better yet, simply measure the percentage of visitors who have disabled tracking so your analytical data can remain accurate. See: https://marthijnhoiting.com/detect-if-someone-is-blocking-google-analytics-or-google-tag-manager/
Yes, it's possible.
You can use reverse proxy for Google Tag Manager.
First, download the Google Analytics JavaScript library itself and host it on your server.
Then alter the code in the downloaded library to change the target host from www.google-analytics.com to your own domain name using find-replace.
Replace the link from the default Google Analytics script in your codebase to modified one.
Create a proxy endpoint to Google Analytics servers on your back end. One important step here is to additionally detect the client’s IP address and write it explicitly in requests to Google Analytics servers to preserve correct location detection.
Test the results. You’re done!
more detail info on freecodecamp.org/news/save-your-analytics-from-content-blockers and https://analytics-bypassing-adblockers.netlify.com
There's dataunlocker.com as well as some other open source alternatives (1, 2) which can help to fix reporting accuracy of Google Tag Manager, Amplitude, Google Analytics etc.
Talking about ethics and privacy, tools like DataUnlocker are just tools which allow you to bypass ad blockers as if you have implemented server-side analytics. I think by correctly implementing that "we use cookies" consent one can solve any privacy concerns.
I've managed to get around some blockers with the following in a node app:
var request = require('request');
app.get('/proxy*', function(req,res) {
const newurl = req.url.split('/proxy/')[1];
const data = request(newurl);
//data.on('response', function(response){console.log(JSON.stringify(response))});
data.pipe(res);
});
Then in your snippets for GTM prepend: "/proxy/" in the url and now the call goes via your server.
The caveat with the above is that without additional code you can't preview the container, but the container does load correctly. Lack of preview is a different issue to deal with.
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.
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.
I need a way to remove my own traffic and interaction from my Google Analytics.
I know of all the IP and cookie based solutions but IPs can change and cookies can be erased.
One thing I did think of is that I'm always logged into my Google account and I'm always using Chrome. Is there any way to use this to my advantage? It would be really nice if I could just ignore based on my Google Account.
Browser Extensions
Use a browser extension to prevent you from being tracked on analytics. I use the Block Yourself From Analytics extensions because it allows you to configure the sites you want to prevent traffic on.
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.