While the GA API documentation mostly deals with the version of the parameters found in URL strings and not the version needed if you are using the Easy Dashboard. Here are some examples that worked in the format for the easy dashboard API (gadash-1.0.js). One of my big sticking points was the filters. I was not sure from the docs what the syntax was and a lot of the first things I tried resulted in errors.
Here is a working example of a "base" query for a chart on my page (this query will be used to draw two charts)
On Sunday, April 22, 2012 7:03:27 PM UTC-7, The Columbian wrote:
I am using the API through a dashboard (Thanks Nick) and replicating some existing GA reports VIA the API.
Almost all of the reports were created in GA VIA the content drilldown and I understand that the metric: ga.PagePath is supposed to allow me to reach the same data. I am uncertain of the verbiage to use. I have tried a few things but need an example to work from. I have created the reports in GA and made them into widgets on my GA dashboard> The metric is pageviews and the dimensions listed are page path level 1 exactly matching /news/ and page path level 2 exactly matching /sports/
The URL of the report page has the following verbiage: pagePathLevel1%3A%2Fnews%2F%2Canalytics.pagePathLevel2%3A%2Fsports%2F/ I have tried ga:pagePathLevel1 and 2 with no results.
Problem is in the reference, I don't see a dimension named either of those, only ga:pagePath with no example or idea how to specify. I can use a filter and a regular expression but I was hoping that I could do this report/s in a more straightforward way since the API and the GA web interface talk to the same data.
On Tuesday, January 31, 2012 1:41:47 PM UTC-8, Sean Colombo wrote:
In the interim, I was able to just write a screenscraper to log in to
GA and export the report to a CSV, but since the recent changes to
GA's interface, this is proving to be quite tricky.
Does anyone have a solution for getting Content Drilldown data,
preferably via the API?
Any plans to add the ability to get Content Drilldown data via the
It appears that crafting a request for ga:pagePath only returns
page URLs and not the custom data that can be made to show up in the
Content Drilldown section of the web ui. The data I'm referring to
(that isn't showing up in the Data Feed Query Explorer) was added
Querying for ga:pagePath and filtering with
is not getting any results.
Is there a way to access this with the API that I'm just missing?
- Sean "