Dynamic remarketing with assets

  • Dynamic remarketing tailors ads to users' past behavior, using asset IDs from tracking pixels to dynamically render ad content from an AssetSet.

  • You can create assets with custom content for your dynamic remarketing ads using the API.

  • Assets are grouped into an AssetSet, which can be linked to one or more campaigns.

  • Linking an AssetSet to a campaign is done by creating a CampaignAssetSet.

  • Dynamic remarketing campaigns with dynamic content feeds can target a UserList that includes dynamic IDs from the tracking pixel.

Dynamic remarketing enables your campaign to serve ads tailored to a user's past behaviour. When a user is added to a dynamic remarketing list, the ID of an asset is also provided in the tracking pixel. When a user from the list sees an ad, the content for the ad is dynamically rendered from the underlying AssetSet.

This document describes the process for managing dynamic remarketing campaigns with assets for dynamic content.

Create assets to serve in your dynamic remarketing campaign

You can use the API to manage assets that contain the custom content for your ad. The Asset contains an ID which can be used in the tracking pixel, together with the customized content to serve in the ad.

Java

// Creates a DynamicEducationAsset.
// See https://support.google.com/google-ads/answer/6053288?#zippy=%2Ceducation for a
// detailed explanation of the field format.
DynamicEducationAsset educationAsset =
    DynamicEducationAsset.newBuilder()
        // Defines meta-information about the school and program.
        .setSchoolName("The University of Unknown")
        .setAddress("Building 1, New York, 12345, USA")
        .setProgramName("BSc. Computer Science")
        .setSubject("Computer Science")
        .setProgramDescription("Slinging code for fun and profit!")
        // Sets up the program ID which is the ID that should be specified in the tracking
        // pixel.
        .setProgramId("bsc-cs-uofu")
        // Sets up the location ID which may additionally be specified in the tracking pixel.
        .setLocationId("nyc")
        .setImageUrl("https://gaagl.page.link/Eit5")
        .setAndroidAppLink("android-app://com.example.android/http/example.com/gizmos?1234")
        .setIosAppLink("exampleApp://content/page")
        .setIosAppStoreId(123L)
        .build();
Asset asset =
    Asset.newBuilder()
        .setDynamicEducationAsset(educationAsset)
        .addFinalUrls("https://www.example.com")
        .build();
// Creates an operation to add the asset.
AssetOperation operation = AssetOperation.newBuilder().setCreate(asset).build();
// Connects to the API.
try (AssetServiceClient client =
    googleAdsClient.getLatestVersion().createAssetServiceClient()) {
  // Sends the mutate request.
  MutateAssetsResponse response =
      client.mutateAssets(String.valueOf(params.customerId), ImmutableList.of(operation));
  // Prints some information about the response.
  String resourceName = response.getResults(0).getResourceName();
  System.out.printf("Created a dynamic education asset with resource name %s.%n", resourceName);
  return resourceName;
}
      

C#

/// <summary>
/// Creates an Asset to use in dynamic remarketing.
/// </summary>
/// <param name="client">The Google Ads client.</param>
/// <param name="customerId">The Google Ads customer ID.</param>
/// <returns>The resource name of the newly created asset.</returns>
private string CreateAsset(GoogleAdsClient client, long customerId)
{
    AssetServiceClient assetService = client.GetService(Services.V22.AssetService);

    // Creates a DynamicEducationAsset.
    // See https://support.google.com/google-ads/answer/6053288?#zippy=%2Ceducation for a
    // detailed explanation of the field format.
    DynamicEducationAsset educationAsset = new DynamicEducationAsset()
    {
        // Defines meta-information about the school and program.
        SchoolName = "The University of Unknown",
        Address = "Building 1, New York, 12345, USA",
        ProgramName = "BSc. Computer Science",
        Subject = "Computer Science",
        ProgramDescription = "Slinging code for fun and profit!",
        // Sets up the program ID which is the ID that should be specified in
        // the tracking pixel.
        ProgramId = "bsc-cs-uofu",
        // Sets up the location ID which may additionally be specified in the
        // tracking pixel.
        LocationId = "nyc",
        ImageUrl = "https://gaagl.page.link/Eit5",
        AndroidAppLink = "android-app://com.example.android/http/example.com/gizmos?1234",
        IosAppLink = "exampleApp://content/page",
        IosAppStoreId = 123L
    };
    Asset asset = new Asset()
    {
        DynamicEducationAsset = educationAsset,
        // The final_urls list must not be empty
        FinalUrls = { "https://www.example.com" }
    };

    // Creates an operation to add the asset.
    AssetOperation operation = new AssetOperation()
    {
        Create = asset
    };

    // Sends the mutate request.
    MutateAssetsResponse response =
        assetService.MutateAssets(customerId.ToString(), new[] { operation });
    // Prints some information about the response.
    string resourceName = response.Results[0].ResourceName;
    Console.Write($"Created a dynamic education asset with resource name {resourceName}.");
    return resourceName;
}
      

PHP

// Creates a dynamic education asset.
// See https://support.google.com/google-ads/answer/6053288?#zippy=%2Ceducation for a
// detailed explanation of the field format.
$dynamicEducationAsset = new DynamicEducationAsset([
    // Defines meta-information about the school and program.
    'school_name' => 'The University of Unknown',
    'address' => 'Building 1, New York, 12345, USA',
    'program_name' => 'BSc. Computer Science',
    'subject' => 'Computer Science',
    'program_description' => 'Slinging code for fun and profit!',
    // Sets up the program ID which is the ID that should be specified in the tracking
    // pixel.
    'program_id' => 'bsc-cs-uofu',
    // Sets up the location ID which may additionally be specified in the tracking pixel.
    'location_id' => 'nyc',
    'image_url' => 'https://gaagl.page.link/Eit5',
    'android_app_link' => 'android-app://com.example.android/http/example.com/gizmos?1234',
    'ios_app_link' => 'exampleApp://content/page',
    'ios_app_store_id' => 123
]);

// Wraps the dynamic education asset in an asset.
$asset = new Asset([
    'dynamic_education_asset' => $dynamicEducationAsset,
    'final_urls' => ['https://www.example.com']
]);

// Creates an asset operation.
$assetOperation = new AssetOperation();
$assetOperation->setCreate($asset);

// Issues a mutate request to add the asset and prints its information.
$assetServiceClient = $googleAdsClient->getAssetServiceClient();
$response = $assetServiceClient->mutateAssets(
    MutateAssetsRequest::build($customerId, [$assetOperation])
);
$assetResourceName = $response->getResults()[0]->getResourceName();
printf(
    "Created a dynamic education asset with resource name: '%s'.%s",
    $assetResourceName,
    PHP_EOL
);

return $assetResourceName;