Creating Google Service Account
This article goes into the details of how to set up a Google Analytics service account in Smaply and offers step-by-step instructions to do so.
Last updated
This article goes into the details of how to set up a Google Analytics service account in Smaply and offers step-by-step instructions to do so.
Last updated
A service account acts as a virtual user for your application, allowing secure, programmatic access to Google Analytics data without using personal credentials.
Go to the Google Cloud Console:
Click on "Select a project" > "New Project"
Enter a project name and click "Create"
Give it a sensible name like "Smaply-GA"
In your Google Cloud project, go to "APIs & Services" > "Library"
Search for "Google Analytics Data API"
Click on the API and then click "Enable"
Do the same for the Google Analytics Admin API
Important: Enabling the API is crucial for accessing GA4 data. Make sure you've completed this step before proceeding.
In the , navigate to "IAM & Admin" > "Service Accounts"
Click "Create Service Account"
Enter a name and description for your service account
Click "Create and Continue"
In the "Service account permissions" section, add the following role:
"Viewer" (for read-only access) or "Editor" (for read-write access)
Click "Continue" and then "Done"
Security Tip: Always follow the principle of least privilege. Grant only the permissions necessary for your intended use case.
Find your newly created service account in the list
Click on the service account name
Go to the "Keys" tab
Click "Add Key" > "Create new key"
Choose "JSON" as the key type
Click "Create" to download the key file
Navigate to Admin > Property > Property Access Management
Click the "+" button to add a new user
Enter the service account email address (found in the key file or service account details)
Assign the appropriate role (e.g., Viewer or Editor)
Click "Add" to save the changes
If you encounter issues during the OAuth process or property verification:
No properties available: Ensure your Google account has access to at least one Google Analytics property
Insufficient permissions: Check your access level in Google Analytics. You need at least "Read & Analyze" permissions for the properties you want to integrate