Target GA4 Audiences in SiteSpect

This article describes how you can use your existing Google Analytics 4 audiences to target customers in your SiteSpect campaigns. This is accomplished by pushing SiteSpect user GUIDs to Google Analytics and using the GA4's APIs to pull the SiteSpect GUIDs for a given GA4 audience and push those values to a SiteSpect audience, allowing you to target those users both server-side and client-side.

The Basic Steps:

  1. Set up API access for GA4 audience data
  2. Configure GA4 Integration in SiteSpect
  3. Build SiteSpect Campaigns, Metrics, and Global Variations to target your GA4 audiences

1) Set up API access for GA4 audience data

Create a project on Google Cloud Console

  1. Access the Google Cloud Platform console.
  2. Select an existing project or create a brand-new one

Activate GA4 API

  1. In the Google Cloud Platform interface, open the console left side menu and select APIs & services.
  2. On the left, click Library, search for the “Google Analytics Reporting API” and select it. Click Enable.
  3. Do the same for “Google Analytics API”

Create a Service Level account

  1. Still in Google Cloud Platform, navigate to IAM & Admin > Service Accounts
  2. Create Service Account using the link at the top of the page
  3. Fill in the name and description and select a viewer access
  4. Once the account is created, click on Keys
  5. Select Add key > Create new key
  6. Choose JSON format and click Create to generate the key
  7. The key will be downloaded to your computer. Save this file to send to the SiteSpect professional services team.

2) Configure GA4 Integration in SiteSpect

Push SiteSpect user GUIDs to GA4

In SiteSpect, follow the steps to configure WATTS for GA4 in a global variation, making sure to include the SiteSpect GUID macro in your configuration (__SS_GUID__)

Our professional services team is happy to set this up for you or help you with any questions.

Create new Audiences in SiteSpect for each of the GA4 audiences you want to use

  1. In the SiteSpect control panel, New > Data Set
  2. Give your data set a name and click save. You do not need to add records to your data set at this point, this is just a placeholder until the script manages the auto creation and updating of the dataset.
  3. Once saved, click on New > Audience
  4. Select SiteSpect User GUID for the audience type
  5. Give your audience a name, and include a description to help you remember the details of the audience criteria. Select your data set from the dropdown.
  6. Save your audience and make a note of the names and IDs

Configure your audiences to pull GUIDs from GA4

SiteSpect has a middleware engine that our professional services team will configure for each of your audiences. Once enabled, this integration will regularly update your SiteSpect audiences to reflect the current user GUIDs from your GA4 audiences.

Send your account team the following details:

  1. The site ID where you will use these audiences
  2. The name and IDs for each SiteSpect audience partnered with details of the corresponding GA4 audience
  3. The file that was downloaded when you created the Service Account Key. Please use a compression tool to secure this file with a password and send the package separately from its password.

3) Build SiteSpect Campaigns, Metrics, and Global Variations to target your GA4 audiences

Your new audiences can be used as a gatekeeper to control which users are assigned to a campaign. It can also be used as a trigger within a variation, metric, or global variation to apply changes, or measure metrics, only for specified users.

Use GA4 Audience as a campaign Audience

  1. Select your audience to include or exclude from your campaign
  2. Your audience will behave just like all other audiences and be evaluated on the first request of a new visit.
Using your GA4 audience as a campaign audience

Use GA4 Audience as a trigger

  1. You can use your audiences as a trigger in campaigns, global variations, and metrics
  2. Add new trigger
  3. Select audience as your trigger type
  4. Select the specific audience you want and choose whether to include or exclude these users

GA4 Audience used as a trigger in a campaign


GA4 Audience used as a trigger in a metric


GA4 Audience used as a trigger in a global variation