Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.