Google Analytics GA4
Connect to your users' Google Analytics GA4 accounts.
Setup Guide
You can find your Google app credentials by visiting your Google Cloud Console dashboard.
You'll need the following information to set up your Google App with Paragon Connect:
Client ID
Client Secret
Scopes Requested
Note: You'll need to create a new project in Google Cloud Console if you don't already have one.
Add the Redirect URL to your Google app
Paragon provides a redirect URL to send information to your Google app. To add the redirect URL to your Google app:
1. Copy the link under "Redirect URL" in your integration settings in Paragon. The Redirect URL is:
2. In your Google Cloud Console dashboard, navigate to APIs & Services > Credentials in the sidebar.
3. Press "+ Create Credentials", then select OAuth client ID.
4. Select "Web application" from the Application type drop-down menu.
Note: You'll need to configure Google's consent screen for access to Client ID and Client Secret if you haven't already.
5. Under Authorized redirect URIs, press the "+ Add URI" button.
6. Paste-in the redirect URL from Paragon.
7. Press the blue "Create" button.
Google provides you with the Client ID and Client Secret needed for the next steps after adding the redirect URL to your project.
Enable Google Analytics API in Google Cloud Console Dashboard
1. In your Google Cloud Console dashboard, navigate to APIs & Services > Library in the sidebar.
2. Search for "Google Analytics Data API" from the API Library.
3. Select the "Google Analytics Data API".
4. Press the blue "Enable" button to enable the API for your application.
![](https://docs-prod.useparagon.com/~gitbook/image?url=https%3A%2F%2F2053411491-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MCJwlyhqtCdBfCLUO0d-1223115691%252Fuploads%252FL6dUFUqxa2NFDyxbNbqV%252FEnabling%2520Google%2520Analytics%2520Data%2520API.png%3Falt%3Dmedia%26token%3D62c37163-600e-4af0-bb09-e88232577267&width=768&dpr=4&quality=100&sign=9d88431a&sv=1)
Add your Google app to Paragon
1. Select Google Analytics GA4 from the Integrations Catalog.
2. Under Integrations > Connected Integrations > {YOUR_APP} > Settings, fill out your credentials from the end of Step 1 in their respective sections:
Client ID: Found at the end of Step 1.
Client Secret: Found at the end of Step 1.
Permissions: Select the scopes you've requested for your application. They should begin with
analytics
.
Press the blue "Connect" button to save your credentials.
Note: Leaving the Client ID and Client Secret blank will use Paragon development keys.
![](https://docs-prod.useparagon.com/~gitbook/image?url=https%3A%2F%2F2053411491-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MCJwlyhqtCdBfCLUO0d-1223115691%252Fuploads%252FpTSIS4MdpLdeH4aXeChS%252FConnecting%2520your%2520Google%2520Analytics%2520GA4%2520app%2520to%2520Paragon%2520Connect.png%3Falt%3Dmedia%26token%3D6a17e241-2f05-41d4-8040-9dd5aefe53e8&width=768&dpr=4&quality=100&sign=1b981c2d&sv=1)
Connecting to Google Analytics
Once your users have connected their Google Analytics account, you can use the Paragon SDK to access the Google Analytics API on behalf of connected users.
See the Google Analytics REST API documentation for their full API reference.
Any Google Analytics API endpoints can be accessed with the Paragon SDK as shown in this example.
Building Google Analytics GA4 workflows
Once your Google Analytics GA4 account is connected, you use the Google Analytics GA4 Request step to access any of Google Analytics GA4 API endpoints without the authentication piece.
When creating or updating records in Google Analytics GA4, you can reference data from previous steps by typing {{
to invoke the variable menu.
Publishing your Google Analytics GA4 application
Setting up a Redirect Page in your app
Your Google Analytics GA4 integration requires a Redirect Page hosted in your application to support verification of your application by Google.
The Redirect Page should be implemented as follows:
Receives a
GET
request with a number of query parameters.Redirect to
https://passport.useparagon.com/oauth
with the same query parameters.
Updating the allowed Redirect URL
If you were previously testing with https://passport.useparagon.com/oauth
as your Google Analytics GA4 Redirect URL, you will need to update this value after implementing a Redirect Page:
Log into your Google Cloud Console dashboard and select your application.
Navigate to APIs & Services > Credentials and select the credentials you use with Paragon.
Under Authorized redirect URIs, provide the URL of your Redirect Page.
Last updated