[Google Analytics Plugin] Generated traffic

Forge Component
Published on 2017-10-26 by Experts
9 votes
Published on 2017-10-26 by Experts

Hi there,

I want to all traffic from my application to go through our main server and using this component the traffic goes through http://www.myserver.com/myapp (dummy) and http://www.google.com (dummy). Is it possible to put de javascript code that enable tracking in my server and to use it on this component?

Thanks in advance.

Best regards

This was a great question. My initial guess was a big no, but app tracking and offline apps might have changed it. Unfortunately, it doesn't work as you wish.

Google Analytics works browser-side and the client must have a connection to Google. You can copy all the scripts invoked by the JS, but the backend code of Google is not replicable. The scripts would be useless. And if you proxy it, the information will be of the proxy server/account, not of the user.

Here is the info from Google itself:

Company intranet

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). Try loading the file in your browser using the following link:


If you can reach this URL from your internal network, you can use Analytics to collect data from your intranet. 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.

PS: The app tracking works offline, but when the device goes online it syncs everything with the current timestamp. So, it works but is not perfect. And it still needs a connection.