Page Summary
-
Audience lists can be populated with users who have taken specific actions on your website, including conversions and non-conversion actions.
-
To create and target audience segments, you need to review the advertising policy, set up your Google tag, and set up conversion tracking.
-
You can retrieve your Google tag from the Google Ads UI or using the Google Ads API by creating a
RemarketingAction. -
Install your Google tag on all website pages and optionally add custom parameters for more tailored user lists.
-
Basic user lists define membership based on users who triggered conversion actions on your website or took non-conversion actions associated with a
RemarketingAction. -
Audience segments can be targeted at the ad group level using an
AdGroupCriterionor at the campaign level using aCampaignCriterion, but not at both levels simultaneously for positive targeting.
You can populate your audience list with people who have taken specific actions on your website. If you're using conversion tracking, you can target ads to people who previously triggered a conversion (such as a purchase) on your website.
You can also target ads to people who have taken a particular action on your website that you do not consider a conversion, such as when a person adds but then deletes an item from their shopping cart without making a purchase.
Prerequisites
In order to create and target audience segments, you first need to:
Review the policy for advertising based on interests and location. Sensitive information about users can't be used to build audiences.
Set up your Google tag.
Advertisers seeking to create user lists based on mobile app behavior should implement the Firebase SDK or work with third-party SDKs in order to track in-app behavior.
Retrieve the Google tag
All Google Ads accounts have exactly one account-level Google tag, created automatically when the account is opened.
You can retrieve the Google tag in the Google Ads UI by following the Help Center
instructions or in
the Google Ads API by creating a RemarketingAction and then retrieving the Google tag
by issuing a
GoogleAdsService.searchStream
request using the remarketing_action
resource:
SELECT
remarketing_action.id,
remarketing_action.name,
remarketing_action.tag_snippets
FROM remarketing_action
WHERE remarketing_action.resource_name = 'REMARKETING_ACTION_RESOURCE_NAME'
Install the Google tag on your website or app
The next step is to install your Google tag on all of your site's pages. Learn more about adding the Google tag to your site or mobile app.
If you're planning to build audience segments based only on visited page URLs, you don't need to make any edits to your Google tag. If you're using custom parameters, you need to edit your tag to include them, as detailed in Advanced strategies for tagging and creating remarketing lists.
You can use Google Tag Assistant to validate your tag installation.
Built-in Google tag parameters
You can use the built-in remarketing parameter url__ to target a user list
based on the URLs that people have visited on your website, as demonstrated in
the
Visitors to your website example.
Custom Google tag parameters
You can add custom Google tag parameters to your Google tag to create more tailored user lists.
Before creating your own custom parameters, check out the list of predefined parameters to see if there's already a good fit for your use case. Using predefined parameters makes it easier to integrate with other Google Ads remarketing features.
Create the user list
Targeting visitors who took specific actions requires setting the
basic_user_list field of a
UserList with a
BasicUserListInfo object containing
references to the actions—whether conversions or non-conversion
actions— you are targeting.
For a complete walkthrough of an example scenario in which you target users based on a combination of conversion and non-conversion actions, check out the Sample scenario.
Visitors who triggered a conversion
A basic user list defines its membership as people who had triggered one or more
conversion actions on your website. When you create a basic user list, you
provide the resource name of the
ConversionAction to a
UserListActionInfo object, which is
ultimately passed to the UserList.
The following example creates a basic user list associated with two existing conversion actions:
Java
private void runExample( GoogleAdsClient googleAdsClient, long customerId, List<Long> conversionActionIds) { List<UserListActionInfo> userListActionInfoList = new ArrayList<>(); for (long conversionActionId : conversionActionIds) { // Creates the UserListActionInfo object for a given conversion action. This specifies the // conversion action that, when triggered, will cause a user to be added to a UserList. UserListActionInfo userListActionInfo = UserListActionInfo.newBuilder() .setConversionAction(ResourceNames.conversionAction(customerId, conversionActionId)) .build(); userListActionInfoList.add(userListActionInfo); } // Creates a basic user list info object with all of the conversion actions. BasicUserListInfo basicUserListInfo = BasicUserListInfo.newBuilder().addAllActions(userListActionInfoList).build(); // Creates the basic user list. UserList basicUserList = UserList.newBuilder() .setName("Example BasicUserList #" + getPrintableDateTime()) .setDescription("A list of people who have triggered one or more conversion actions") .setMembershipLifeSpan(365) .setBasicUserList(basicUserListInfo) .setMembershipStatus(UserListMembershipStatus.OPEN) .build(); // Creates the operation. UserListOperation operation = UserListOperation.newBuilder().setCreate(basicUserList).build(); // Creates the service client. try (UserListServiceClient userListServiceClient = googleAdsClient.getLatestVersion().createUserListServiceClient()) { // Adds the basic user list. MutateUserListsResponse response = userListServiceClient.mutateUserLists( Long.toString(customerId), ImmutableList.of(operation)); // Prints the results. System.out.printf( "Created basic user list with resource name '%s'.%n", response.getResults(0).getResourceName()); } }
C#
public void Run(GoogleAdsClient client, long customerId, long[] conversionActionIds) { // Creates the service client. UserListServiceClient userListServiceClient = client.GetService(Services.V22.UserListService); List<UserListActionInfo> userListActionInfoList = new List<UserListActionInfo>(); foreach (long conversionActionId in conversionActionIds) { // Creates the UserListActionInfo object for a given conversion action. This // specifies the conversion action that, when triggered, will cause a user to be // added to a UserList. userListActionInfoList.Add(new UserListActionInfo { ConversionAction = ResourceNames.ConversionAction(customerId, conversionActionId) }); } // Creates a basic user list info object with all of the conversion actions. BasicUserListInfo basicUserListInfo = new BasicUserListInfo(); basicUserListInfo.Actions.Add(userListActionInfoList); // Creates the basic user list. UserList basicUserList = new UserList { Name = $"Example BasicUserList #{ExampleUtilities.GetShortRandomString()}", Description = "A list of people who have triggered one or more conversion actions", MembershipLifeSpan = 365L, BasicUserList = basicUserListInfo, MembershipStatus = UserListMembershipStatus.Open }; // Creates the operation. UserListOperation operation = new UserListOperation { Create = basicUserList }; try { // Adds the new user list. MutateUserListsResponse response = userListServiceClient.MutateUserLists (customerId.ToString(), new[] { operation }); // Prints the result. Console.WriteLine("Created basic user list with resource name: " + $"{response.Results.First().ResourceName}"); } catch (GoogleAdsException e) { Console.WriteLine("Failure:"); Console.WriteLine($"Message: {e.Message}"); Console.WriteLine($"Failure: {e.Failure}"); Console.WriteLine($"Request ID: {e.RequestId}"); throw; } }
PHP
public static function runExample( GoogleAdsClient $googleAdsClient, int $customerId, array $conversionActionIds ) { $userListActionInfoList = []; foreach ($conversionActionIds as $conversionActionId) { // Creates the UserListActionInfo object for a given conversion action. This specifies // the conversion action that, when triggered, will cause a user to be added to a // UserList. $userListActionInfoList[] = new UserListActionInfo([ 'conversion_action' => ResourceNames::forConversionAction( $customerId, $conversionActionId ) ]); } // Creates a basic user list info object with all of the conversion actions. $basicUserListInfo = new BasicUserListInfo(['actions' => $userListActionInfoList]); // Creates the basic user list. $basicUserList = new UserList([ 'name' => 'Example BasicUserList #' . Helper::getPrintableDatetime(), 'description' => 'A list of people who have triggered one or more conversion actions', 'membership_status' => UserListMembershipStatus::OPEN, 'membership_life_span' => 365, 'basic_user_list' => $basicUserListInfo ]); // Creates the operation. $operation = new UserListOperation(); $operation->setCreate($basicUserList); // Issues a mutate request to add the user list and prints some information. $userListServiceClient = $googleAdsClient->getUserListServiceClient(); $response = $userListServiceClient->mutateUserLists( MutateUserListsRequest::build($customerId, [$operation]) ); printf( "Created basic user list with resource name '%s'.%s", $response->getResults()[0]->getResourceName(), PHP_EOL ); }