সম্পদ সহ গতিশীল পুনঃবিপণন

ডায়নামিক রিমার্কেটিং আপনার প্রচারাভিযানকে একজন ব্যবহারকারীর অতীত আচরণের সাথে মানানসই বিজ্ঞাপন পরিবেশন করতে সক্ষম করে। যখন একজন ব্যবহারকারীকে একটি ডায়নামিক রিমার্কেটিং তালিকায় যোগ করা হয়, তখন ট্র্যাকিং পিক্সেলে একটি সম্পদের আইডিও প্রদান করা হয়। যখন তালিকার একজন ব্যবহারকারী একটি বিজ্ঞাপন দেখেন, তখন বিজ্ঞাপনের বিষয়বস্তু অন্তর্নিহিত AssetSet থেকে গতিশীলভাবে রেন্ডার করা হয়।

এই দস্তাবেজটি গতিশীল বিষয়বস্তুর জন্য সম্পদ সহ গতিশীল পুনঃবিপণন প্রচারাভিযান পরিচালনার প্রক্রিয়া বর্ণনা করে।

আপনার ডায়নামিক রিমার্কেটিং ক্যাম্পেইনে পরিবেশন করার জন্য সম্পদ তৈরি করুন

আপনার বিজ্ঞাপনের জন্য কাস্টম সামগ্রী ধারণ করে এমন সম্পদগুলি পরিচালনা করতে আপনি API ব্যবহার করতে পারেন৷ Asset একটি আইডি রয়েছে যা বিজ্ঞাপনে পরিবেশন করার জন্য কাস্টমাইজ করা সামগ্রীর সাথে ট্র্যাকিং পিক্সেলে ব্যবহার করা যেতে পারে।

জাভা

// 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;
}
      

সি#

/// <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.V17.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;
}
      

পিএইচপি

// 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;
      

পাইথন

def create_asset(client, customer_id):
    """Creates a DynamicEducationAsset.

    See https://support.google.com/google-ads/answer/6053288?#zippy=%2Ceducation
    for a detailed explanation of the field format.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.

    Returns:
        The resource name for an asset.
    """
    # Creates an operation to add the asset.
    operation = client.get_type("AssetOperation")
    asset = operation.create
    # The final_urls list must not be empty
    asset.final_urls.append("https://www.example.com")
    education_asset = asset.dynamic_education_asset
    # Defines meta-information about the school and program.
    education_asset.school_name = "The University of Unknown"
    education_asset.address = "Building 1, New York, 12345, USA"
    education_asset.program_name = "BSc. Computer Science"
    education_asset.subject = "Computer Science"
    education_asset.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.
    education_asset.program_id = "bsc-cs-uofu"
    # Sets up the location ID which may additionally be specified in the
    # tracking pixel.
    education_asset.location_id = "nyc"
    education_asset.image_url = "https://gaagl.page.link/Eit5"
    education_asset.android_app_link = (
        "android-app://com.example.android/http/example.com/gizmos?1234"
    )
    education_asset.ios_app_link = "exampleApp://content/page"
    education_asset.ios_app_store_id = 123

    asset_service = client.get_service("AssetService")
    response = asset_service.mutate_assets(
        customer_id=customer_id, operations=[operation]
    )
    resource_name = response.results[0].resource_name
    print(
        f"Created a dynamic education asset with resource name '{resource_name}'"
    )

    return resource_name
      

রুবি

def create_asset(client, customer_id)
  # Creates a DynamicEducationAsset.
  # See https://support.google.com/google-ads/answer/6053288?#zippy=%2Ceducation for a
  # detailed explanation of the field format.

  # Creates an operation to add the asset.
  operation = client.operation.create_resource.asset do |asset|
    asset.final_urls << 'https://www.example.com'
    asset.dynamic_education_asset = client.resource.dynamic_education_asset do |dea|
      # Defines meta-information about the school and program.
      dea.school_name = 'The University of Unknown'
      dea.address = 'Building 1, New York, 12345, USA'
      dea.program_name = 'BSc. Computer Science'
      dea.subject = 'Computer Science'
      dea.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.
      dea.program_id = 'bsc-cs-uofu'
      # Sets up the location ID which may additionally be specified in the
      # tracking pixel.
      dea.location_id = 'nyc'
      dea.image_url = 'https://gaagl.page.link/Eit5'
      dea.android_app_link = 'android-app://com.example.android/http/example.com/gizmos?1234'
      dea.ios_app_link = 'exampleApp://content/page'
      dea.ios_app_store_id = 123
    end
  end

  # Sends the mutate request.
  response = client.service.asset.mutate_assets(
    customer_id: customer_id,
    operations: [operation],
  )
  resource_name = response.results.first.resource_name
  puts "Created a dynamic education asset with resource name '#{resource_name}'"

  resource_name
end
      

পার্ল

# Create a DynamicEducationAsset.
# See https://support.google.com/google-ads/answer/6053288?#zippy=%2Ceducation
# for a detailed explanation of the field format.
my $education_asset =
  Google::Ads::GoogleAds::V17::Common::DynamicEducationAsset->new({
    # Define 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!",
    # Set up the program ID which is the ID that should be specified in the
    # tracking pixel.
    programId => "bsc-cs-uofu",
    # Set 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 => 123
  });
my $asset = Google::Ads::GoogleAds::V17::Resources::Asset->new({
    dynamicEducationAsset => $education_asset,
    finalUrls             => ["https://www.example.com"]});

# Create an operation to add the asset.
my $operation =
  Google::Ads::GoogleAds::V17::Services::AssetService::AssetOperation->new({
    create => $asset
  });

# Send the mutate request.
my $response = $api_client->AssetService()->mutate({
    customerId => $customer_id,
    operations => [$operation]});

# Print some information about the response.
my $resource_name = $response->{results}[0]{resourceName};
printf "Created a dynamic education asset with resource name '%s'.\n",
  $resource_name;
return $resource_name;
      

প্যাকেজ সম্পদ একসাথে একটি AssetSet এ

একটি AssetSet Asset বস্তুর সংগ্রহকে প্রতিনিধিত্ব করে যা একটি নির্দিষ্ট প্রচারাভিযানে গতিশীল পুনঃবিপণনের জন্য ব্যবহার করা যেতে পারে। একটি AssetSet এমন অনেক প্রচারাভিযানের সাথে যুক্ত হতে পারে যা প্রয়োজন অনুযায়ী একই গোষ্ঠীর সম্পদ পুনরায় ব্যবহার করতে পারে। এটি Google Ads UI আপনাকে যেভাবে একটি ডায়নামিক রিমার্কেটিং ক্যাম্পেইনের জন্য "ডেটা ফিড" নির্দিষ্ট করতে দেয় তার অনুরূপ।

UI এ সম্পদ সেট

প্রথম ধাপ হল আপনার সম্পদ রাখার জন্য একটি নতুন AssetSet তৈরি করা।

জাভা

// Creates an AssetSet which will be used to link the dynamic remarketing assets to a campaign.
AssetSet assetSet =
    AssetSet.newBuilder()
        .setName("My dynamic remarketing assets " + CodeSampleHelper.getPrintableDateTime())
        .setType(AssetSetType.DYNAMIC_EDUCATION)
        .build();
// Creates an operation to add the link.
AssetSetOperation operation = AssetSetOperation.newBuilder().setCreate(assetSet).build();
try (AssetSetServiceClient serviceClient =
    googleAdsClient.getLatestVersion().createAssetSetServiceClient()) {
  // Sends the mutate request.
  MutateAssetSetsResponse response =
      serviceClient.mutateAssetSets(
          String.valueOf(params.customerId), ImmutableList.of(operation));
  // Prints some information about the response.
  String resourceName = response.getResults(0).getResourceName();
  System.out.printf("Created asset set with resource name %s.%n", resourceName);
  return resourceName;
}
      

সি#

/// <summary>
/// Creates the asset set.
/// </summary>
/// <param name="client">The Google Ads client.</param>
/// <param name="customerId">The Google Ads customer ID.</param>
/// <returns>The resource name of the asset set.</returns>
private string CreateAssetSet(GoogleAdsClient client, long customerId)
{
    AssetSetServiceClient assetSetService = client.GetService(
        Services.V17.AssetSetService);

    // Creates an AssetSet which will be used to link the dynamic remarketing assets
    // to a campaign.
    AssetSet assetSet = new AssetSet()
    {
        Name = "My dynamic remarketing assets " + ExampleUtilities.GetRandomString(),
        Type = AssetSetType.DynamicEducation
    };

    // Creates an operation to add the link.
    AssetSetOperation operation = new AssetSetOperation()
    {
        Create = assetSet
    };
    // Sends the mutate request.
    MutateAssetSetsResponse response = assetSetService.MutateAssetSets(
        customerId.ToString(), new[] { operation });
    // Prints some information about the response.
    string resourceName = response.Results[0].ResourceName;
    Console.WriteLine($"Created asset set with resource name {resourceName}.");
    return resourceName;
}
      

পিএইচপি

// Creates an asset set which will be used to link the dynamic remarketing assets to a
// campaign.
$assetSet = new AssetSet([
    'name' => 'My dynamic remarketing assets ' . Helper::getPrintableDatetime(),
    'type' => AssetSetType::DYNAMIC_EDUCATION
]);

// Creates an asset set operation.
$assetSetOperation = new AssetSetOperation();
$assetSetOperation->setCreate($assetSet);

// Issues a mutate request to add the asset set and prints its information.
$assetSetServiceClient = $googleAdsClient->getAssetSetServiceClient();
$response = $assetSetServiceClient->mutateAssetSets(
    MutateAssetSetsRequest::build($customerId, [$assetSetOperation])
);
$assetSetResourceName = $response->getResults()[0]->getResourceName();
printf(
    "Created an asset set with resource name: '%s'.%s",
    $assetSetResourceName,
    PHP_EOL
);

return $assetSetResourceName;
      

পাইথন

def create_asset_set(client, customer_id):
    """Creates an AssetSet.

    The AssetSet will be used to link the dynamic remarketing assets to a
    campaign.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID.

    Returns:
        The resource name for an asset set.
    """
    # Creates an operation to create the asset set.
    operation = client.get_type("AssetSetOperation")
    asset_set = operation.create
    asset_set.name = f"My dynamic remarketing assets {datetime.now()}"
    asset_set.type_ = client.enums.AssetSetTypeEnum.DYNAMIC_EDUCATION

    asset_set_service = client.get_service("AssetSetService")
    response = asset_set_service.mutate_asset_sets(
        customer_id=customer_id, operations=[operation]
    )
    resource_name = response.results[0].resource_name
    print(f"Created asset set with resource name '{resource_name}'")

    return resource_name
      

রুবি

def create_asset_set(client, customer_id)
  # Creates an AssetSet which will be used to link the dynamic remarketing assets to a campaign.

  # Creates an operation to add the asset set.
  operation = client.operation.create_resource.asset_set do |asset_set|
    asset_set.name = "My dynamic remarketing assets #{Time.now}"
    asset_set.type = :DYNAMIC_EDUCATION
  end

  # Sends the mutate request.
  response = client.service.asset_set.mutate_asset_sets(
    customer_id: customer_id,
    operations: [operation],
  )
  resource_name = response.results.first.resource_name
  puts "Created asset set with resource name '#{resource_name}'"

  resource_name
end
      

পার্ল

# Create an AssetSet which will be used to link the dynamic remarketing assets
# to a campaign.
my $asset_set = Google::Ads::GoogleAds::V17::Resources::AssetSet->new({
  name => "My dynamic remarketing assets #" . uniqid(),
  type => DYNAMIC_EDUCATION
});

# Create an operation to add the AssetSet.
my $operation =
  Google::Ads::GoogleAds::V17::Services::AssetSetService::AssetSetOperation->
  new({
    create => $asset_set
  });

# Send the mutate request.
my $response = $api_client->AssetSetService()->mutate({
    customerId => $customer_id,
    operations => [$operation]});

# Print some information about the response.
my $resource_name = $response->{results}[0]{resourceName};
printf "Created asset set with resource name '%s'.\n", $resource_name;
return $resource_name;
      

এরপরে, একটি AssetSetAsset এর সাথে AssetSet এর সাথে সম্পদ সংযুক্ত করুন।

জাভা

AssetSetAsset assetSetAsset =
    AssetSetAsset.newBuilder()
        .setAsset(assetResourceName)
        .setAssetSet(assetSetResourceName)
        .build();
// Creates an operation to add the link.
AssetSetAssetOperation operation =
    AssetSetAssetOperation.newBuilder().setCreate(assetSetAsset).build();
try (AssetSetAssetServiceClient client =
    googleAdsClient.getLatestVersion().createAssetSetAssetServiceClient()) {
  // Sends the mutate request.
  // Note this is the point that the API will enforce uniqueness of the
  // DynamicEducationAsset.product_id field. You can have any number of assets with the same
  // product_id, however, only one Asset is allowed per AssetSet with the same product ID.
  MutateAssetSetAssetsResponse response =
      client.mutateAssetSetAssets(
          String.valueOf(params.customerId), ImmutableList.of(operation));
  // Prints some information about the response.
  String resourceName = response.getResults(0).getResourceName();
  System.out.printf("Created AssetSetAsset link with resource name %s.%n", resourceName);
}
      

সি#

/// <summary>
/// Adds an Asset to an AssetSet by creating an AssetSetAsset link.
/// </summary>
/// <param name="client">The Google Ads client.</param>
/// <param name="customerId">The Google Ads customer ID.</param>
/// <param name="assetResourceName">Name of the asset resource.</param>
/// <param name="assetSetResourceName">Name of the asset set resource.</param>
private void AddAssetsToAssetSet(GoogleAdsClient client, long customerId,
    string assetResourceName, string assetSetResourceName)
{
    AssetSetAssetServiceClient assetSetAssetService = client.GetService(
        Services.V17.AssetSetAssetService);

    AssetSetAsset assetSetAsset = new AssetSetAsset()
    {
        Asset = assetResourceName,
        AssetSet = assetSetResourceName
    };

    // Creates an operation to add the link.
    AssetSetAssetOperation operation = new AssetSetAssetOperation()
    {
        Create = assetSetAsset
    };
    // Sends the mutate request.
    // Note this is the point that the API will enforce uniqueness of the
    // DynamicEducationAsset.program_id field. You can have any number of
    // assets with the same program_id, however, only one Asset is allowed
    // per AssetSet with the same program ID.
    MutateAssetSetAssetsResponse response =
        assetSetAssetService.MutateAssetSetAssets(
            customerId.ToString(), new[] { operation });
    // Prints some information about the response.
    string resourceName = response.Results[0].ResourceName;
    Console.WriteLine($"Created AssetSetAsset link with resource name {resourceName}.");
}
      

পিএইচপি

// Creates an asset set asset.
$assetSetAsset = new AssetSetAsset([
    'asset' => $assetResourceName,
    'asset_set' => $assetSetResourceName
]);

// Creates an asset set asset operation.
$assetSetAssetOperation = new AssetSetAssetOperation();
$assetSetAssetOperation->setCreate($assetSetAsset);

// Issues a mutate request to add the asset set asset and prints its information.
// Note this is the point that the API will enforce uniqueness of the
// DynamicEducationAsset::program_id field. You can have any number of assets with the same
// program_id, however, only one asset is allowed per asset set with the same product ID.
$assetSetAssetServiceClient = $googleAdsClient->getAssetSetAssetServiceClient();
$response = $assetSetAssetServiceClient->mutateAssetSetAssets(
    MutateAssetSetAssetsRequest::build($customerId, [$assetSetAssetOperation])
);
printf(
    "Created asset set asset link with resource name: '%s'.%s",
    $response->getResults()[0]->getResourceName(),
    PHP_EOL
);
      

পাইথন

def add_assets_to_asset_set(
    client, asset_resource_name, asset_set_resource_name, customer_id
):
    """Adds an Asset to an AssetSet by creating an AssetSetAsset link.

    Args:
        client: an initialized GoogleAdsClient instance.
        asset_set_resource_name; the resource name for an asset set.
        asset_resource_name; the resource name for an asset.
        customer_id: a client customer ID.
    """
    # Creates an operation to add the asset set asset.
    operation = client.get_type("AssetSetAssetOperation")
    asset_set_asset = operation.create
    asset_set_asset.asset = asset_resource_name
    asset_set_asset.asset_set = asset_set_resource_name

    asset_set_asset_service = client.get_service("AssetSetAssetService")
    # Note this is the point that the API will enforce uniqueness of the
    # DynamicEducationAsset.program_id field. You can have any number of assets
    # with the same program ID, however, only one asset is allowed per asset set
    # with the same program ID.
    response = asset_set_asset_service.mutate_asset_set_assets(
        customer_id=customer_id, operations=[operation]
    )
    resource_name = response.results[0].resource_name
    print(f"Created asset set asset link with resource name '{resource_name}'")
      

রুবি

def add_assets_to_asset_set(client, asset_resource_name, asset_set_resource_name, customer_id)
  # Creates an operation to add the asset set asset.
  operation = client.operation.create_resource.asset_set_asset do |asa|
    asa.asset = asset_resource_name
    asa.asset_set = asset_set_resource_name
  end

  # Sends the mutate request.
  #
  # Note this is the point that the API will enforce uniqueness of the
  # DynamicEducationAsset.program_id field. You can have any number of assets
  # with the same program ID, however, only one asset is allowed per asset set
  # with the same program ID.
  response = client.service.asset_set_asset.mutate_asset_set_assets(
    customer_id: customer_id,
    operations: [operation],
  )
  resource_name = response.results.first.resource_name
  puts "Created asset set asset link with resource name '#{resource_name}'"
end
      

পার্ল

my $asset_set_asset =
  Google::Ads::GoogleAds::V17::Resources::AssetSetAsset->new({
    asset    => $asset_resource_name,
    assetSet => $asset_set_resource_name
  });

# Create an operation to add the link.
my $operation =
  Google::Ads::GoogleAds::V17::Services::AssetSetAssetService::AssetSetAssetOperation
  ->new({
    create => $asset_set_asset
  });

# Send the mutate request.
# Note this is the point that the API will enforce uniqueness of the
# DynamicEducationAsset.programId field. You can have any number of assets
# with the same programId, however, only one Asset is allowed per AssetSet
# with the same program ID.
my $response = $api_client->AssetSetAssetService()->mutate({
    customerId => $customer_id,
    operations => [$operation]});

# Print some information about the response.
my $resource_name = $response->{results}[0]{resourceName};
printf "Created AssetSetAsset link with resource name '%s'.\n",
  $resource_name;
      

এখন যেহেতু আপনার গতিশীল বিষয়বস্তু সম্বলিত একটি AssetSet আছে, আপনি এটিকে একটি প্রচারাভিযানের সাথে লিঙ্ক করতে প্রস্তুত যাতে সম্পদগুলি পরিবেশন করা শুরু করতে পারে৷ এটি একটি CampaignAssetSet তৈরি করে অর্জন করা হয়।

জাভা

// Creates a CampaignAssetSet representing the link between an AssetSet and a Campaign.
CampaignAssetSet campaignAssetSet =
    CampaignAssetSet.newBuilder()
        .setCampaign(ResourceNames.campaign(params.customerId, params.campaignId))
        .setAssetSet(assetSetResourceName)
        .build();
// Creates an operation to add the CampaignAssetSet.
CampaignAssetSetOperation operation =
    CampaignAssetSetOperation.newBuilder().setCreate(campaignAssetSet).build();
// Creates an API connection.
try (CampaignAssetSetServiceClient client =
    googleAdsClient.getLatestVersion().createCampaignAssetSetServiceClient()) {
  // Issues the mutate request.
  MutateCampaignAssetSetsResponse response =
      client.mutateCampaignAssetSets(
          String.valueOf(params.customerId), ImmutableList.of(operation));
  String resourceName = response.getResults(0).getResourceName();
  System.out.printf("Created a CampaignAssetSet with resource name %s.%n", resourceName);
}
      

সি#

/// <summary>
/// Links an AssetSet to Campaign by creating a CampaignAssetSet.
/// </summary>
/// <param name="client">The Google Ads client.</param>
/// <param name="customerId">The Google Ads customer ID.</param>
/// <param name="campaignId">ID of the campaign to which the asset is linked. Specify a
/// campaign type which supports dynamic remarketing, such as Display.</param>
/// <param name="assetSetResourceName">Name of the asset set resource.</param>
private void LinkAssetSetToCampaign(GoogleAdsClient client, long customerId,
    long campaignId, string assetSetResourceName)
{
    CampaignAssetSetServiceClient campaignAssetSetService = client.GetService(
        Services.V17.CampaignAssetSetService);

    // Creates a CampaignAssetSet representing the link between an AssetSet and a Campaign.
    CampaignAssetSet campaignAssetSet = new CampaignAssetSet()
    {
        Campaign = ResourceNames.Campaign(customerId, campaignId),
        AssetSet = assetSetResourceName
    };

    // Creates an operation to add the CampaignAssetSet.
    CampaignAssetSetOperation operation = new CampaignAssetSetOperation()
    {
        Create = campaignAssetSet
    };

    // Issues the mutate request.
    MutateCampaignAssetSetsResponse response =
        campaignAssetSetService.MutateCampaignAssetSets(
            customerId.ToString(), new[] { operation });
    string resourceName = response.Results[0].ResourceName;
    Console.WriteLine($"Created a CampaignAssetSet with resource name {resourceName}.");
}
      

পিএইচপি

// Creates a campaign asset set representing the link between an asset set and a campaign.
$campaignAssetSet = new CampaignAssetSet([
    'asset_set' => $assetSetResourceName,
    'campaign' => ResourceNames::forCampaign($customerId, $campaignId)
]);

// Creates a campaign asset set operation.
$campaignAssetSetOperation = new CampaignAssetSetOperation();
$campaignAssetSetOperation->setCreate($campaignAssetSet);

// Issues a mutate request to add the campaign asset set and prints its information.
$campaignAssetSetServiceClient = $googleAdsClient->getCampaignAssetSetServiceClient();
$response = $campaignAssetSetServiceClient->mutateCampaignAssetSets(
    MutateCampaignAssetSetsRequest::build($customerId, [$campaignAssetSetOperation])
);
printf(
    "Created a campaign asset set with resource name: '%s'.%s",
    $response->getResults()[0]->getResourceName(),
    PHP_EOL
);
      

পাইথন

def link_asset_set_to_campaign(
    client, asset_set_resource_name, customer_id, campaign_id
):
    """Creates a CampaignAssetSet.

    The CampaignAssetSet represents the link between an AssetSet and a Campaign.

    Args:
        client: an initialized GoogleAdsClient instance.
        asset_set_resource_name; the resource name for an asset set.
        customer_id: a client customer ID.
        campaign_id: the ID for a campaign of a type that supports dynamic
            remarketing, such as Display.
    """
    googleads_service = client.get_service("GoogleAdsService")
    # Creates an operation to add the campaign asset set.
    operation = client.get_type("CampaignAssetSetOperation")
    campaign_asset_set = operation.create
    campaign_asset_set.campaign = googleads_service.campaign_path(
        customer_id, campaign_id
    )
    campaign_asset_set.asset_set = asset_set_resource_name

    campaign_asset_set_service = client.get_service("CampaignAssetSetService")
    response = campaign_asset_set_service.mutate_campaign_asset_sets(
        customer_id=customer_id, operations=[operation]
    )
    resource_name = response.results[0].resource_name
    print(f"Created a campaign asset set with resource name '{resource_name}'")
      

রুবি

def link_asset_set_to_campaign(client, asset_set_resource_name, customer_id, campaign_id)
  # Creates a CampaignAssetSet representing the link between an AssetSet and a Campaign.

  # Creates an operation to add the campaign asset set.
  operation = client.operation.create_resource.campaign_asset_set do |cas|
    cas.campaign = client.path.campaign(customer_id, campaign_id)
    cas.asset_set = asset_set_resource_name
  end

  # Issues the mutate request.
  response = client.service.campaign_asset_set.mutate_campaign_asset_sets(
    customer_id: customer_id,
    operations: [operation],
  )
  resource_name = response.results.first.resource_name
  puts "Created a campaign asset set with resource name '#{resource_name}'"
end
      

পার্ল

# Create a CampaignAssetSet representing the link between an AssetSet and a Campaign.
my $campaign_asset_set =
  Google::Ads::GoogleAds::V17::Resources::CampaignAssetSet->new({
    campaign => Google::Ads::GoogleAds::V17::Utils::ResourceNames::campaign(
      $customer_id, $campaign_id
    ),
    assetSet => $asset_set_resource_name
  });

# Create an operation to add the CampaignAssetSet.
my $operation =
  Google::Ads::GoogleAds::V17::Services::CampaignAssetSetService::CampaignAssetSetOperation
  ->new({
    create => $campaign_asset_set
  });

# Issue the mutate request.
my $response = $api_client->CampaignAssetSetService()->mutate({
    customerId => $customer_id,
    operations => [$operation]});

# Print some information about the response.
my $resource_name = $response->{results}[0]{resourceName};
printf "Created a CampaignAssetSet with resource name '%s'.\n",
  $resource_name;
      

একটি ব্যবহারকারী তালিকা লক্ষ্য করুন

একবার আপনি একটি ডায়নামিক রিমার্কেটিং ফিডের সাথে আপনার প্রচারাভিযান সেট আপ করলে, আপনি এটিকে একটি UserList দিয়ে টার্গেট করতে পারেন। এই ব্যবহারকারী তালিকাটি ট্র্যাকিং পিক্সেলে থাকা ডায়নামিক আইডিগুলির সাথে তৈরি করা উচিত ছিল৷

জাভা

private void attachUserList(
    GoogleAdsClient googleAdsClient,
    long customerId,
    String adGroupResourceName,
    long userListId) {
  String userListResourceName = ResourceNames.userList(customerId, userListId);
  // Creates the ad group criterion that targets the user list.
  AdGroupCriterion adGroupCriterion =
      AdGroupCriterion.newBuilder()
          .setAdGroup(adGroupResourceName)
          .setUserList(UserListInfo.newBuilder().setUserList(userListResourceName).build())
          .build();

  // Creates the ad group criterion operation.
  AdGroupCriterionOperation operation =
      AdGroupCriterionOperation.newBuilder().setCreate(adGroupCriterion).build();

  // Creates the ad group criterion service client.
  try (AdGroupCriterionServiceClient adGroupCriterionServiceClient =
      googleAdsClient.getLatestVersion().createAdGroupCriterionServiceClient()) {
    // Adds the ad group criterion.
    MutateAdGroupCriteriaResponse response =
        adGroupCriterionServiceClient.mutateAdGroupCriteria(
            Long.toString(customerId), ImmutableList.of(operation));
    System.out.printf(
        "Created ad group criterion with resource name '%s'.%n",
        response.getResults(0).getResourceName());
  }
}
      

সি#

private void AttachUserList(GoogleAdsClient client, long customerId,
    string adGroupResourceName, long userListId)
{
    // Creates the ad group criterion service client.
    AdGroupCriterionServiceClient adGroupCriterionServiceClient = client.GetService
        (Services.V17.AdGroupCriterionService);

    string userListResourceName = ResourceNames.UserList(customerId, userListId);

    // Creates the ad group criterion that targets the user list.
    AdGroupCriterion adGroupCriterion = new AdGroupCriterion()
    {
        AdGroup = adGroupResourceName,
        UserList = new UserListInfo()
        {
            UserList = userListResourceName
        }
    };

    // Creates the ad group criterion operation.
    AdGroupCriterionOperation operation = new AdGroupCriterionOperation()
    {
        Create = adGroupCriterion
    };

    // Adds the ad group criterion.
    MutateAdGroupCriteriaResponse response = adGroupCriterionServiceClient
        .MutateAdGroupCriteria(customerId.ToString(), new[] { operation });
    Console.WriteLine("Created ad group criterion with resource name " +
                      $"'{response.Results.First().ResourceName}'.");
}
      

পিএইচপি

private static function attachUserList(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    string $adGroupResourceName,
    int $userListId
) {
    // Creates the ad group criterion that targets the user list.
    $adGroupCriterion = new AdGroupCriterion([
        'ad_group' => $adGroupResourceName,
        'user_list' => new UserListInfo([
            'user_list' => ResourceNames::forUserList($customerId, $userListId)
        ])
    ]);

    // Creates an ad group criterion operation.
    $adGroupCriterionOperation = new AdGroupCriterionOperation();
    $adGroupCriterionOperation->setCreate($adGroupCriterion);

    // Issues a mutate request to add the ad group criterion.
    $adGroupCriterionServiceClient = $googleAdsClient->getAdGroupCriterionServiceClient();
    $response = $adGroupCriterionServiceClient->mutateAdGroupCriteria(
        MutateAdGroupCriteriaRequest::build($customerId, [$adGroupCriterionOperation])
    );

    /** @var AdGroupCriterion $addedAdGroupCriterion */
    $addedAdGroupCriterion = $response->getResults()[0];
    printf(
        "Created ad group criterion with resource name '%s'.%s",
        $addedAdGroupCriterion->getResourceName(),
        PHP_EOL
    );
}
      

পাইথন

def attach_user_list(client, customer_id, ad_group_resource_name, user_list_id):
    """Targets a user list with an ad group.

    Args:
        client: An initialized GoogleAds client.
        customer_id: The Google Ads customer ID.
        ad_group_resource_name: The resource name of the target ad group.
        user_list_id: The ID of the user list to target for remarketing.
    """
    # Get the AdGroupCriterionService client.
    ad_group_criterion_service = client.get_service("AdGroupCriterionService")

    # Create an ad group criterion operation and set the ad group criterion
    # values.
    ad_group_criterion_operation = client.get_type("AdGroupCriterionOperation")
    ad_group_criterion = ad_group_criterion_operation.create
    ad_group_criterion.ad_group = ad_group_resource_name
    ad_group_criterion.user_list.user_list = client.get_service(
        "UserListService"
    ).user_list_path(customer_id, user_list_id)

    # Issue a mutate request to add the ad group criterion.
    ad_group_criterion_response = (
        ad_group_criterion_service.mutate_ad_group_criteria(
            customer_id=customer_id, operations=[ad_group_criterion_operation]
        )
    )
    print(
        "Created ad group criterion with resource name "
        f"'{ad_group_criterion_response.results[0].resource_name}'."
    )
      

রুবি

def attach_user_list(client, customer_id, ad_group_resource_name, user_list_id)
  user_list_resource_name = client.path.user_list(customer_id, user_list_id)

  # Creates the ad group criterion that targets the user list.
  ad_group_criterion = client.resource.ad_group_criterion do |agc|
    agc.ad_group = ad_group_resource_name
    agc.user_list = client.resource.user_list_info do |ul|
      ul.user_list = user_list_resource_name
    end
  end

  # Creates the ad group criterion operation.
  op = client.operation.create_resource.ad_group_criterion(ad_group_criterion)

  response = client.service.ad_group_criterion.mutate_ad_group_criteria(
    customer_id: customer_id,
    operations: [op]
  )

  puts "Created ad group criterion: #{response.results.first.resource_name}"
end
      

পার্ল

sub attach_user_list {
  my ($api_client, $customer_id, $ad_group_resource_name, $user_list_id) = @_;

  # Create the ad group criterion that targets the user list.
  my $ad_group_criterion =
    Google::Ads::GoogleAds::V17::Resources::AdGroupCriterion->new({
      adGroup  => $ad_group_resource_name,
      userList => Google::Ads::GoogleAds::V17::Common::UserListInfo->new({
          userList =>
            Google::Ads::GoogleAds::V17::Utils::ResourceNames::user_list(
            $customer_id, $user_list_id
            )})});

  # Create an ad group criterion operation.
  my $ad_group_criterion_operation =
    Google::Ads::GoogleAds::V17::Services::AdGroupCriterionService::AdGroupCriterionOperation
    ->new({create => $ad_group_criterion});

  # Issue a mutate request to add the ad group criterion.
  my $ad_group_criteria_response =
    $api_client->AdGroupCriterionService()->mutate({
      customerId => $customer_id,
      operations => [$ad_group_criterion_operation]});

  printf "Created ad group criterion with resource name '%s'.\n",
    $ad_group_criteria_response->{results}[0]{resourceName};
}
      

আপনার ডাইনামিক রিমার্কেটিং ক্যাম্পেইনের জন্য রিপোর্ট ডাউনলোড করুন

লিগ্যাসি ফিড-ভিত্তিক সেটআপের সাথে বৈশিষ্ট্য সমতা বজায় রাখার জন্য ডায়নামিক পুনঃবিপণন প্রচারাভিযানে সম্পদের জন্য কোনো প্রতিবেদন উপলব্ধ নেই, যার কোনো FeedItem-স্তরের পরিসংখ্যান ছিল না। ডায়নামিক রিমার্কেটিং সম্পদের জন্য রিপোর্টিং পরবর্তী রিলিজে যোগ করা যেতে পারে।

সম্পদ ট্র্যাকিং আইডি নির্দিষ্ট করুন

প্রতিটি ডায়নামিক রিমার্কেটিং সম্পদে কমপক্ষে দুটি আইডি উপস্থিত রয়েছে৷ প্রতিটি ডায়নামিক রিমার্কেটিং সম্পদের ধরন তার নিজস্ব অনন্য আইডি সংজ্ঞায়িত করে।

উদাহরণস্বরূপ, DynamicEducationAsset এর ক্ষেত্রে, আপনাকে ট্র্যাকিং পিক্সেলে dynamic_education_asset.program_id এবং ঐচ্ছিকভাবে dynamic_education_asset.location_id উল্লেখ করতে হবে।

ট্র্যাকিং পিক্সেলে asset.id উল্লেখ করবেন না কারণ Google Ads API-এর বাইরে এর কোনো মানে নেই।