google-analytics-api

google analytics event not recorded by GA

On a given page, in addition to normal GA call, I am making an event call, and what we call a "phantom URL" call. The normal call seems to be recorded in GA, I can run a report on it, but neither event call, nor a "phaontom url" call are recorded. Here's the javascript that I place on the page <!-- analytics events --><script ty...

Track Hits using Google Analytics and an ASP.NET web handler (ASHX) page.

We are using Google Analytics for our site, but since it uses client script in HTML output we are unable to track hits to any of our ASP.NET ASHX handler pages. Does anyone know of a way to do this? ...

Using google analytics as a generalized stats store for my web app

Hi, I'm looking at using google analytics with my web app. I have a few questions about scalability and data retrieval. I'd use it like this: function userBuildsFarm() { ga.track("farm", "build", userid); } function userHarvestFarm() { qa.track("farm", "harvest", userid); } my questions: If I have really high traffic, the ...

Google Analytics _setCustomVar problem

Hello, I'm trying to set a custom variable in my Google Analytics tracking for a very rough form of split testing. The code I'm using at the end of my 'head' section is var _gaq = _gaq || []; _gaq.push( ['_setAccount', 'UA-xxxxxx-xx'], ['_setCustomVar', 1, 'split', '1', 2], [...

Getting Event data from Google Analytics

Hi All, I put some tracking code on my website which had events everytime I click some button on my website. I got all these data in the google analytics website. Now I am trying to get this data through the GA Data export API's. I looked at what metrics I can query on in this link http://code.google.com/apis/analytics/docs/gdata/gdata...

Google Analytics API: Get those goals

Hi All, I'm a bit in a timestretch here but i'm looking for a solution for this the whole day and after so much wasted time, i'm still not near a solution. I got the google analytics API to work and i'm able to query all kinds of interresting stuff using the dimensions and metrics found here: http://code.google.com/apis/analytics/docs/...

Can Google Analytics API do: after looking at /faq.html, which pages did the users go to most often?

using the Google Analytics Data Export API with http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html I put inpagePath and nextPagePath for dimensions, and pageViews for metrics, and filter for ga:pagePath=~faq.html But it returned a table with pagePath equal to nextPagePath which is the faq.html path. Is there a way t...

Why do Web Analytics such as Google Analytics use Dimensions and Metrics instead of SQL statement?

Just when I get quite familiar with SQL statements once again, when pulling data from Google Analytics, I found that they don't use SQL, but rather, use Dimensions and Metrics and the combinations of them. Why is a reason for that? I think it doesn't have a SQL interface (or a plain web server log download)? If so, how do SQL statemen...

Google Analytics: why nextPagePath the same as pagePath when looking for where do users go after faq.html

On http://code.google.com/apis/analytics/docs/gdata/gdataReferenceCommonCalculations.html#navigation The "nagviation section", it is said that, to find Which pages are users going to after test.html? We can use: dimensions=ga:nextPagePath metrics=ga:pageviews filters=ga:previousPagePath%3D~test.html I also tried using dimens...

Using $this when not in object context error

Hello, I'm getting a fatal PHP error when trying to execute my script: Using $this when not in object context The script collects data from Google Analytics via API, then displays it on a page. Below is the piece of code where the script dies: $records = $this->getAnalyticRecords ( date ( 'Y-m-d', $startTime ), date ( 'Y-m-d', $endEnd ...

Can Google Analytics show me visits by hour?

I am interested in seeing visits on my site broken down by hour - is there any way to generate a report of this in Google Analytics? It appears that all metrics are only broken down by day. Maybe I can get this information through the GA API? ...

Have you done interesting things with the Google Analytics API?

I haven't heard many stories about cool things built with the Google Analytics API. Care to share your stories? ...

Please help with Google AOuth authentification in C#. Fails to exchange authorised request token for an access token.

The code fails to "Upgrade to Access Token" but fully matches the AOuth Playground requests. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using System.Security.Cryptography; using System.Net; namespace TestGAOuth { class Program { const string OAuthGetReq...

How to retreive exact user-agent string from Google Analytics

Good day! 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/g...

Can I find the most popular keyword for a particular page using the google analytics api?

I was hoping to to use the analytics api to find out the most popular search terms (organic) that lead to a particular page. Is this possible? I've trawled the documentation and found this which looks as if it outlines all possible data I can retrieve from the API and I can't see this information here. http://code.google.com/apis/anal...

How can I report custom events by visitor in Google Analytics

We use custom event tracking in our web application with Google Analytics to report user's behavior (for example - user clicks on key actions, client side errors, time measurements, etc.) Each time the Google Analytics code is run on the client, we set a custom variable at the Visitor session to set the actual username of the user. How ...