Docs
Search…
Google Analytics

  1. 1.
    Open the Service accounts page. If prompted, select a project.
  2. 2.
    Click Create service account.
  3. 3.
    In the Create service account window, type a name for the service account, and select Furnish a new private key. When prompted, select JSON key file type. Then click Create.
Your new public/private key pair is generated and downloaded to your machine; it serves as the only copy of this key. You are responsible for storing it securely.

You will need to enable “Analytics API” for your Google Cloud project.

The newly created service account will have an email address that looks similar to: [email protected] Use this email address to add a user to the Google analytics view you want to access via the API. For LogicLoop only Read & Analyze permissions are needed.

Create datasource of “Google Analytics” type with the JSON file generated in the “Create a Service Account” step.

Google Analytics uses JSON document-style queries. You can get an idea of possible field types and dimensions using the Query Explorer tool. Once you’ve imported data into LogicLoop, you can use the Query Results Data Source to examine the output with SQL syntax.

{
"ids": "ga:97038718",
"start_date": "30daysAgo",
"end_date": "yesterday",
"metrics": "ga:newUsers",
"dimensions": "ga:country",
"max_results": 10,
"sort": "-ga:newUsers"
}
{
"ids": "ga:97038718",
"start_date": "30daysAgo",
"end_date": "yesterday",
"metrics": "ga:newUsers",
"dimensions": "ga:date",
"sort": "-ga:newUsers"
}
Copy link
On this page
Queries
Example Queries