Google Spreadsheet GA Query Exporter
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

View only
 
 
ABCDEFG
1
Google Spreadsheet GA Query ExporterCC-BY mhawksey
2
3
ids= ga:44332186
4
dimensions=ga:pageTitle,ga:pagePath
5
metrics=ga:visits
6
segment=
7
filters=ga:hostname=~^mashe
8
sort=-ga:visits
9
start-date=2015-05-01
10
end-date=2015-05-29
11
start-index=
12
max-results=25
13
sheet-name=top-posts
14
Build/View in GA Query Explorer
15
2015-04-01: Your query matched 25 results written to the 'top-posts' sheet
16
17
Instructions
18
1. File > Make a copy of this spreadsheet (need to be logged in)

2. Open Tools > Script editor and then:
     File > Upgrade authorisation experience;
     Once it's upgraded still in the Script editor click Resources > Use Google's APIs; and
     Click the 'Google API Console' link at the bottom of the dialog window;

3. In the Google Apis Console switch the Analytics API 'on' and read/accept the terms (you may have to accept two seperate terms windows)

4. Close the Google Apis Console window and OK the Google API Services window in the Script editor

5. Before closing the Script editor Run > authoriseGA to authenticate script

Once authenticated there are a number of ways to run the script. You can enter a query and click 'Get data' for one off fetches or open Tools > Script editor and modify the example cron jobs to automate collection and distribution of data (the cron jobs allow functionality that includes emailing/sharing links to csv files)

To create multiple queries in the same spreadsheet duplicate this sheet and modify the query

Tip: You can use formula to build the start and end dates e.g. yesterday is =(TODAY())-1
19
Loading...
Main menu