Increase Your Productivity with the API
September 14th, 2010 | Published in Google Analytics
Back in Episode 10 of Web Analytics TV, (32:00), Lisa C from Melbourne asked how to pull a trending report from Google Analytics for the top organic search landing pages. This was such a great question, that we wrote 2 articles and released sample code describing how you can automate retrieving this data from Google Analytics Data Export API. But first let’s look at the results.
Here is a graph plotting traffic to the top 100 landing pages for organic search for all of June for www.googlestore.com.
Let’s Analyze. This is the typical trend graph you can find across the Google Analytics web interface. By itself, all you can tell is that something happened during the spike. What you can’t figure out is which page actually increased in traffic; to do so would require lots more digging.
Now let’s try again. Here is a stacked area graph of each of the top 100 landing pages for organic search.
What actions might you take from these insights? Perhaps you should get your organic search keywords to send traffic to the blue page. Then, identify the keywords sending traffic to the green and orange page and see if you can increase traffic to other pages.
Exporting the Data from the web interface:
Anybody can pull this data from the Google Analytics web interface - but it's a bit of work. You create a custom report with landing pages and entrances. Then drill into each landing page, and export the data to a csv file. Finally you go through all csv files and compile them into a single file for analysis. Let’s illustrate:
Going through each report individually is a LOT of manual work, but we can automate all of this using the Data Export API, reducing hours of work into a few minutes!
Using the Data Export API to Automate
We mentioned we wrote two articles about the above graph. In the first article, we demonstrate how to use the Data Export API to automate the exact task above. A user specifies 1 query to determine the top landing pages. Then, for each landing page, a separate query is used to get the data over time.
This approach dramatically reduces the amount of quota required. In the best case, only 2 queries are required.