Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve exact user-agent string from Google Analytics

We have an interesting 'bug' in our JS code that only fires when a user agent has a specific combination of parameters -- specifically when IE8 sends both Trident/4.0 and MSIE 6.0;

We have checked the GA export data; it appears to export only the pre-digested browser information: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html#browser.

Forum post 87919 on forums.digitalpoint.com (link removed since I'm a n00b) refers to pulling a cross-segment report for more detail; however, that no longer appears to be on the GA front end interface.

Why do we need this instead of just fixing it? If it turns out it only impacts a few users, we can schedule the fix later in the cycle; if it's impacting 20% of our base, it becomes far sooner to fix.

So, the question - how can we pull a specific User Agent string from GA; pull all UA strings from GA or run a Regex against GA to get a count of a matching UA string?

We're also working with the SA team to enable UA logging on the apache level (very high volume website; logging is turned way down).

like image 457
Will England Avatar asked Oct 01 '10 21:10

Will England


People also ask

How do I find the user agent in Google Analytics?

Visit any website and open your browser's developer tools. Navigate to the console and type in navigator. userAgent to return the full UA string.

Where is the user agent string?

The User-Agent (UA) string is contained in the HTTP headers and is intended to identify devices requesting online content. The User-Agent tells the server what the visiting device is (among many other things) and this information can be used to determine what content to return.

What is a user agent string?

A user agent is a piece of software that acts on behalf of a user, such as a web browser. A user agent string however is sent as an HTTP request header by the browser and identifies which operating system is being used, the browser version, and other information which is provided to the web server.

What does a user agent string contain?

A User Agent (UA) string is a type of HTTP header request that contains information on the device. For example, if you browse the web on your smartphone, your device will send a HTTP request header to the web server, saying that it is a mobile device.


1 Answers

The best you're going to get out of the Data Export API (or the Google Analytics interface) is processed information: browser / browser version (Internet Explorer / 8.0). There is no way to get the original user-agent string.

Also note that if you have a high volume website you're going to run into data sampling especially if you're looking at a date range beyond larger than a day or two (more on sampling).

like image 54
luciddreamz Avatar answered Sep 20 '22 18:09

luciddreamz