Google Analytics API seamlessly blends the simplicity of data analysis with powerful insights. Connect with Google's Analytics API to create custom reporting tools, automate data retrieval, synchronize information across platforms, and visualize your analytics data in Superblocks.
Setting up Google Analytics
Create an access token
- Sign in to your Google account to access your account
- Visit the Google Developer Console by navigating to it
- Create a new project by starting one or selecting an existing one
- Enable the Google Analytics API within your project
- Create API credentials for your project to receive a client ID and client secret
- Configure the OAuth consent screen with the necessary details
- Specify the redirect URIs where users will be redirected after authentication when configuring Redirect URIs
- Specify the scopes required for your use-case
- Login with your Google Account on the integrations page if you want to use one account for all end-users
Learn more about Google Analytics API Authentication.
Once you have an access token, you're ready to set up your Superblocks integration.
- In the web app, navigate to the Integrations page
- Click on the Google Analytics tile
- Name the integration
- Paste your credentials into the relevant fields
- Optionally, add more configurations to set credentials for different environments
- Click Create
Use Google Analytics in APIs
Once your Google Analytics integration is created, you can start creating steps in Application backend APIs, Workflows, and Scheduled Jobs to call Google Analytics API actions. Google Analytics actions are REST requests. To learn more about REST requests in Superblocks, see the Building REST requests guide.
Get analytics data for a viewReturns Analytics data for a view (profile).
Get Multi-Channel Funnels dataReturns Analytics Multi-Channel Funnels data for a view (profile).
Get real time data for a viewReturns real time data for a view (profile).
List account summariesLists account summaries (lightweight tree comprised of accounts/properties/profiles) to which the user has access.
List accessible accountsLists all accounts to which the user has access.
List account-user linksLists account-user links for a given account.
Add a new user to an accountAdds a new user to the given account.
Update permissions for a userUpdates permissions for an existing user on the given account.
Remove a userRemoves a user from the given account.
List all filtersLists all filters for an account
Create a filterCreate a new filter.
List accessible filtersReturns filters to which the user has access.
Update a filter (put)Updates an existing filter.
Update a filter (patch)Updates an existing filter. This method supports patch semantics.
Delete a filterDelete a filter.
Generic HTTP Request
Every SaaS integration in Superblocks comes with a built in Generic HTTP Request Action. This is a powerful action you can use to call Google Analytics API endpoints not in the Superblocks supported actions.
To use this action simply add the method, path, required query parameters, and body for the desired endpoint.
Learn more about REST requests in Superblocks in our Building REST requests guide.
Generic HTTP Requests use the authentication set up and base URL you've configured for your integration, making it an easy for your team to extend Superblocks Integrations to meet their needs.