Skip to main content

Set Up Google Analytics 4 for Use with Agility

Step-by-step setup guide for GA4 access and credential generation

Updated this week

This article provides an in-depth walkthrough of how to configure your Google Analytics 4 (GA4) property for use with Agility PR Solutions. It includes all steps for checking access, enabling APIs, and generating service account credentials.

Use this guide if you are the technical admin or Google Analytics account owner responsible for setting up GA4 access for reporting integration.


🔹Ensure You Have a GA4 Property

  1. Log into Google Analytics with your analytics-enabled Google account and you should see this screen.

2. Click the gear icon labeled Admin in the lower-left corner. The resulting page will look similar to this.

3. Ensure you have:

  • An Analytics Account

  • A GA4 Property listed in the center column

  • A Property ID shown in brackets beside the property name

If these are missing, ask the person who set up the analytics account to create a GA4 property and grant you access.


🔹 Create a Service Account

2. From the left-hand panel, click Service Accounts

If no service account exists or credentials are missing, you can create a new one:

3. Click + CREATE SERVICE ACCOUNT at the top of the screen

4. Fill in the Service Account name field, the ID will automatically populate based on the name, and add a description to the account. An idea could be “Service Account for Accessing GA4 Data”, but it can be whatever is wanted. Click “CREATE AND CONTINUE”

5. Click Create and Continue

6. In the Select a Role dropdown, choose:

  • Basic > Viewer (sufficient for reporting access)

    Click Continue.

7. Under Service account admins role, enter your Google email address

8. Click Done. Once the service account is created, it should return you to the Service accounts page.

9. Take note and copy the service account email address because it will be required later.


🔹 Generate the JSON Credentials Key

  1. After account creation, click on the service account email address. The page should now look like this:

  2. Navigate to the KEYS tab

  3. Click Add Key > Create new key

  4. In the popup, ensure JSON is selected.

  5. Click Create.

The JSON key file will download to your device.

✅ Store this file securely. It can only be downloaded once.


🔹 Enable Required Google APIs

You must activate the following two APIs in your project:

  1. Google Analytics Data API

    The page should look like this, keeping in mind the “MANAGE” button may show “ENABLE”.

    Click the “ENABLE” button. It should now show “MANAGE”.

  2. Google Analytics Admin API

The page should look like this, keeping in mind the “MANAGE” button may show “ENABLE”.

Click the “ENABLE” button. It should now show “MANAGE”.

More info:


🔹 Grant GA4 Property Access to the Service Account

  1. Return to Google Analytics.

  2. Click the gear icon (Admin) in the lower left.

  3. Under your GA4 property, click Property Access Management.

    This screen is where the service account email will be added and the access level will be chosen for it. Redacted for sensitivity.

  4. Click the + icon > Add users.

  5. Enter the service account email.

  6. Assign the role: Viewer.

  7. Click Add

⏳ Permissions typically apply within minutes, but may take up to 1 hour.


🔹 Final Step: Option 1 - Share the Credentials Securely

Send the downloaded JSON key to your Agility implementation contact (e.g., via encrypted email if possible).

⚠️ Once sent, delete the email from your sent folder. Do not resend or share the file insecurely.

Make sure to keep a local, secure copy of the key in case future access or re-connection is needed.

🔹 Final Step: Option 2 - Upload the JSON key to Agility

  1. In Agility, go to Account > Content Management > Data Connections

  2. Click New Data Connection

  3. Upload the JSON key file

  4. Follow the prompts to complete the connection

Once connected, Agility can begin pulling GA4 web analytics into your reporting.


🔹Download PDF of instructions

Did this answer your question?