ডায়নামিক অনুসন্ধান বিজ্ঞাপন তৈরি করুন

Google Ads API-এর সাথে ডায়নামিক সার্চ বিজ্ঞাপন (DSAs) সেট-আপ করতে, এই ধাপগুলি অনুসরণ করুন:

  1. একটি প্রচারাভিযান তৈরি করুন এবং এর ডোমেন নির্দিষ্ট করুন।
  2. DSA এর সাথে সম্পর্কিত বৈশিষ্ট্যগুলির জন্য একটি বিজ্ঞাপন গোষ্ঠী তৈরি করুন৷
  3. এক বা একাধিক DSA তৈরি করুন।
  4. প্রচারাভিযানে DSA দেখানোর জন্য এক বা একাধিক মানদণ্ড নির্দিষ্ট করুন।

প্রচারণা তৈরি করুন

Google Adsকে জানাতে যে আপনি আপনার প্রচারাভিযানের সাথে DSA ব্যবহার করতে যাচ্ছেন, আপনাকে প্রথমে advertising_channel_type ক্ষেত্রটি AdvertisingChannelType.SEARCH এ সেট করে একটি Campaign তৈরি করতে হবে। এছাড়াও, একটি ডোমেন নির্দিষ্ট করুন যেখানে DSAs কাজ করবে। এটি একটি DynamicSearchAdsSetting ব্যবহার করে Campaign ফিল্ড dynamic_search_ads_setting সেট করে করা হয়।

নিম্নলিখিত উদাহরণটি একটি DSA প্রচারাভিযান তৈরি করে৷

জাভা

private static String addCampaign(
    GoogleAdsClient googleAdsClient, long customerId, String budgetResourceName) {
  // Creates the campaign.
  Campaign campaign =
      Campaign.newBuilder()
          .setName("Interplanetary Cruise #" + getPrintableDateTime())
          .setAdvertisingChannelType(AdvertisingChannelType.SEARCH)
          .setStatus(CampaignStatus.PAUSED)
          .setManualCpc(ManualCpc.newBuilder().build())
          .setCampaignBudget(budgetResourceName)
          // Enables the campaign for DSAs.
          .setDynamicSearchAdsSetting(
              DynamicSearchAdsSetting.newBuilder()
                  .setDomainName("example.com")
                  .setLanguageCode("en")
                  .build())
          .setStartDate(new DateTime().plusDays(1).toString("yyyyMMdd"))
          .setEndDate(new DateTime().plusDays(30).toString("yyyyMMdd"))
          .build();

  // Creates the operation.
  CampaignOperation operation = CampaignOperation.newBuilder().setCreate(campaign).build();

  // Creates the campaign service client.
  try (CampaignServiceClient campaignServiceClient =
      googleAdsClient.getLatestVersion().createCampaignServiceClient()) {
    // Adds the campaign.
    MutateCampaignsResponse response =
        campaignServiceClient.mutateCampaigns(
            Long.toString(customerId), ImmutableList.of(operation));

    String campaignResourceName = response.getResults(0).getResourceName();
    // Displays the results.
    System.out.printf("Added campaign with resource name '%s'.%n", campaignResourceName);
    return campaignResourceName;
  }
}
      

সি#

private static string AddCampaign(GoogleAdsClient client, long customerId,
    string budgetResourceName)
{
    // Get the CampaignService.
    CampaignServiceClient campaignService = client.GetService(Services.V16.CampaignService);

    // Create the campaign.
    Campaign campaign = new Campaign()
    {
        Name = "Interplanetary Cruise #" + ExampleUtilities.GetRandomString(),
        AdvertisingChannelType = AdvertisingChannelType.Search,
        Status = CampaignStatus.Paused,
        ManualCpc = new ManualCpc(),
        CampaignBudget = budgetResourceName,

        // Enable the campaign for DSAs.
        DynamicSearchAdsSetting = new DynamicSearchAdsSetting()
        {
            DomainName = "example.com",
            LanguageCode = "en"
        },

        StartDate = DateTime.Now.AddDays(1).ToString("yyyyMMdd"),
        EndDate = DateTime.Now.AddDays(30).ToString("yyyyMMdd")
    };

    // Create the operation.
    CampaignOperation operation = new CampaignOperation()
    {
        Create = campaign
    };

    // Add the campaign.
    MutateCampaignsResponse response =
        campaignService.MutateCampaigns(customerId.ToString(),
            new CampaignOperation[] { operation });

    // Displays the result.
    string campaignResourceName = response.Results[0].ResourceName;
    Console.WriteLine($"Added campaign with resource name '{campaignResourceName}'.");
    return campaignResourceName;
}
      

পিএইচপি

private static function createCampaign(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    string $campaignBudgetResourceName
) {
    $campaign = new Campaign([
        'name' => 'Interplanetary Cruise #' . Helper::getPrintableDatetime(),
        'advertising_channel_type' => AdvertisingChannelType::SEARCH,
        'status' => CampaignStatus::PAUSED,
        'manual_cpc' => new ManualCpc(),
        'campaign_budget' => $campaignBudgetResourceName,
        // Enables the campaign for DSAs.
        'dynamic_search_ads_setting' => new DynamicSearchAdsSetting([
            'domain_name' => 'example.com',
            'language_code' => 'en'
        ]),
        // Optional: Sets the start and end dates for the campaign, beginning one day from
        // now and ending a month from now.
        'start_date' => date('Ymd', strtotime('+1 day')),
        'end_date' => date('Ymd', strtotime('+1 month'))
    ]);

    // Creates a campaign operation.
    $campaignOperation = new CampaignOperation();
    $campaignOperation->setCreate($campaign);

    // Issues a mutate request to add campaigns.
    $campaignServiceClient = $googleAdsClient->getCampaignServiceClient();
    /** @var MutateCampaignsResponse $campaignResponse */
    $campaignResponse = $campaignServiceClient->mutateCampaigns(
        MutateCampaignsRequest::build($customerId, [$campaignOperation])
    );

    $campaignResourceName = $campaignResponse->getResults()[0]->getResourceName();
    printf("Added campaign named '%s'.%s", $campaignResourceName, PHP_EOL);

    return $campaignResourceName;
}
      

পাইথন

def create_campaign(client, customer_id, budget_resource_name):
    """Creates a Dynamic Search Ad Campaign under the given customer ID.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID str.
        budget_resource_name: a resource_name str for a Budget

    Returns:
        A resource_name str for the newly created Campaign.
    """
    # Retrieve a new campaign operation object.
    campaign_operation = client.get_type("CampaignOperation")
    campaign = campaign_operation.create
    campaign.name = f"Interplanetary Cruise #{uuid4()}"
    campaign.advertising_channel_type = (
        client.enums.AdvertisingChannelTypeEnum.SEARCH
    )
    # Recommendation: Set the campaign to PAUSED when creating it to prevent the
    # ads from immediately serving. Set to ENABLED once you've added targeting
    # and the ads are ready to serve.
    campaign.status = client.enums.CampaignStatusEnum.PAUSED
    campaign.manual_cpc.enhanced_cpc_enabled = True
    campaign.campaign_budget = budget_resource_name
    # Required: Enable the campaign for DSAs by setting the campaign's dynamic
    # search ads setting domain name and language.
    campaign.dynamic_search_ads_setting.domain_name = "example.com"
    campaign.dynamic_search_ads_setting.language_code = "en"
    # Optional: Sets the start and end dates for the campaign, beginning one day
    # from now and ending a month from now.
    campaign.start_date = (datetime.now() + timedelta(days=1)).strftime(
        "%Y%m%d"
    )
    campaign.end_date = (datetime.now() + timedelta(days=30)).strftime("%Y%m%d")

    # Retrieve the campaign service.
    campaign_service = client.get_service("CampaignService")

    # Issues a mutate request to add campaign.
    response = campaign_service.mutate_campaigns(
        customer_id=customer_id, operations=[campaign_operation]
    )
    resource_name = response.results[0].resource_name

    print(f'Created campaign with resource_name: "{resource_name}"')
      

রুবি

def create_campaign(client, customer_id, budget_resource_name)
  campaign = client.resource.campaign do |c|
    c.name = "Interplanetary Cruise #{(Time.now.to_f * 1000).to_i}"

    c.advertising_channel_type = :SEARCH
    c.status = :PAUSED
    c.manual_cpc = client.resource.manual_cpc
    c.campaign_budget = budget_resource_name

    c.dynamic_search_ads_setting = client.resource.dynamic_search_ads_setting do |s|
      s.domain_name =  "example.com"
      s.language_code =  "en"
    end

    c.start_date = DateTime.parse((Date.today + 1).to_s).strftime('%Y%m%d')
    c.end_date = DateTime.parse(Date.today.next_year.to_s).strftime('%Y%m%d')
  end

  operation = client.operation.create_resource.campaign(campaign)

  response = client.service.campaign.mutate_campaigns(
    customer_id: customer_id,
    operations: [operation],
  )
  puts("Created campaign with ID: #{response.results.first.resource_name}")
  response.results.first.resource_name
end
      

পার্ল

sub create_campaign {
  my ($api_client, $customer_id, $campaign_budget_resource_name) = @_;

  # Create a campaign.
  my $campaign = Google::Ads::GoogleAds::V16::Resources::Campaign->new({
      name                   => "Interplanetary Cruise #" . uniqid(),
      advertisingChannelType => SEARCH,
      status => Google::Ads::GoogleAds::V16::Enums::CampaignStatusEnum::PAUSED,
      manualCpc      => Google::Ads::GoogleAds::V16::Common::ManualCpc->new(),
      campaignBudget => $campaign_budget_resource_name,
      # Enable the campaign for DSAs.
      dynamicSearchAdsSetting =>
        Google::Ads::GoogleAds::V16::Resources::DynamicSearchAdsSetting->new({
          domainName   => "example.com",
          languageCode => "en"
        }
        ),
      # Optional: Set the start and end dates for the campaign, beginning one day from
      # now and ending a month from now.
      startDate => strftime("%Y%m%d", localtime(time + 60 * 60 * 24)),
      endDate   => strftime("%Y%m%d", localtime(time + 60 * 60 * 24 * 30)),
    });

  # Create a campaign operation.
  my $campaign_operation =
    Google::Ads::GoogleAds::V16::Services::CampaignService::CampaignOperation->
    new({create => $campaign});

  # Add the campaign.
  my $campaigns_response = $api_client->CampaignService()->mutate({
      customerId => $customer_id,
      operations => [$campaign_operation]});

  my $campaign_resource_name = $campaigns_response->{results}[0]{resourceName};

  printf "Created campaign '%s'.\n", $campaign_resource_name;

  return $campaign_resource_name;
}
      

বিজ্ঞাপন গ্রুপ তৈরি করুন

DSA বৈশিষ্ট্যগুলি ব্যবহার করার জন্য, আপনাকে SEARCH_DYNAMIC_ADS এ সেট করা ফিল্ডের type সহ একটি AdGroup তৈরি করতে হবে। এই বিজ্ঞাপন গোষ্ঠীর ধরন নিম্নলিখিত বিধিনিষেধ প্রয়োগ করে:

  • এই বিজ্ঞাপন গ্রুপ প্রকার শুধুমাত্র অনুসন্ধান প্রচারাভিযানে যোগ করা যেতে পারে.
  • প্রচারাভিযান পর্যায়ে একটি বৈধ DynamicSearchAdsSetting সেট থাকা উচিত
  • বিজ্ঞাপন গ্রুপ যোগ করার জন্য। একটি AdGroupError.CANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING ত্রুটি নিক্ষেপ করা হবে যদি এই সেটিংটি অনুপস্থিত থাকে৷
  • এই বিজ্ঞাপন গোষ্ঠীর প্রকারে কোন ইতিবাচক কীওয়ার্ড অনুমোদিত নয়। দর্শক, গতিশীল বিজ্ঞাপন লক্ষ্য এবং নেতিবাচক কীওয়ার্ড অনুমোদিত।
  • সমস্ত বিজ্ঞাপন গোষ্ঠীর মতো, নির্মাণের পরে ক্ষেত্রের type পরিবর্তন করা যাবে না।
  • এই বিজ্ঞাপন গোষ্ঠীতে শুধুমাত্র DSA সম্পর্কিত বিজ্ঞাপন ফর্ম্যাট অনুমোদিত।

নীচের কোড উদাহরণটি দেখায় কিভাবে একটি SEARCH_DYNAMIC_ADS বিজ্ঞাপন গোষ্ঠী তৈরি করতে হয়৷

জাভা

private static String addAdGroup(
    GoogleAdsClient googleAdsClient, long customerId, String campaignResourceName) {
  // Creates the ad group.
  AdGroup adGroup =
      AdGroup.newBuilder()
          .setName("Earth to Mars Cruises #" + getPrintableDateTime())
          .setCampaign(campaignResourceName)
          .setType(AdGroupType.SEARCH_DYNAMIC_ADS)
          .setStatus(AdGroupStatus.PAUSED)
          .setTrackingUrlTemplate("http://tracker.examples.com/traveltracker/{escapedlpurl}")
          .setCpcBidMicros(50_000)
          .build();

  // Creates the operation.
  AdGroupOperation operation = AdGroupOperation.newBuilder().setCreate(adGroup).build();

  // Creates the ad group service client.
  try (AdGroupServiceClient adGroupServiceClient =
      googleAdsClient.getLatestVersion().createAdGroupServiceClient()) {
    MutateAdGroupsResponse response =
        adGroupServiceClient.mutateAdGroups(
            Long.toString(customerId), ImmutableList.of(operation));
    String adGroupResourceName = response.getResults(0).getResourceName();
    // Displays the results.
    System.out.printf("Added ad group with resource name '%s'.%n", adGroupResourceName);
    return adGroupResourceName;
  }
}
      

সি#

private static string AddAdGroup(GoogleAdsClient client, long customerId,
    string campaignResourceName)
{
    // Get the AdGroupService.
    AdGroupServiceClient adGroupService = client.GetService(Services.V16.AdGroupService);

    // Create the ad group.
    AdGroup adGroup = new AdGroup()
    {
        Name = "Earth to Mars Cruises #" + ExampleUtilities.GetRandomString(),
        Campaign = campaignResourceName,
        Type = AdGroupType.SearchDynamicAds,
        Status = AdGroupStatus.Paused,
        TrackingUrlTemplate = "http://tracker.examples.com/traveltracker/{escapedlpurl}",
        CpcBidMicros = 50_000
    };

    // Create the operation.
    AdGroupOperation operation = new AdGroupOperation()
    {
        Create = adGroup
    };

    // Add the ad group.
    MutateAdGroupsResponse response =
        adGroupService.MutateAdGroups(customerId.ToString(),
            new AdGroupOperation[] { operation });

    // Display the results.
    string adGroupResourceName = response.Results[0].ResourceName;
    Console.WriteLine($"Added ad group with resource name '{adGroupResourceName}'.");

    return adGroupResourceName;
}
      

পিএইচপি

private static function createAdGroup(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    string $campaignResourceName
) {
    // Constructs an ad group and sets an optional CPC value.
    $adGroup = new AdGroup([
        'name' => 'Earth to Mars Cruises #' . Helper::getPrintableDatetime(),
        'campaign' => $campaignResourceName,
        'status' => AdGroupStatus::PAUSED,
        'type' => AdGroupType::SEARCH_DYNAMIC_ADS,
        'tracking_url_template' => 'http://tracker.examples.com/traveltracker/{escapedlpurl}',
        'cpc_bid_micros' => 10000000
    ]);

    // Creates an ad group operation.
    $adGroupOperation = new AdGroupOperation();
    $adGroupOperation->setCreate($adGroup);

    // Issues a mutate request to add the ad groups.
    $adGroupServiceClient = $googleAdsClient->getAdGroupServiceClient();
    /** @var MutateAdGroupsResponse $adGroupResponse */
    $adGroupResponse = $adGroupServiceClient->mutateAdGroups(
        MutateAdGroupsRequest::build($customerId, [$adGroupOperation])
    );

    $adGroupResourceName = $adGroupResponse->getResults()[0]->getResourceName();
    printf("Added ad group named '%s'.%s", $adGroupResourceName, PHP_EOL);

    return $adGroupResourceName;
}
      

পাইথন

def create_ad_group(client, customer_id, campaign_resource_name):
    """Creates a Dynamic Search Ad Group under the given Campaign.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID str.
        campaign_resource_name: a resource_name str for a Campaign.

    Returns:
        A resource_name str for the newly created Ad Group.
    """
    # Retrieve a new ad group operation object.
    ad_group_operation = client.get_type("AdGroupOperation")
    # Create an ad group.
    ad_group = ad_group_operation.create
    # Required: set the ad group's type to Dynamic Search Ads.
    ad_group.type_ = client.enums.AdGroupTypeEnum.SEARCH_DYNAMIC_ADS
    ad_group.name = f"Earth to Mars Cruises {uuid4()}"
    ad_group.campaign = campaign_resource_name
    ad_group.status = client.enums.AdGroupStatusEnum.PAUSED
    # Recommended: set a tracking URL template for your ad group if you want to
    # use URL tracking software.
    ad_group.tracking_url_template = (
        "http://tracker.example.com/traveltracker/{escapedlpurl}"
    )
    # Optional: Set the ad group bid value.
    ad_group.cpc_bid_micros = 10000000

    # Retrieve the ad group service.
    ad_group_service = client.get_service("AdGroupService")

    # Issues a mutate request to add the ad group.
    response = ad_group_service.mutate_ad_groups(
        customer_id=customer_id, operations=[ad_group_operation]
    )
    resource_name = response.results[0].resource_name

    print(f'Created Ad Group with resource_name: "{resource_name}"')
      

রুবি

def create_ad_group(client, customer_id, campaign_resource_name)
  ad_group = client.resource.ad_group do |ag|
    ag.type = :SEARCH_DYNAMIC_ADS
    ag.name = "Earth to Mars Cruises #{(Time.now.to_f * 1000).to_i}"

    ag.campaign =  campaign_resource_name

    ag.status = :PAUSED
    ag.tracking_url_template = "http://tracker.example.com/traveltracker/{escapedlpurl}"

    ag.cpc_bid_micros = 3_000_000
  end

  operation = client.operation.create_resource.ad_group(ad_group)

  response = client.service.ad_group.mutate_ad_groups(
    customer_id: customer_id,
    operations: [operation],
  )

  puts("Created ad group with ID: #{response.results.first.resource_name}")
  response.results.first.resource_name
end
      

পার্ল

sub create_ad_group {
  my ($api_client, $customer_id, $campaign_resource_name) = @_;

  # Construct an ad group and set an optional CPC value.
  my $ad_group = Google::Ads::GoogleAds::V16::Resources::AdGroup->new({
    name     => "Earth to Mars Cruises #" . uniqid(),
    campaign => $campaign_resource_name,
    status   => Google::Ads::GoogleAds::V16::Enums::AdGroupStatusEnum::PAUSED,
    type     => SEARCH_DYNAMIC_ADS,
    trackingUrlTemplate =>
      "http://tracker.examples.com/traveltracker/{escapedlpurl}",
    cpcBidMicros => 3000000
  });

  # Create an ad group operation.
  my $ad_group_operation =
    Google::Ads::GoogleAds::V16::Services::AdGroupService::AdGroupOperation->
    new({create => $ad_group});

  # Add the ad group.
  my $ad_groups_response = $api_client->AdGroupService()->mutate({
      customerId => $customer_id,
      operations => [$ad_group_operation]});

  my $ad_group_resource_name = $ad_groups_response->{results}[0]{resourceName};

  printf "Created ad group '%s'.\n", $ad_group_resource_name;

  return $ad_group_resource_name;
}
      

DSA তৈরি করুন

প্রকৃত DSA তৈরি করতে, আপনাকে একটি ExpandedDynamicSearchAdInfo অবজেক্ট ব্যবহার করতে হবে এবং এর নিম্নলিখিত ক্ষেত্রগুলি সেট করতে হবে:

  • প্রয়োজনীয় : description
  • ঐচ্ছিক : description2

এই বিজ্ঞাপনটির শিরোনাম, প্রদর্শন URL, এবং চূড়ান্ত URL থাকবে প্রচারের স্তরে সেট করা DynamicSearchAdsSetting দ্বারা প্রদত্ত ডোমেন নাম-নির্দিষ্ট তথ্য অনুযায়ী পরিবেশন করার সময় স্বয়ংক্রিয়ভাবে তৈরি।

জাভা

private static void addExpandedDSA(
    GoogleAdsClient googleAdsClient, long customerId, String adGroupResourceName) {
  // Creates an ad group ad.
  AdGroupAd adGroupAd =
      AdGroupAd.newBuilder()
          .setAdGroup(adGroupResourceName)
          .setStatus(AdGroupAdStatus.PAUSED)
          // Sets the ad as an expanded dynamic search ad
          .setAd(
              Ad.newBuilder()
                  .setExpandedDynamicSearchAd(
                      ExpandedDynamicSearchAdInfo.newBuilder()
                          .setDescription("Buy tickets now!")
                          .build())
                  .build())
          .build();

  // Creates the operation.
  AdGroupAdOperation operation = AdGroupAdOperation.newBuilder().setCreate(adGroupAd).build();

  // Creates the ad group ad service client.
  try (AdGroupAdServiceClient adGroupAdServiceClient =
      googleAdsClient.getLatestVersion().createAdGroupAdServiceClient()) {
    // Adds the dynamic search ad.
    MutateAdGroupAdsResponse response =
        adGroupAdServiceClient.mutateAdGroupAds(
            Long.toString(customerId), ImmutableList.of(operation));
    // Displays the response.
    System.out.printf(
        "Added ad group ad with resource name '%s'.%n", response.getResults(0).getResourceName());
  }
}
      

সি#

private static void AddExpandedDSA(GoogleAdsClient client, long customerId,
    string adGroupResourceName)
{
    // Get the AdGroupAdService.
    AdGroupAdServiceClient adGroupAdService =
        client.GetService(Services.V16.AdGroupAdService);

    // Create an ad group ad.
    AdGroupAd adGroupAd = new AdGroupAd()
    {
        AdGroup = adGroupResourceName,
        Status = AdGroupAdStatus.Paused,

        // Set the ad as an expanded dynamic search ad.
        Ad = new Ad()
        {
            ExpandedDynamicSearchAd = new ExpandedDynamicSearchAdInfo()
            {
                Description = "Buy tickets now!"
            }
        }
    };

    // Create the operation.
    AdGroupAdOperation operation = new AdGroupAdOperation()
    {
        Create = adGroupAd
    };

    // Add the dynamic search ad.
    MutateAdGroupAdsResponse response = adGroupAdService.MutateAdGroupAds(
        customerId.ToString(), new AdGroupAdOperation[] { operation });

    // Display the response.
    Console.WriteLine($"Added ad group ad with resource name " +
        $"'{response.Results[0].ResourceName}'.");
}
      

পিএইচপি

private static function createExpandedDSA(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    string $adGroupResourceName
) {
    $adGroupAd = new AdGroupAd([
        'ad_group' => $adGroupResourceName,
        'status' => AdGroupAdStatus::PAUSED,
        'ad' => new Ad([
            'expanded_dynamic_search_ad' => new ExpandedDynamicSearchAdInfo([
                'description' => 'Buy tickets now!'
            ])
        ])
    ]);

    $adGroupAdOperation = new AdGroupAdOperation();
    $adGroupAdOperation->setCreate($adGroupAd);

    // Issues a mutate request to add the ad group ads.
    $adGroupAdServiceClient = $googleAdsClient->getAdGroupAdServiceClient();
    /** @var MutateAdGroupAdsResponse $adGroupAdResponse */
    $adGroupAdResponse = $adGroupAdServiceClient->mutateAdGroupAds(
        MutateAdGroupAdsRequest::build($customerId, [$adGroupAdOperation])
    );

    $adGroupAdResourceName = $adGroupAdResponse->getResults()[0]->getResourceName();
    printf("Added ad group ad named '%s'.%s", $adGroupAdResourceName, PHP_EOL);

    return $adGroupAdResourceName;
}
      

পাইথন

def create_expanded_dsa(client, customer_id, ad_group_resource_name):
    """Creates a dynamic search ad under the given ad group.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a client customer ID str.
        ad_group_resource_name: a resource_name str for an Ad Group.
    """
    # Retrieve a new ad group ad operation object.
    ad_group_ad_operation = client.get_type("AdGroupAdOperation")
    # Create and expanded dynamic search ad. This ad will have its headline,
    # display URL and final URL auto-generated at serving time according to
    # domain name specific information provided by DynamicSearchAdSetting at
    # the campaign level.
    ad_group_ad = ad_group_ad_operation.create
    # Optional: set the ad status.
    ad_group_ad.status = client.enums.AdGroupAdStatusEnum.PAUSED
    # Set the ad description.
    ad_group_ad.ad.expanded_dynamic_search_ad.description = "Buy tickets now!"
    ad_group_ad.ad_group = ad_group_resource_name

    # Retrieve the ad group ad service.
    ad_group_ad_service = client.get_service("AdGroupAdService")

    # Submit the ad group ad operation to add the ad group ad.
    response = ad_group_ad_service.mutate_ad_group_ads(
        customer_id=customer_id, operations=[ad_group_ad_operation]
    )
    resource_name = response.results[0].resource_name

    print(f'Created Ad Group Ad with resource_name: "{resource_name}"')
      

রুবি

def create_expanded_dsa(client, customer_id, ad_group_resource_name)
  ad_group_ad = client.resource.ad_group_ad do |aga|
    aga.status = :PAUSED
    aga.ad = client.resource.ad do |ad|
      ad.expanded_dynamic_search_ad = client.resource.expanded_dynamic_search_ad_info do |info|
        info.description = "Buy tickets now!"
      end
    end

    aga.ad_group = ad_group_resource_name
  end

  operation = client.operation.create_resource.ad_group_ad(ad_group_ad)

  response = client.service.ad_group_ad.mutate_ad_group_ads(
    customer_id: customer_id,
    operations: [operation],
  )
  puts("Created ad group ad with ID: #{response.results.first.resource_name}")
end
      

পার্ল

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

  # Create an ad group ad.
  my $ad_group_ad = Google::Ads::GoogleAds::V16::Resources::AdGroupAd->new({
      adGroup => $ad_group_resource_name,
      status => Google::Ads::GoogleAds::V16::Enums::AdGroupAdStatusEnum::PAUSED,
      ad     => Google::Ads::GoogleAds::V16::Resources::Ad->new({
          expandedDynamicSearchAd =>
            Google::Ads::GoogleAds::V16::Common::ExpandedDynamicSearchAdInfo->
            new({
              description => "Buy tickets now!"
            })})});

  # Create an ad group ad operation.
  my $ad_group_ad_operation =
    Google::Ads::GoogleAds::V16::Services::AdGroupAdService::AdGroupAdOperation
    ->new({create => $ad_group_ad});

  # Add the ad group ad.
  my $ad_group_ads_response = $api_client->AdGroupAdService()->mutate({
      customerId => $customer_id,
      operations => [$ad_group_ad_operation]});

  my $ad_group_ad_resource_name =
    $ad_group_ads_response->{results}[0]{resourceName};

  printf "Created ad group ad '%s'.\n", $ad_group_ad_resource_name;

  return $ad_group_ad_resource_name;
}
      

final_urls ফিল্ডটি Google Ads দ্বারা গণনা করা হয় যখন এটি DSA তৈরি করে। ফলস্বরূপ, আপনি DSA তৈরি করার সময় এই ক্ষেত্রটি সেট করতে পারবেন না। URL ট্র্যাকিং সফ্টওয়্যার ব্যবহার করার জন্য, আপনি নির্দিষ্ট করতে পারেন যে কোন অতিরিক্ত ট্র্যাকিং প্যারামিটার বা রিডাইরেক্টের প্রয়োজন tracking_url_template ক্ষেত্র ব্যবহার করে। এই ক্ষেত্রটি নির্দিষ্ট করার সময়, আপনাকে অবশ্যই নিম্নলিখিত প্যারামিটারগুলির মধ্যে একটি অন্তর্ভুক্ত করতে হবে যাতে Google বিজ্ঞাপনগুলি ফলাফলের সাথে মিলে যাওয়া চূড়ান্ত ইউআরএলে রাখতে পারে:

প্যারামিটার ব্যাখ্যা
{unescapedlpurl}

আনস্কেপড ল্যান্ডিং পেজ ইউআরএল—যদি আপনি শেষ পর্যন্ত কিছু যোগ করতে চান, যেমন:

{unescapedlpurl}?dsa=true

{escapedlpurl}

এস্কেপড (ইউআরএল এনকোডেড) ল্যান্ডিং পেজ ইউআরএল—যদি আপনি কোনো ট্র্যাকারে রিডাইরেক্ট করতে চান, উদাহরণস্বরূপ:

http://tracking.com/lp={escapedurl}

{lpurlpath}

কম্পিউটেড ইউআরএল থেকে শুধুমাত্র পাথ এবং কোয়েরি প্যারাম, যেমন:

http://tracking.com.com/track/{lpurlpath}

{lpurl}

এনকোড ? এবং = ল্যান্ডিং পৃষ্ঠার URL, অনুসন্ধান ক্যোয়ারী দিয়ে শেষ হয়। tracking_url_template ক্ষেত্রের একেবারে শুরুতে পাওয়া গেলে, এটি আসলে {unescapedurl} মান দ্বারা প্রতিস্থাপিত হবে, উদাহরণস্বরূপ:

http://tracking.com/redir.php?tracking=xyz&url={lpurl}

উদাহরণ স্বরূপ:

জাভা

dsa.setTrackingUrlTemplate(
    StringValue.of("http://example.com/traveltracker/{escapedlpurl}"));

DSA-এর জন্য মানদণ্ড নির্দিষ্ট করুন

অবশেষে, আপনি DSA-এর পরিবেশন ট্রিগার করার জন্য কিছু মানদণ্ড সেট আপ করতে চাইবেন। এটি AdGroupCriterion এর ফিল্ড webpage ব্যবহার করে করা হয়। এই webpage ক্ষেত্রটি একটি WebpageInfo অবজেক্ট হিসাবে সেট করা হয়েছে যা এক থেকে তিনটি conditions মধ্যে অনুমতি দেয়।

এই conditions হল WebpageConditionInfo দৃষ্টান্ত যা আপনাকে প্রচারের সেটিংসে পূর্বে নির্দিষ্ট করা ডোমেনের মধ্যে ঠিক কী ফিল্টার বা অনুসন্ধান করতে হবে তা নির্দিষ্ট করতে দেয়৷ আপনি একটি ডোমেনের মধ্যে পাঁচটি আইটেম ফিল্টার করতে পারেন:

ওয়েবপেজ কন্ডিশন অপারেন্ড বর্ণনা
URL একটি পৃষ্ঠার একটি আংশিক URL এর সাথে মিলে যাওয়া একটি স্ট্রিং৷
CATEGORY সুনির্দিষ্টভাবে মেলে একটি বিভাগ সহ একটি স্ট্রিং৷
PAGE_TITLE একটি আংশিক পৃষ্ঠা শিরোনাম মিলে একটি স্ট্রিং৷
PAGE_CONTENT কোনো প্রদত্ত সূচিবদ্ধ পৃষ্ঠার মধ্যে কিছু বিষয়বস্তুর সাথে মিলে যাওয়া একটি স্ট্রিং।
CUSTOM_LABEL একটি ওয়েবপেজ কাস্টম লেবেল টার্গেটিং অবস্থার সাথে মেলে একটি স্ট্রিং৷ কাস্টম লেবেল ব্যবহার করে লক্ষ্য পৃষ্ঠা ফিড URL দেখুন।

উদাহরণস্বরূপ, আপনি একটি ওয়েবপৃষ্ঠার মানদণ্ড তৈরি করতে পারেন যা একটি অবকাশের সাইটের /children শাখায় অবস্থিত সমস্ত কিছুকে লক্ষ্য করে ( URL শর্ত), তবে শুধুমাত্র সেই পৃষ্ঠাগুলি যেখানে শিরোনামে "বিশেষ অফার" রয়েছে ( PAGE_TITLE শর্ত)৷

সাইটের বিভাগ আবিষ্কার করা

আপনি GAQL ক্যোয়ারীতে domain_category রিসোর্সের ক্ষেত্রগুলি নির্বাচন করে Google আপনার সাইটে প্রযোজ্য বলে মনে করে DomainCategory এর তালিকা পুনরুদ্ধার এবং ফিল্টার করতে পারেন।

নিম্নলিখিত GAQL ক্যোয়ারীটি একটি নির্দিষ্ট সাইট এবং একটি নির্দিষ্ট প্রচারাভিযানের জন্য ডোমেন বিভাগের তালিকা পুনরুদ্ধার করে, তার আইডিতে ফিল্টার করে:

SELECT
  domain_category.category,
  domain_category.language_code,
  domain_category.recommended_cpc_bid_micros
FROM domain_category
WHERE domain_category.domain = 'example.com'
  AND campaign.id = campaign_id

সাইটের অংশ বাদ

নেতিবাচক ওয়েবপৃষ্ঠার মানদণ্ড সেট আপ করতে আপনি AdGroupCriterionService ব্যবহার করতে পারেন। আপনি এটি ব্যবহার করতে পারেন, উদাহরণস্বরূপ, একটি নির্দিষ্ট শিরোনাম সহ পৃষ্ঠাগুলি বাদ দিতে যা আপনি অন্য প্রচারাভিযান বা বিজ্ঞাপন গোষ্ঠীর সাথে পরিচালনা করতে চান৷

অন্যান্য মানদণ্ড

DSA প্রচারাভিযান এবং বিজ্ঞাপন গোষ্ঠীগুলি শুধুমাত্র ওয়েবপৃষ্ঠার মানদণ্ডে সীমাবদ্ধ নয়; আপনার বিজ্ঞাপনের গুণমান আরও পরিমার্জিত ও উন্নত করতে আপনি অন্যান্য মানদণ্ডের ধরনগুলি ব্যবহার করা চালিয়ে যেতে পারেন৷ আপনার অতিরিক্ত মানদণ্ডের ব্যবহারে আপনার বুদ্ধিমান হওয়া উচিত, যদিও, অনেকগুলি যোগ করা একটি DSA-এর স্বয়ং-লক্ষ্যকরণের কার্যকারিতা হ্রাস করতে পারে।