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:
- Set up API access for GA4 audience data
- Configure GA4 Integration in SiteSpect
- 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
Activate GA4 API
- In the Google Cloud Platform interface, open the console left side menu and select APIs & services.
- On the left, click Library, search for the “Google Analytics Reporting API” and select it. Click Enable.
- Do the same for “Google Analytics API”
Create a Service Level account
- Still in Google Cloud Platform, navigate to IAM & Admin > Service Accounts
- Create Service Account using the link at the top of the page
- Fill in the name and description and select a viewer access
- Once the account is created, click on Keys
- Select Add key > Create new key
- Choose JSON format and click Create to generate the key
- 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
- In the SiteSpect control panel, New > Data Set
- Give your data set a name and click save. You do not need to add records to your data set at this point.
- Once saved, click on New > Audience
- Select SiteSpect User GUID for the audience type
- 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.
- 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:
- The site ID where you will use these audiences
- The name and IDs for each SiteSpect audience partnered with details of the corresponding GA4 audience
- Frequency for updating your SiteSpect audience. The default is to update once a day, your account team can help advise on the best cadence.
- 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
- Select your audience to include or exclude from your campaign
- 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
- You can use your audiences as a trigger in campaigns, global variations, and metrics
- Add new trigger
- Select audience as your trigger type
- 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|