track visits from nonbrowser application using google analytics - google-analytics

is it possible use google analytics to track visits from nonbrowser application? will ga be able to recognize custom user agents or other http headers? Anyone has experience in this area? thanks!

No. Only browsers execute Javascript, which is required for Google Analytics tracking. To track robots, you need to get server side logs. AWStats is a good tool for parsing Apache logs, allowing you to track robots and such.

Related

Trying to figure out why Google Analyics report more users than our own stack

Comparison is between the Google Analytics script and a "chat widget" loaded in a iframe on the onload event. The iframe is not loaded if the useragentlooks like a crawler. The code in the iframe creates a websocket connection and then a user is upserted in our backend.
I'm looking at one website where we currently get around 2/3 of new users reported by Google Analytics as users in our backend.
With the new Google Analytics UI, it's not clear to me how much crawlers are actually filtered or not (e.g. is Google Analytics always filtering Google Crawler?). That could explain a lot.
Our "tracking id" is saved in localstorage which is a bit more persistent than a cookie, but I can't see it making a big difference.
The extra loading time and the websocket connection can probably explain a bit (old browsers that don't support TLS 1.2, baldy configured proxies, etc) can explain some of it, but 1/3 seems big.
Any insights in Google Analytics metrics or other ideas are welcome.
Bot traffic in Google Analytics is not filtered by default. You can enable it in View Settings.
Also it's possible to pass User Agent strings into Google Analytics as a custom dimension and then create filter to exclude sessions based on User Agents that you know to be bots.
https://www.lunametrics.com/blog/2015/04/01/eliminating-bot-traffic-from-google-analytics-once-and-for-all/
The second reason of difference may be that GA tracker fires when page starts to load, but "chat widget" when window is loaded. Some bounced sessions (and users) are counted by GA, but not counted by "chat widget".

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.

Google analytics tracking Http Https

I have a website with http and https access. (http://www.mywebsite.com, https://www.mywebsite.com)
Also, I have another website under https://www.mywebsite.com/myapplication
I need to set up Google analytics tracking for these websites.
Can I go along with a one tracking code?
Or do I have to get 3 tracking codes (as the analytics)?
Yes you can use one tracking code, the host doesn't matter, just make sure you're using Universal Analytics and not Classic Analytics.
The best test is to try it for yourself and see that you get hits correctly from both hosts.

Is there a way to track/record via Google Analytics visitors that visit my site via Flipboard?

I've been sniffing through my Apache log files and noticed hits which mention
FlipboardProxy/1.1; +http://flipboard.com/browserproxy
Is there a way to track/ID these users via Google Analytics so that I can understand what percentage of my visits are via Flipboard?
From what i read on flipboard:
Flipboard uses a proxy service to fetch, validate, and prepare certain
elements of websites for presentation through the Flipboard
Application.
Retrieving parts of your website to present it in flipboar, they are not actually real visits to your site.
But if you still want to track those requests in analytics then you would need to write a php that sniffs user agent and trigger a gif request to analytics.
IF they're not showing up in the Browser & OS Report; they're probably not running javascript and/or block GA.
Something along those lines might end up here. Right now it shows data at a snapshot only though.
http://ripl.io/flipboard-analytics/

Is Google Analytics Secure to Track Business Application Usage?

I have recently been required to implement some Usage Tracking to a web-based Business Application. Basically what needs to be tracked is what pages in the application are being used and for how long users stay on those pages. The application is hosted on the internet and is HTML/JavaScript.
I could use Google Analytics to track page views, visits and browser capabilities, but is it secure enough to use for business applications?
Does anyone else use Google Analytics to track web-based business application usage? Or do you have some thoughts on this?
Also, I couldn't find anything from Google specifically stating whether this is a good or bad thing to do.
It depends what you want to be secure.
Gathered data, if you trust Google, is pretty secure.
However, Analytics data can be tampered with. Someone can read your Analytics ID from page source (or HTTP traffic) and submit fake pageviews, events, change custom variables, etc.

Resources