Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@doryokujin
Created April 11, 2017 07:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doryokujin/100a921646703d4a9067a6d780326b56 to your computer and use it in GitHub Desktop.
Save doryokujin/100a921646703d4a9067a6d780326b56 to your computer and use it in GitHub Desktop.
in:
type: google_analytics
json_key_content: |
{
// from Google API Service Account's Private Key
"type": "service_account",
"project_id": "ga-to-td",
"private_key_id": "18f4c*****",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgI*****",
...
}
view_id: ***** // view id
start_date: "2001-01-01"
end_date: "2016-09-01"
time_series: "ga:dateHour"
// dimension & metrics
dimensions:
- "ga:cohort"
- "ga:cohortNthWeek"
metrics:
- "ga:cohortTotalUsersWithLifetimeCriteria"
- "ga:cohortRevenuePerUser"
cohortGroup:
{
"cohorts":
[
{
"name": "cohort 1",
"type": "FIRST_VISIT_DATE",
"dateRange":
{
"startDate": "2015-08-01",
"endDate": "2015-08-01"
}
},
{
"name": "cohort 2",
"type": "FIRST_VISIT_DATE",
"dateRange":
{
"startDate": "2015-07-01",
"endDate": "2015-07-01"
}
}
]
}
out:
mode: append
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment