গ্রাহক ম্যাচ দিয়ে শুরু করুন

কাস্টমার ম্যাচ আপনাকে সার্চ, শপিং ট্যাব, Gmail, ইউটিউব এবং ডিসপ্লে জুড়ে আপনার গ্রাহকদের কাছে পৌঁছাতে এবং তাদের সাথে পুনরায় যুক্ত হতে আপনার অনলাইন এবং অফলাইন ডেটা ব্যবহার করতে দেয়। আপনার গ্রাহকরা আপনার সাথে যে তথ্য শেয়ার করেছেন তা ব্যবহার করে, গ্রাহক ম্যাচ সেই গ্রাহকদের এবং তাদের মতো অন্যান্য গ্রাহকদের বিজ্ঞাপন লক্ষ্য করে। আপনি বাল্কে গ্রাহক সম্পর্ক ব্যবস্থাপনা (CRM) ডেটা আপলোড করতে পারেন, ডেটা যোগ করতে বা সরাতে পারেন, অথবা একটি logical_user_list তৈরি করতে এই ব্যবহারকারী তালিকাগুলি ব্যবহার করতে পারেন।

অন্যান্য ব্যবহারকারী তালিকা বিকল্পের সাথে গ্রাহক মিলের তুলনা করতে বিভিন্ন ধরনের দর্শক বিভাগের তালিকার জন্য দর্শক ব্যবস্থাপনা ওভারভিউ দেখুন।

কাস্টমার ম্যাচ এবং দর্শক টার্গেটিং সম্পর্কে আরও জানুন।

পূর্বশর্ত

প্রতিটি অ্যাকাউন্ট গ্রাহক ম্যাচ ব্যবহার করার যোগ্য নয়। গ্রাহক ম্যাচ ব্যবহার করতে, আপনার অ্যাকাউন্টে নিম্নলিখিতগুলি থাকতে হবে:

  • নীতি সম্মতির একটি ভাল ইতিহাস
  • একটি ভাল পেমেন্ট ইতিহাস

আপনার অ্যাকাউন্ট কোন প্রয়োজনীয়তাগুলি পূরণ করে তার উপর নির্ভর করে, বিভিন্ন বৈশিষ্ট্য উপলব্ধ। যোগ্যতার প্রয়োজনীয়তা এবং বিধিনিষেধের জন্য গ্রাহক ম্যাচ নীতি পড়ুন।

আপনার ইন্টিগ্রেশন ডিজাইন

ব্যবহার প্রবাহ

এখানে একটি গ্রাহক তালিকা তৈরি এবং লক্ষ্য করার জন্য প্রস্তাবিত প্রবাহ:

  1. একটি খালি গ্রাহক তালিকা তৈরি করুন।

  2. একটি OfflineUserDataJob তৈরি করুন। একাধিক ছোট চাকরির চেয়ে একটি বড় কাজ তৈরি করা অনেক বেশি কার্যকর।

    Google Ads API-এর ভার্সন v15 দিয়ে শুরু করে, আপনার OfflineUserDataJob create রিকোয়েস্টে customer_match_user_list_metadata এর consent ক্ষেত্রটি পূরণ করতে হবে। অনুরোধগুলি remove জন্য, সম্মতির প্রয়োজন নেই। চাকরির consent.ad_user_data বা consent.ad_personalization DENIED এ সেট করা থাকলে API OfflineUserDataJobError.CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS প্রদান করে। যদি একজন শনাক্তকারীর DENIED এর সম্মতি থাকে, তাহলে আপনি ব্যবহারকারীর তালিকা থেকে শনাক্তকারীকে সরানোর জন্য একটি কাজ তৈরি করতে পারেন।

  3. OfflineUserDataJobService.AddOfflineUserDataJobOperations পদ্ধতি ব্যবহার করে অপারেশন যোগ করুন। আমরা সর্বোত্তম প্রক্রিয়াকরণের জন্য একটি একক কলে 10,000 পর্যন্ত মোট শনাক্তকারী যোগ করার পরামর্শ দিই। একটি একক AddOfflineUserDataJobOperations অনুরোধে অপারেশন তালিকার সমস্ত UserData অবজেক্ট জুড়ে সর্বাধিক 100,000 শনাক্তকারী থাকতে পারে।

    উদাহরণস্বরূপ, যদি আপনার প্রতিটি UserData অবজেক্টে hashed_email এর জন্য একটি UserIdentifier এবং hashed_phone_number এর জন্য আরেকটি UserIdentifier থাকে, তাহলে প্রতি অনুরোধে 5,000 UserData অবজেক্ট পাঠানো সর্বোত্তম কারণ প্রতিটি অনুরোধে মোট 10,000 ব্যবহারকারী শনাক্তকারী থাকবে।

  4. সমস্ত ক্রিয়াকলাপ যুক্ত না হওয়া পর্যন্ত বা কাজটি সক্ষম না হওয়া পর্যন্ত পূর্ববর্তী পদক্ষেপটি পুনরাবৃত্তি করুন। আপনি একটি একক কাজ যোগ করতে পারেন অপারেশন সংখ্যা কোন সীমা নেই; যাইহোক, আমরা সর্বোত্তম প্রক্রিয়াকরণের জন্য প্রতি কাজ 1,000,000 টির বেশি অপারেশনের সুপারিশ করি না।

  5. কাজ চালান।

  6. সফল আপলোডের জন্য পোল।

  7. ম্যাচ রেট যাচাই করুন।

  8. তালিকা টার্গেট করুন।

OfflineUserDataJobService এবং UserDataService

গ্রাহক ম্যাচ ডেটা আপলোড করার জন্য দুটি পরিষেবা উপলব্ধ রয়েছে৷ আপনার ব্যবহারের ক্ষেত্রের উপর ভিত্তি করে পরিষেবাটি নির্বাচন করুন কারণ কোনও পরিষেবার জন্য সীমাবদ্ধতা থাকতে পারে।

গ্রাহক ম্যাচ আপলোড পরিষেবা
OfflineUserDataJobService (পছন্দের) বেশিরভাগ বিকাশকারী এই পরিষেবাটি ব্যবহার করেন। এটি উচ্চ থ্রুপুট সহ বড় আপলোডগুলির জন্য অপ্টিমাইজ করা হয়েছে এবং সমাপ্তির পরে সাফল্যের মেট্রিক্স প্রদান করে৷ এই নির্দেশিকা প্রাথমিকভাবে এই পরিষেবার উপর ফোকাস করে।
UserDataService এই পরিষেবাটি বিক্ষিপ্ত আপডেট সহ একটি সময়ে অল্প সংখ্যক শনাক্তকারী আপলোড করার জন্য অপ্টিমাইজ করা হয়েছে এবং ক্রমাগত চালানোর জন্য অপ্টিমাইজ করা হয় না। এটির প্রতি অনুরোধের 10টি অপারেশনের সীমা রয়েছে। উপরন্তু, একটি একক অনুরোধে সমস্ত user_identifiers জুড়ে মোট 100টির বেশি আইটেম থাকতে পারে না।

এই পরিষেবার সাথে আপলোডের দিকনির্দেশের জন্য, আপনার কাস্টমার ম্যাচ ইন্টিগ্রেশন পরিচালনার জন্য গাইড দেখুন।

Google Ads API-এর ভার্সন v15 দিয়ে শুরু করে, আপনাকে আপনার UploadUserDataRequest create অনুরোধে customer_match_user_list_metadata এর consent ক্ষেত্রটি পূরণ করতে হবে। অনুরোধগুলি remove জন্য, সম্মতির প্রয়োজন নেই। এপিআই শূন্যে সেট করে received_operations_count সহ একটি প্রতিক্রিয়া প্রদান করে যা নির্দেশ করে যে অনুরোধটি প্রক্রিয়া করা হয়নি যদি consent.ad_user_data বা consent.ad_personalization DENIED করা হয়। যদি কোনো শনাক্তকারীর DENIED এর সম্মতি থাকে, তাহলে আপনি UploadUserDataRequest এর remove অপারেশন ব্যবহার করে ব্যবহারকারীর তালিকা থেকে শনাক্তকারীকে সরানোর অনুরোধ করতে পারেন।

সেরা অনুশীলন

আপনার গ্রাহক ম্যাচ ইন্টিগ্রেশন ডিজাইন করার সময় নিম্নলিখিত সেরা অনুশীলনগুলি মনে রাখবেন:

  • একটি একক ব্যবহারকারী তালিকা সংশোধন করতে একাধিক অ্যাকাউন্ট ব্যবহার করার চেষ্টা করবেন না। ব্যবহারকারীর তালিকা শুধুমাত্র Google Ads বা ডেটা পার্টনার অ্যাকাউন্ট দ্বারা পরিবর্তন করা যেতে পারে যা এটি তৈরি করেছে।

  • RESOURCE_EXHAUSTED ত্রুটি এড়াতে, 10,000 শনাক্তকারী পর্যন্ত, AddOfflineUserDataJobOperationsRequest প্রতি ক্রিয়াকলাপের সংখ্যা সর্বাধিক করুন৷

  • একই OfflineUserDataJob এর মধ্যে ক্রিয়াকলাপ create এবং remove মিশ্রিত করবেন না। এটি করার ফলে একটি CONFLICTING_OPERATION ত্রুটি হতে পারে৷

  • একটি AddOfflineUserDataJobOperationsRequestpartial_failure সক্ষম করুন যাতে কাজ চালানোর আগে কোনো সমস্যাযুক্ত অপারেশন সনাক্ত করা যায়। OfflineUserDataJob এ আপলোড করার সময় অপারেশনগুলি যাচাই করা হয়।

  • একই সাথে একাধিক OfflineUserDataJob প্রসেস চালানো এড়িয়ে চলুন যা একই ব্যবহারকারী তালিকা পরিবর্তন করে (অর্থাৎ, একাধিক কাজ যার CustomerMatchUserListMetadata.user_list একই রিসোর্স নামের দিকে নির্দেশ করে)। এটি করার ফলে একটি CONCURRENT_MODIFICATION ত্রুটি হতে পারে কারণ একাধিক চাকরি একই সময়ে একই তালিকায় কাজ করার অনুমতি নেই৷ Google Ads UI এবং Google Ads API-এর মাধ্যমে একই সাথে একটি তালিকা পরিবর্তন করার চেষ্টা করলেও এই ত্রুটি ঘটতে পারে। মনে রাখবেন যে এটি একটি PENDING চাকরিতে ক্রিয়াকলাপ যোগ করার ক্ষেত্রে প্রযোজ্য নয়, যেটি কাজ শুরু করার আগে যে কোনো সময়ে করা যেতে পারে।

  • আপনার যদি আবেদন করার জন্য হাজার হাজার ক্রিয়াকলাপ থাকে, তবে সমস্ত ক্রিয়াকলাপ সম্বলিত একটি OfflineUserDataJob তৈরি করুন৷ প্রতিটিতে মাত্র কয়েকশ অপারেশন করে একাধিক চাকরি তৈরি করবেন না এবং সেগুলিকে ক্রমানুসারে বা একযোগে চালান। আপনার সমস্ত ক্রিয়াকলাপের সাথে একটি বড় কাজ একাধিক ছোট কাজের চেয়ে অনেক বেশি দক্ষ, এবং আপনার কর্মপ্রবাহে ত্রুটির সম্মুখীন হওয়ার সম্ভাবনা হ্রাস করে।

সর্বোত্তম টার্গেটিংয়ের জন্য কীভাবে আপনার গ্রাহক তালিকাগুলিকে উপকৃত করবেন সে সম্পর্কে ধারণার জন্য, সহায়তা কেন্দ্রে যান৷

একটি গ্রাহক তালিকা তৈরি করুন

প্রথমে, UserListService দিয়ে একটি গ্রাহক তালিকা তৈরি করুন। user_list অবজেক্টে crm_based_user_list ক্ষেত্র সেট করে গ্রাহক তালিকা তৈরি করা হয়। crm_based_user_list ক্ষেত্রটি প্রচারাভিযানের প্রকারে সেট করা যেতে পারে যা গ্রাহক তালিকাকে লক্ষ্য করে সমর্থন করে:

বিভিন্ন ধরনের প্রচারাভিযানে গ্রাহকের মিল
সার্চ নেটওয়ার্ক সার্চ নেটওয়ার্কে বিজ্ঞাপন দেখায়।
ডিসপ্লে নেটওয়ার্ক ডিসপ্লে নেটওয়ার্কে এবং জিএসপি ক্রিয়েটিভ থাকলেই জিমেইলে বিজ্ঞাপন দেখায়।
অনুসন্ধান প্রচারাভিযানে প্রদর্শন সম্প্রসারণ জিএসপি ক্রিয়েটিভ থাকলেই সার্চ নেটওয়ার্কে এবং Gmail-এ বিজ্ঞাপন দেখানো হয়।
ভিডিও প্রচারণা ইন-স্ট্রীম TrueView বিজ্ঞাপন থাকলেই YouTube-এ বিজ্ঞাপন দেখানো হয়।
কেনাকাটা প্রচারণা বিজ্ঞাপনগুলি শপিং ট্যাবে দেখায়৷

crm_based_user_list তিনটি ক্ষেত্র রয়েছে:

  • app_id : একটি স্ট্রিং যা মোবাইল অ্যাপটিকে অনন্যভাবে সনাক্ত করে যেখান থেকে ডেটা সংগ্রহ করা হয়েছে। মোবাইল বিজ্ঞাপন আইডি আপলোড করার জন্য CrmBasedUserList তৈরি করার সময় এটি প্রয়োজন।

  • upload_key_type : তালিকার একটি মিলে যাওয়া কী প্রকার, যা CONTACT_INFO , CRM_ID বা MOBILE_ADVERTISING_ID হতে পারে। একই তালিকায় মিশ্র ডেটা টাইপ অনুমোদিত নয়। এই ক্ষেত্রটি সমস্ত গ্রাহক তালিকার জন্য প্রয়োজনীয়।

  • data_source_type : তালিকার তথ্য উৎস। ডিফল্ট মান হল FIRST_PARTY । অনুমোদিত তালিকাভুক্ত গ্রাহকরা তৃতীয় পক্ষের উৎসযুক্ত গ্রাহক তালিকা তৈরি করতে পারে।

ব্যবহারকারীর তালিকার membership_life_span বৈশিষ্ট্যটি আপনাকে সময়কাল সংজ্ঞায়িত করতে দেয়, দিনে, যার জন্য একজন ব্যবহারকারীকে তালিকায় বিবেচনা করা হয়। গ্রাহক তালিকার ধরন আপনাকে membership_life_span 10,000 এ সেট করতে দেয় যাতে মেয়াদ শেষ না হয়।

membership_status বৈশিষ্ট্য তালিকাটি নতুন ব্যবহারকারীদের গ্রহণ করে কিনা তা নির্ধারণ করে।

একটি গ্রাহক তালিকা তৈরি করতে কোড উদাহরণ

জাভা

private String createCustomerMatchUserList(GoogleAdsClient googleAdsClient, long customerId) {
  // Creates the new user list.
  UserList userList =
      UserList.newBuilder()
          .setName("Customer Match list #" + getPrintableDateTime())
          .setDescription("A list of customers that originated from email addresses")
          // Customer Match user lists can use a membership life span of 10,000 to indicate
          // unlimited; otherwise normal values apply.
          // Sets the membership life span to 30 days.
          .setMembershipLifeSpan(30)
          // Sets the upload key type to indicate the type of identifier that will be used to
          // add users to the list. This field is immutable and required for a CREATE operation.
          .setCrmBasedUserList(
              CrmBasedUserListInfo.newBuilder()
                  .setUploadKeyType(CustomerMatchUploadKeyType.CONTACT_INFO))
          .build();

  // Creates the operation.
  UserListOperation operation = UserListOperation.newBuilder().setCreate(userList).build();

  // Creates the service client.
  try (UserListServiceClient userListServiceClient =
      googleAdsClient.getLatestVersion().createUserListServiceClient()) {
    // Adds the user list.
    MutateUserListsResponse response =
        userListServiceClient.mutateUserLists(
            Long.toString(customerId), ImmutableList.of(operation));
    // Prints the response.
    System.out.printf(
        "Created Customer Match user list with resource name: %s.%n",
        response.getResults(0).getResourceName());
    return response.getResults(0).getResourceName();
  }
}

      

সি#

private string CreateCustomerMatchUserList(GoogleAdsClient client, long customerId)
{
    // Get the UserListService.
    UserListServiceClient service = client.GetService(Services.V16.UserListService);

    // Creates the user list.
    UserList userList = new UserList()
    {
        Name = $"Customer Match list# {ExampleUtilities.GetShortRandomString()}",
        Description = "A list of customers that originated from email and physical" +
            " addresses",
        // Customer Match user lists can use a membership life span of 10000 to
        // indicate unlimited; otherwise normal values apply.
        // Sets the membership life span to 30 days.
        MembershipLifeSpan = 30,
        CrmBasedUserList = new CrmBasedUserListInfo()
        {
            UploadKeyType = CustomerMatchUploadKeyType.ContactInfo
        }
    };
    // Creates the user list operation.
    UserListOperation operation = new UserListOperation()
    {
        Create = userList
    };

    // Issues a mutate request to add the user list and prints some information.
    MutateUserListsResponse response = service.MutateUserLists(
        customerId.ToString(), new[] { operation });
    string userListResourceName = response.Results[0].ResourceName;
    Console.WriteLine($"User list with resource name '{userListResourceName}' " +
        $"was created.");
    return userListResourceName;
}
      

পিএইচপি

private static function createCustomerMatchUserList(
    GoogleAdsClient $googleAdsClient,
    int $customerId
): string {
    // Creates the user list.
    $userList = new UserList([
        'name' => 'Customer Match list #' . Helper::getPrintableDatetime(),
        'description' => 'A list of customers that originated from email '
            . 'and physical addresses',
        // Customer Match user lists can use a membership life span of 10000 to
        // indicate unlimited; otherwise normal values apply.
        // Sets the membership life span to 30 days.
        'membership_life_span' => 30,
        'crm_based_user_list' => new CrmBasedUserListInfo([
            // Sets the upload key type to indicate the type of identifier that will be used to
            // add users to the list. This field is immutable and required for a CREATE
            // operation.
            'upload_key_type' => CustomerMatchUploadKeyType::CONTACT_INFO
        ])
    ]);

    // Creates the user list operation.
    $operation = new UserListOperation();
    $operation->setCreate($userList);

    // Issues a mutate request to add the user list and prints some information.
    $userListServiceClient = $googleAdsClient->getUserListServiceClient();
    $response = $userListServiceClient->mutateUserLists(
        MutateUserListsRequest::build($customerId, [$operation])
    );
    $userListResourceName = $response->getResults()[0]->getResourceName();
    printf("User list with resource name '%s' was created.%s", $userListResourceName, PHP_EOL);

    return $userListResourceName;
}
      

পাইথন

def create_customer_match_user_list(client, customer_id):
    """Creates a Customer Match user list.

    Args:
        client: The Google Ads client.
        customer_id: The ID for the customer that owns the user list.

    Returns:
        The string resource name of the newly created user list.
    """
    # Creates the UserListService client.
    user_list_service_client = client.get_service("UserListService")

    # Creates the user list operation.
    user_list_operation = client.get_type("UserListOperation")

    # Creates the new user list.
    user_list = user_list_operation.create
    user_list.name = f"Customer Match list #{uuid.uuid4()}"
    user_list.description = (
        "A list of customers that originated from email and physical addresses"
    )
    # Sets the upload key type to indicate the type of identifier that is used
    # to add users to the list. This field is immutable and required for a
    # CREATE operation.
    user_list.crm_based_user_list.upload_key_type = (
        client.enums.CustomerMatchUploadKeyTypeEnum.CONTACT_INFO
    )
    # Customer Match user lists can set an unlimited membership life span;
    # to do so, use the special life span value 10000. Otherwise, membership
    # life span must be between 0 and 540 days inclusive. See:
    # https://developers.devsite.corp.google.com/google-ads/api/reference/rpc/latest/UserList#membership_life_span
    # Sets the membership life span to 30 days.
    user_list.membership_life_span = 30

    response = user_list_service_client.mutate_user_lists(
        customer_id=customer_id, operations=[user_list_operation]
    )
    user_list_resource_name = response.results[0].resource_name
    print(
        f"User list with resource name '{user_list_resource_name}' was created."
    )

    return user_list_resource_name
      

রুবি

def create_customer_match_user_list(client, customer_id)
  # Creates the user list.
  operation = client.operation.create_resource.user_list do |ul|
    ul.name = "Customer Match List #{(Time.new.to_f * 1000).to_i}"
    ul.description = "A list of customers that originated from email and " \
      "physical addresses"
    # Customer Match user lists can use a membership life span of 10000 to
    # indicate unlimited; otherwise normal values apply.
    # Sets the membership life span to 30 days.
    ul.membership_life_span = 30
    ul.crm_based_user_list = client.resource.crm_based_user_list_info do |crm|
      crm.upload_key_type = :CONTACT_INFO
    end
  end

  # Issues a mutate request to add the user list and prints some information.
  response = client.service.user_list.mutate_user_lists(
    customer_id: customer_id,
    operations: [operation],
  )

  # Prints out some information about the newly created user list.
  resource_name = response.results.first.resource_name
  puts "User list with resource name #{resource_name} was created."

  resource_name
end
      

পার্ল

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

  # Create the user list.
  my $user_list = Google::Ads::GoogleAds::V16::Resources::UserList->new({
      name        => "Customer Match list #" . uniqid(),
      description =>
        "A list of customers that originated from email and physical addresses",
      # Customer Match user lists can use a membership life span of 10000 to
      # indicate unlimited; otherwise normal values apply.
      # Set the membership life span to 30 days.
      membershipLifeSpan => 30,
      # Set the upload key type to indicate the type of identifier that will be
      # used to add users to the list. This field is immutable and required for
      # a CREATE operation.
      crmBasedUserList =>
        Google::Ads::GoogleAds::V16::Common::CrmBasedUserListInfo->new({
          uploadKeyType => CONTACT_INFO
        })});

  # Create the user list operation.
  my $user_list_operation =
    Google::Ads::GoogleAds::V16::Services::UserListService::UserListOperation->
    new({
      create => $user_list
    });

  # Issue a mutate request to add the user list and print some information.
  my $user_lists_response = $api_client->UserListService()->mutate({
      customerId => $customer_id,
      operations => [$user_list_operation]});
  my $user_list_resource_name =
    $user_lists_response->{results}[0]{resourceName};
  printf "User list with resource name '%s' was created.\n",
    $user_list_resource_name;

  return $user_list_resource_name;
}
      

গ্রাহক ডেটা যোগ করুন

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

CrmBasedUserListInfo.upload_key_type ক্ষেত্র দ্বারা নির্দিষ্ট করা প্রতিটি ব্যবহারকারীর তালিকায় শুধুমাত্র একটি একক ধরনের গ্রাহক ডেটা থাকতে পারে। অধিকন্তু, একটি UserData অবজেক্ট, যা একটি একক ব্যবহারকারীর প্রতিনিধিত্ব করে, এতে 20টি ব্যবহারকারী শনাক্তকারী থাকতে পারে, যার প্রত্যেকটির নিজস্ব UserIdentifier অবজেক্ট রয়েছে। 20 টিরও বেশি শনাক্তকারীর ফলে একটি TOO_MANY_USER_IDENTIFIERS ত্রুটি দেখা দেয়৷

Google Ads শুধুমাত্র একটি কাস্টমার ম্যাচ ইউজার লিস্ট ব্যবহার করে টার্গেট করার জন্য যদি বিজ্ঞাপন পরিবেশনের সময় এটি সক্রিয় ব্যবহারকারীদের ন্যূনতম থ্রেশহোল্ড পূরণ করে থাকে; সক্রিয় ব্যবহারকারী হল আপনার তালিকায় থাকা ব্যবহারকারীদের সংখ্যা যারা Gmail, অনুসন্ধান, ইউটিউব বা ডিসপ্লেতে সক্রিয়। লক্ষ্য করার জন্য পর্যাপ্ত মিলিত, সক্রিয় ব্যবহারকারী থাকার সুযোগ বাড়াতে কমপক্ষে 5,000 সদস্য আপলোড করুন।

ব্যবহারকারীর যোগাযোগের তথ্য আপলোড করুন

ব্যবহারকারীর ইমেল ঠিকানা, মেইলিং ঠিকানা বা ফোন নম্বর আপলোড করতে, CONTACT_INFO তে upload_key_type সেট করুন। মনে রাখবেন যে যোগাযোগের তথ্য মিলে যাওয়ার জন্য অবশ্যই একটি Google অ্যাকাউন্টের সাথে যুক্ত থাকতে হবে এবং কর্পোরেট অ্যাকাউন্টগুলি—যেমন Google Workspace—কে টার্গেট করা যাবে না।

গোপনীয়তার উদ্বেগের জন্য, আপলোড করার আগে ইমেল ঠিকানা, প্রথম নাম, শেষ নাম এবং ফোন নম্বরগুলি অবশ্যই SHA-256 অ্যালগরিদম ব্যবহার করে হ্যাশ করতে হবে৷ হ্যাশ ফলাফল মানক করার জন্য, এই মানগুলির একটি হ্যাশ করার আগে, নিশ্চিত করুন যে আপনি নিম্নলিখিত কাজগুলি সম্পাদন করেছেন:

  • অগ্রণী এবং পিছনের হোয়াইটস্পেসগুলি সরান৷
  • নাম, ইমেল ঠিকানা এবং মেইলিং ঠিকানার জন্য: পাঠ্যকে ছোট হাতের অক্ষরে রূপান্তর করুন।
  • ফোন নম্বরের জন্য: হ্যাশ করার আগে প্রতিটি ফোন নম্বরকে E164 ফর্ম্যাটে রূপান্তর করুন। এই বিন্যাসটি একটি ফোন নম্বরকে একটি + চিহ্ন দিয়ে শুরু করে পনেরটি সংখ্যা পর্যন্ত একটি নম্বর হিসাবে উপস্থাপন করে—উদাহরণস্বরূপ, +12125650000 বা +442070313000 । অগ্রণী + চিহ্নটি ঐচ্ছিকভাবে বাদ দেওয়া যেতে পারে।

ইমেল ঠিকানাগুলির জন্য, আপনাকে gmail.com এবং googlemail.com ইমেল ঠিকানাগুলিতে ডোমেন নামের আগে থাকা সমস্ত সময়সীমা ( . ) সরাতে হবে না কারণ সেগুলি এখনও গৃহীত।

হ্যাশ করার আগে যোগাযোগের তথ্য সঠিকভাবে ফরম্যাট করা না হলে, API এখনও হ্যাশ করা তথ্য গ্রহণ করে, কিন্তু এটি একটি গ্রাহকের সাথে মিলিত হতে পারে না।

আপনি যদি মেইলিং ঠিকানার ডেটা আপলোড করতে চান তবে আপনাকে অবশ্যই অন্তত অন্তর্ভুক্ত করতে হবে:

  • কান্ট্রি কোড
  • পোস্ট অফিসের নাম্বার
  • হ্যাশড প্রথম নাম
  • হ্যাশড পদবি

যদি এই ক্ষেত্রগুলির কোনটি অনুপস্থিত থাকে তবে ঠিকানাটি মেলে না।

গ্রাহক তালিকায় শুধুমাত্র একটি upload_key_type থাকতে পারে, CONTACT_INFO এর একটি upload_key_type এর জন্য একাধিক ধরনের যোগাযোগের তথ্য আপলোড করা যেতে পারে। বর্ধিত ম্যাচ হারের জন্য এটি সুপারিশ করা হয়।

CRM আইডি আপলোড করুন

CRM আইডি সহ গ্রাহক তালিকা পূরণ করতে, CRM_ID তে upload_key_type সেট করুন। CRM আইডিগুলি বিজ্ঞাপনদাতার দ্বারা তৈরি এবং বরাদ্দ করা একটি ব্যবহারকারী আইডি থেকে মিলিত হয়৷ এটি MOBILE_ADVERTISING_ID দৃষ্টান্তগুলি আপলোড করার মতো, তবে আপনি পরিবর্তে UserIdentifier অবজেক্টের third_party_user_id ক্ষেত্রটি পূরণ করুন৷

মোবাইল আইডি আপলোড করুন

একইভাবে ইমেলের সাথে কাস্টমার ম্যাচের মতো, আপনি বিজ্ঞাপনের জন্য শনাক্তকারী (IDFA) বা Google বিজ্ঞাপন আইডি (AAID) মোবাইল ডিভাইস আইডি ব্যবহার করে গ্রাহক ম্যাচিং করতে পারেন। এটি করার জন্য, app_id প্রপার্টি নির্দিষ্ট করুন এবং মোবাইল ডিভাইস আইডির সাথে মিলিত গ্রাহকের জন্য একটি ব্যবহারকারী তালিকা ব্যবহার করার আগে MOBILE_ADVERTISING_IDupload_key_type সেট করুন।

কোড উদাহরণ

নিম্নলিখিত উদাহরণটি একটি গ্রাহক তালিকায় গ্রাহকের যোগাযোগের তথ্য যুক্ত করতে একটি OfflineUserDataJobOperation ব্যবহার করে।

জাভা

// Creates a raw input list of unhashed user information, where each element of the list
// represents a single user and is a map containing a separate entry for the keys "email",
// "phone", "firstName", "lastName", "countryCode", and "postalCode". In your application, this
// data might come from a file or a database.
List<Map<String, String>> rawRecords = new ArrayList<>();
// The first user data has an email address and a phone number.
Map<String, String> rawRecord1 =
    ImmutableMap.<String, String>builder()
        .put("email", "dana@example.com")
        // Phone number to be converted to E.164 format, with a leading '+' as required. This
        // includes whitespace that will be removed later.
        .put("phone", "+1 800 5550101")
        .build();
// The second user data has an email address, a mailing address, and a phone number.
Map<String, String> rawRecord2 =
    ImmutableMap.<String, String>builder()
        // Email address that includes a period (.) before the domain.
        .put("email", "alex.2@example.com")
        // Address that includes all four required elements: first name, last name, country
        // code, and postal code.
        .put("firstName", "Alex")
        .put("lastName", "Quinn")
        .put("countryCode", "US")
        .put("postalCode", "94045")
        // Phone number to be converted to E.164 format, with a leading '+' as required.
        .put("phone", "+1 800 5550102")
        .build();
// The third user data only has an email address.
Map<String, String> rawRecord3 =
    ImmutableMap.<String, String>builder().put("email", "charlie@example.com").build();
// Adds the raw records to the raw input list.
rawRecords.add(rawRecord1);
rawRecords.add(rawRecord2);
rawRecords.add(rawRecord3);

// Iterates over the raw input list and creates a UserData object for each record.
List<UserData> userDataList = new ArrayList<>();
for (Map<String, String> rawRecord : rawRecords) {
  // Creates a builder for the UserData object that represents a member of the user list.
  UserData.Builder userDataBuilder = UserData.newBuilder();
  // Checks if the record has email, phone, or address information, and adds a SEPARATE
  // UserIdentifier object for each one found. For example, a record with an email address and a
  // phone number will result in a UserData with two UserIdentifiers.

  // IMPORTANT: Since the identifier attribute of UserIdentifier
  // (https://developers.google.com/google-ads/api/reference/rpc/latest/UserIdentifier) is a
  // oneof
  // (https://protobuf.dev/programming-guides/proto3/#oneof-features), you must set only ONE of
  // hashedEmail, hashedPhoneNumber, mobileId, thirdPartyUserId, or addressInfo. Setting more
  // than one of these attributes on the same UserIdentifier will clear all the other members
  // of the oneof. For example, the following code is INCORRECT and will result in a
  // UserIdentifier with ONLY a hashedPhoneNumber.
  //
  // UserIdentifier incorrectlyPopulatedUserIdentifier =
  //     UserIdentifier.newBuilder()
  //         .setHashedEmail("...")
  //         .setHashedPhoneNumber("...")
  //         .build();
  //
  // The separate 'if' statements below demonstrate the correct approach for creating a UserData
  // for a member with multiple UserIdentifiers.

  // Checks if the record has an email address, and if so, adds a UserIdentifier for it.
  if (rawRecord.containsKey("email")) {
    UserIdentifier hashedEmailIdentifier =
        UserIdentifier.newBuilder()
            .setHashedEmail(normalizeAndHash(sha256Digest, rawRecord.get("email"), true))
            .build();
    // Adds the hashed email identifier to the UserData object's list.
    userDataBuilder.addUserIdentifiers(hashedEmailIdentifier);
  }

  // Checks if the record has a phone number, and if so, adds a UserIdentifier for it.
  if (rawRecord.containsKey("phone")) {
    UserIdentifier hashedPhoneNumberIdentifier =
        UserIdentifier.newBuilder()
            .setHashedPhoneNumber(normalizeAndHash(sha256Digest, rawRecord.get("phone"), true))
            .build();
    // Adds the hashed phone number identifier to the UserData object's list.
    userDataBuilder.addUserIdentifiers(hashedPhoneNumberIdentifier);
  }

  // Checks if the record has all the required mailing address elements, and if so, adds a
  // UserIdentifier for the mailing address.
  if (rawRecord.containsKey("firstName")) {
    // Checks if the record contains all the other required elements of a mailing address.
    Set<String> missingAddressKeys = new HashSet<>();
    for (String addressKey : new String[] {"lastName", "countryCode", "postalCode"}) {
      if (!rawRecord.containsKey(addressKey)) {
        missingAddressKeys.add(addressKey);
      }
    }

    if (!missingAddressKeys.isEmpty()) {
      System.out.printf(
          "Skipping addition of mailing address information because the following required keys"
              + " are missing: %s%n",
          missingAddressKeys);
    } else {
      // Creates an OfflineUserAddressInfo object that contains all the required elements of a
      // mailing address.
      OfflineUserAddressInfo addressInfo =
          OfflineUserAddressInfo.newBuilder()
              .setHashedFirstName(
                  normalizeAndHash(sha256Digest, rawRecord.get("firstName"), false))
              .setHashedLastName(
                  normalizeAndHash(sha256Digest, rawRecord.get("lastName"), false))
              .setCountryCode(rawRecord.get("countryCode"))
              .setPostalCode(rawRecord.get("postalCode"))
              .build();
      UserIdentifier addressIdentifier =
          UserIdentifier.newBuilder().setAddressInfo(addressInfo).build();
      // Adds the address identifier to the UserData object's list.
      userDataBuilder.addUserIdentifiers(addressIdentifier);
    }
  }

  if (!userDataBuilder.getUserIdentifiersList().isEmpty()) {
    // Builds the UserData and adds it to the list.
    userDataList.add(userDataBuilder.build());
  }
}

// Creates the operations to add users.
List<OfflineUserDataJobOperation> operations = new ArrayList<>();
for (UserData userData : userDataList) {
  operations.add(OfflineUserDataJobOperation.newBuilder().setCreate(userData).build());
}
      

সি#

// Creates a raw input list of unhashed user information, where each element of the list
// represents a single user and is a map containing a separate entry for the keys
// "email", "phone", "firstName", "lastName", "countryCode", and "postalCode".
// In your application, this data might come from a file or a database.
List<Dictionary<string, string>> rawRecords = new List<Dictionary<string, string>>();

// The first user data has an email address and a phone number.
Dictionary<string, string> rawRecord1 = new Dictionary<string, string>();
rawRecord1.Add("email", "dana@example.com");
// Phone number to be converted to E.164 format, with a leading '+' as required.
// This includes whitespace that will be removed later.
rawRecord1.Add("phone", "+1 800 5550101");

// The second user data has an email address, a mailing address, and a phone number.
Dictionary<string, string> rawRecord2 = new Dictionary<string, string>();
// Email address that includes a period (.) before the Gmail domain.
rawRecord2.Add("email", "alex.2@example.com");
// Address that includes all four required elements: first name, last name, country
// code, and postal code.
rawRecord2.Add("firstName", "Alex");
rawRecord2.Add("lastName", "Quinn");
rawRecord2.Add("countryCode", "US");
rawRecord2.Add("postalCode", "94045");
// Phone number to be converted to E.164 format, with a leading '+' as required.
// This includes whitespace that will be removed later.
rawRecord2.Add("phone", "+1 800 5550102");

// The third user data only has an email address.
Dictionary<string, string> rawRecord3 = new Dictionary<string, string>();
rawRecord3.Add("email", "charlie@example.com");

// Adds the raw records to the raw input list.
rawRecords.Add(rawRecord1);
rawRecords.Add(rawRecord2);
rawRecords.Add(rawRecord3);

// Iterates over the raw input list and creates a UserData object for each record.
List<UserData> userDataList = new List<UserData>();
foreach (Dictionary<string, string> rawRecord in rawRecords) {
    // Creates a UserData object that represents a member of the user list.
    UserData userData = new UserData();
    // Checks if the record has email, phone, or address information, and adds a
    // SEPARATE UserIdentifier object for each one found.
    // For example, a record with an email address and a phone number will result in a
    // UserData with two UserIdentifiers.

    // IMPORTANT: Since the identifier attribute of UserIdentifier
    // (https://developers.google.com/google-ads/api/reference/rpc/latest/UserIdentifier)
    // is a oneof
    // (https://protobuf.dev/programming-guides/proto3/#oneof-features), you must set
    // only ONE of hashedEmail, hashedPhoneNumber, mobileId, thirdPartyUserId,
    // or addressInfo.
    // Setting more than one of these attributes on the same UserIdentifier will clear
    // all the other members of the oneof.
    // For example, the following code is INCORRECT and will result in a UserIdentifier
    // with ONLY a hashedPhoneNumber.
    //
    // UserIdentifier incorrectlyPopulatedUserIdentifier = new UserIdentifier()
    // {
    //      HashedEmail = "...",
    //      HashedPhoneNumber = "..."
    // };
    //
    // The separate 'if' statements below demonstrate the correct approach for creating
    // a UserData for a member with multiple UserIdentifiers.

    // Checks if the record has an email address, and if so, adds a UserIdentifier
    // for it.
    if (rawRecord.ContainsKey("email")) {
        UserIdentifier hashedEmailIdentifier = new UserIdentifier()
        {
            HashedEmail = NormalizeAndHash(rawRecord["email"], true)
        };

        userData.UserIdentifiers.Add(hashedEmailIdentifier);
    }

    // Checks if the record has a phone number, and if so, adds a UserIdentifier for it.
    if (rawRecord.ContainsKey("phone")) {
        UserIdentifier hashedPhoneNumberIdentifier = new UserIdentifier()
        {
            HashedPhoneNumber = NormalizeAndHash(rawRecord["phone"], true)
        };

        // Adds the hashed phone number identifier to the UserData object's list.
        userData.UserIdentifiers.Add(hashedPhoneNumberIdentifier);
    }

    // Checks if the record has all the required mailing address elements, and if so,
    // adds a UserIdentifier for the mailing address.
    if (rawRecord.ContainsKey("firstName")) {
        // Checks if the record contains all the other required elements of a mailing
        // address.
        HashSet<string> missingAddressKeys = new HashSet<string>();
        foreach (string addressKey in new string[] {"lastName", "countryCode",
            "postalCode"}) {
        if (!rawRecord.ContainsKey(addressKey)) {
            missingAddressKeys.Add(addressKey);
        }
        }

        if (!missingAddressKeys.Any()) {
        Console.WriteLine(
            $"Skipping addition of mailing address information because the following " +
                "required keys are missing: {missingAddressKeys}");
        } else {
            // Creates an OfflineUserAddressInfo object that contains all the required
            // elements of a mailing address.
            OfflineUserAddressInfo addressInfo = new OfflineUserAddressInfo()
            {
                HashedFirstName = NormalizeAndHash(rawRecord["firstName"]),
                HashedLastName = NormalizeAndHash(rawRecord["lastName"]),
                CountryCode = rawRecord["countryCode"],
                PostalCode = rawRecord["postalCode"]
            };

            UserIdentifier addressIdentifier = new UserIdentifier()
            {
                AddressInfo = addressInfo
            };

            // Adds the address identifier to the UserData object's list.
            userData.UserIdentifiers.Add(addressIdentifier);
        }
    }

    if (userData.UserIdentifiers.Any())
    {
        userDataList.Add(userData);
    }
}

// Creates the operations to add the users.
List<OfflineUserDataJobOperation> operations = new List<OfflineUserDataJobOperation>();
foreach(UserData userData in userDataList)
{
    operations.Add(new OfflineUserDataJobOperation()
    {
        Create = userData
    });
}
      

পিএইচপি

// Creates a raw input list of unhashed user information, where each element of the list
// represents a single user and is a map containing a separate entry for the keys 'email',
// 'phone', 'firstName', 'lastName', 'countryCode', and 'postalCode'. In your application,
// this data might come from a file or a database.
$rawRecords = [];
// The first user data has an email address and a phone number.
$rawRecord1 = [
    // The first user data has an email address and a phone number.
    'email' => 'dana@example.com',
    // Phone number to be converted to E.164 format, with a leading '+' as required. This
    // includes whitespace that will be removed later.
    'phone' => '+1 800 5550101'
];
$rawRecords[] = $rawRecord1;

// The second user data has an email address, a mailing address, and a phone number.
$rawRecord2 = [
    // Email address that includes a period (.) before the Gmail domain.
    'email' => 'alex.2@example.com',
    // Address that includes all four required elements: first name, last name, country
    // code, and postal code.
    'firstName' => 'Alex',
    'lastName' => 'Quinn',
    'countryCode' => 'US',
    'postalCode' => '94045',
    // Phone number to be converted to E.164 format, with a leading '+' as required.
    'phone' => '+1 800 5550102',
];
$rawRecords[] = $rawRecord2;

// The third user data only has an email address.
$rawRecord3 = ['email' => 'charlie@example.com'];
$rawRecords[] = $rawRecord3;

// Iterates over the raw input list and creates a UserData object for each record.
$userDataList = [];
foreach ($rawRecords as $rawRecord) {
    // Checks if the record has email, phone, or address information, and adds a SEPARATE
    // UserIdentifier object for each one found. For example, a record with an email address
    // and a phone number will result in a UserData with two UserIdentifiers.

    // IMPORTANT: Since the identifier attribute of UserIdentifier
    // (https://developers.google.com/google-ads/api/reference/rpc/latest/UserIdentifier) is
    // a oneof
    // (https://protobuf.dev/programming-guides/proto3/#oneof-features), you must set only
    // ONE of 'hashed_email, 'hashed_phone_number', 'mobile_id', 'third_party_user_id', or
    // 'address_info'.
    // Setting more than one of these attributes on the same UserIdentifier will clear all
    // the other members of the oneof. For example, the following code is INCORRECT and will
    // result in a UserIdentifier with ONLY a 'hashed_phone_number'.
    //
    // $incorrectlyPopulatedUserIdentifier = new UserIdentifier();
    // $incorrectlyPopulatedUserIdentifier->setHashedEmail('...');
    // $incorrectlyPopulatedUserIdentifier->setHashedPhoneNumber('...');
    //
    // The separate 'if' statements below demonstrate the correct approach for creating a
    // UserData for a member with multiple UserIdentifiers.

    $userIdentifiers = [];
    // Checks if the record has an email address, and if so, adds a UserIdentifier for it.
    if (array_key_exists('email', $rawRecord)) {
        $hashedEmailIdentifier = new UserIdentifier([
            'hashed_email' => self::normalizeAndHash($rawRecord['email'], true)
        ]);
        // Adds the hashed email identifier to the user identifiers list.
        $userIdentifiers[] = $hashedEmailIdentifier;
    }

    // Checks if the record has a phone number, and if so, adds a UserIdentifier for it.
    if (array_key_exists('phone', $rawRecord)) {
        $hashedPhoneNumberIdentifier = new UserIdentifier([
            'hashed_phone_number' => self::normalizeAndHash($rawRecord['phone'], true)
        ]);
        // Adds the hashed email identifier to the user identifiers list.
        $userIdentifiers[] = $hashedPhoneNumberIdentifier;
    }

    // Checks if the record has all the required mailing address elements, and if so, adds a
    // UserIdentifier for the mailing address.
    if (array_key_exists('firstName', $rawRecord)) {
        // Checks if the record contains all the other required elements of a mailing
        // address.
        $missingAddressKeys = [];
        foreach (['lastName', 'countryCode', 'postalCode'] as $addressKey) {
            if (!array_key_exists($addressKey, $rawRecord)) {
                $missingAddressKeys[] = $addressKey;
            }
        }
        if (!empty($missingAddressKeys)) {
            printf(
                "Skipping addition of mailing address information because the "
                . "following required keys are missing: %s%s",
                json_encode($missingAddressKeys),
                PHP_EOL
            );
        } else {
            // Creates an OfflineUserAddressInfo object that contains all the required
            // elements of a mailing address.
            $addressIdentifier = new UserIdentifier([
               'address_info' => new OfflineUserAddressInfo([
                   'hashed_first_name' => self::normalizeAndHash(
                       $rawRecord['firstName'],
                       false
                   ),
                   'hashed_last_name' => self::normalizeAndHash(
                       $rawRecord['lastName'],
                       false
                   ),
                   'country_code' => $rawRecord['countryCode'],
                   'postal_code' => $rawRecord['postalCode']
               ])
            ]);
            // Adds the address identifier to the user identifiers list.
            $userIdentifiers[] = $addressIdentifier;
        }
    }
    if (!empty($userIdentifiers)) {
        // Builds the UserData and adds it to the list.
        $userDataList[] = new UserData(['user_identifiers' => $userIdentifiers]);
    }
}

// Creates the operations to add users.
$operations = array_map(
    function (UserData $userData) {
        return new OfflineUserDataJobOperation(['create' => $userData]);
    },
    $userDataList
);
      

পাইথন

def build_offline_user_data_job_operations(client):
    """Creates a raw input list of unhashed user information.

    Each element of the list represents a single user and is a dict containing a
    separate entry for the keys "email", "phone", "first_name", "last_name",
    "country_code", and "postal_code". In your application, this data might come
    from a file or a database.

    Args:
        client: The Google Ads client.

    Returns:
        A list containing the operations.
    """
    # The first user data has an email address and a phone number.
    raw_record_1 = {
        "email": "dana@example.com",
        # Phone number to be converted to E.164 format, with a leading '+' as
        # required. This includes whitespace that will be removed later.
        "phone": "+1 800 5550101",
    }

    # The second user data has an email address, a mailing address, and a phone
    # number.
    raw_record_2 = {
        # Email address that includes a period (.) before the email domain.
        "email": "alex.2@example.com",
        # Address that includes all four required elements: first name, last
        # name, country code, and postal code.
        "first_name": "Alex",
        "last_name": "Quinn",
        "country_code": "US",
        "postal_code": "94045",
        # Phone number to be converted to E.164 format, with a leading '+' as
        # required.
        "phone": "+1 800 5550102",
    }

    # The third user data only has an email address.
    raw_record_3 = {"email": "charlie@example.com"}

    # Adds the raw records to a raw input list.
    raw_records = [raw_record_1, raw_record_2, raw_record_3]

    operations = []
    # Iterates over the raw input list and creates a UserData object for each
    # record.
    for record in raw_records:
        # Creates a UserData object that represents a member of the user list.
        user_data = client.get_type("UserData")

        # Checks if the record has email, phone, or address information, and
        # adds a SEPARATE UserIdentifier object for each one found. For example,
        # a record with an email address and a phone number will result in a
        # UserData with two UserIdentifiers.

        # IMPORTANT: Since the identifier attribute of UserIdentifier
        # (https://developers.google.com/google-ads/api/reference/rpc/latest/UserIdentifier)
        # is a oneof
        # (https://protobuf.dev/programming-guides/proto3/#oneof-features), you
        # must set only ONE of hashed_email, hashed_phone_number, mobile_id,
        # third_party_user_id, or address-info. Setting more than one of these
        # attributes on the same UserIdentifier will clear all the other members
        # of the oneof. For example, the following code is INCORRECT and will
        # result in a UserIdentifier with ONLY a hashed_phone_number:

        # incorrect_user_identifier = client.get_type("UserIdentifier")
        # incorrect_user_identifier.hashed_email = "..."
        # incorrect_user_identifier.hashed_phone_number = "..."

        # The separate 'if' statements below demonstrate the correct approach
        # for creating a UserData object for a member with multiple
        # UserIdentifiers.

        # Checks if the record has an email address, and if so, adds a
        # UserIdentifier for it.
        if "email" in record:
            user_identifier = client.get_type("UserIdentifier")
            user_identifier.hashed_email = normalize_and_hash(
                record["email"], True
            )
            # Adds the hashed email identifier to the UserData object's list.
            user_data.user_identifiers.append(user_identifier)

        # Checks if the record has a phone number, and if so, adds a
        # UserIdentifier for it.
        if "phone" in record:
            user_identifier = client.get_type("UserIdentifier")
            user_identifier.hashed_phone_number = normalize_and_hash(
                record["phone"], True
            )
            # Adds the hashed phone number identifier to the UserData object's
            # list.
            user_data.user_identifiers.append(user_identifier)

        # Checks if the record has all the required mailing address elements,
        # and if so, adds a UserIdentifier for the mailing address.
        if "first_name" in record:
            required_keys = ("last_name", "country_code", "postal_code")
            # Checks if the record contains all the other required elements of
            # a mailing address.
            if not all(key in record for key in required_keys):
                # Determines which required elements are missing from the
                # record.
                missing_keys = record.keys() - required_keys
                print(
                    "Skipping addition of mailing address information "
                    "because the following required keys are missing: "
                    f"{missing_keys}"
                )
            else:
                user_identifier = client.get_type("UserIdentifier")
                address_info = user_identifier.address_info
                address_info.hashed_first_name = normalize_and_hash(
                    record["first_name"], False
                )
                address_info.hashed_last_name = normalize_and_hash(
                    record["last_name"], False
                )
                address_info.country_code = record["country_code"]
                address_info.postal_code = record["postal_code"]
                user_data.user_identifiers.append(user_identifier)

        # If the user_identifiers repeated field is not empty, create a new
        # OfflineUserDataJobOperation and add the UserData to it.
        if user_data.user_identifiers:
            operation = client.get_type("OfflineUserDataJobOperation")
            operation.create = user_data
            operations.append(operation)
      

রুবি

# Create a list of unhashed user data records that we will format in the
# following steps to prepare for the API.
raw_records = [
  # The first user data has an email address and a phone number.
  {
    email: 'dana@example.com',
    # Phone number to be converted to E.164 format, with a leading '+' as
    # required. This includes whitespace that will be removed later.
    phone: '+1 800 5550100',
  },
  # The second user data has an email address, a phone number, and an address.
  {
    # Email address that includes a period (.) before the Gmail domain.
    email: 'alex.2@example.com',
    # Address that includes all four required elements: first name, last
    # name, country code, and postal code.
    first_name: 'Alex',
    last_name: 'Quinn',
    country_code: 'US',
    postal_code: '94045',
    # Phone number to be converted to E.164 format, with a leading '+' as
    # required.
    phone: '+1 800 5550102',
  },
  # The third user data only has an email address.
  {
    email: 'charlie@example.com',
  },
]

# Create a UserData for each entry in the raw records.
user_data_list = raw_records.map do |record|
  client.resource.user_data do |data|
    if record[:email]
      data.user_identifiers << client.resource.user_identifier do |ui|
        ui.hashed_email = normalize_and_hash(record[:email], true)
      end
    end
    if record[:phone]
      data.user_identifiers << client.resource.user_identifier do |ui|
        ui.hashed_phone_number = normalize_and_hash(record[:phone], true)
      end
    end
    if record[:first_name]
      # Check that we have all the required information.
      missing_keys = [:last_name, :country_code, :postal_code].reject {|key|
        record[key].nil?
      }
      if missing_keys.empty?
        # If nothing is missing, add the address.
        data.user_identifiers << client.resource.user_identifier do |ui|
          ui.address_identifier = client.resource.offline_user_address_info do |address|
            address.hashed_first_name = normalize_and_hash(record[:first_name])
            address.hashed_last_name = normalize_and_hash(record[:last_name])
            address.country_code = record[:country_code]
            address.postal_code = record[:postal_code]
          end
        end
      else
        # If some data is missing, skip this entry.
        puts "Skipping addition of mailing information because the following keys are missing:" \
          "#{missing_keys}"
      end
    end
  end
end

operations = user_data_list.map do |user_data|
  client.operation.create_resource.offline_user_data_job(user_data)
end
      

পার্ল

  # The first user data has an email address and a phone number.
  my $raw_record_1 = {
    email => 'dana@example.com',
    # Phone number to be converted to E.164 format, with a leading '+' as
    # required. This includes whitespace that will be removed later.
    phone => '+1 800 5550101',
  };

  # The second user data has an email address, a mailing address, and a phone
  # number.
  my $raw_record_2 = {
    # Email address that includes a period (.) before the Gmail domain.
    email => 'alex.2@example.com',
    # Address that includes all four required elements: first name, last
    # name, country code, and postal code.
    firstName   => 'Alex',
    lastName    => 'Quinn',
    countryCode => 'US',
    postalCode  => '94045',
    # Phone number to be converted to E.164 format, with a leading '+' as
    # required.
    phone => '+1 800 5550102',
  };

  # The third user data only has an email address.
  my $raw_record_3 = {email => 'charlie@example.com',};

  my $raw_records = [$raw_record_1, $raw_record_2, $raw_record_3];

  my $operations = [];
  foreach my $record (@$raw_records) {
    # Check if the record has email, phone, or address information, and adds a
    # SEPARATE UserIdentifier object for each one found. For example, a record
    # with an email address and a phone number will result in a UserData with two
    # UserIdentifiers.
    #
    # IMPORTANT: Since the identifier attribute of UserIdentifier
    # (https://developers.google.com/google-ads/api/reference/rpc/latest/UserIdentifier)
    # is a oneof
    # (https://protobuf.dev/programming-guides/proto3/#oneof-features), you must set
    # only ONE of hashed_email, hashed_phone_number, mobile_id, third_party_user_id,
    # or address-info. Setting more than one of these attributes on the same UserIdentifier
    # will clear all the other members of the oneof. For example, the following code is
    # INCORRECT and will result in a UserIdentifier with ONLY a hashed_phone_number:
    #
    # my $incorrect_user_identifier = Google::Ads::GoogleAds::V16::Common::UserIdentifier->new({
    #   hashedEmail => '...',
    #   hashedPhoneNumber => '...',
    # });
    #
    # The separate 'if' statements below demonstrate the correct approach for creating a
    # UserData object for a member with multiple UserIdentifiers.

    my $user_identifiers = [];

    # Check if the record has an email address, and if so, add a UserIdentifier for it.
    if (defined $record->{email}) {
      # Add the hashed email identifier to the list of UserIdentifiers.
      push(
        @$user_identifiers,
        Google::Ads::GoogleAds::V16::Common::UserIdentifier->new({
            hashedEmail => normalize_and_hash($record->{email}, 1)}));
    }

    # Check if the record has a phone number, and if so, add a UserIdentifier for it.
    if (defined $record->{phone}) {
      # Add the hashed phone number identifier to the list of UserIdentifiers.
      push(
        @$user_identifiers,
        Google::Ads::GoogleAds::V16::Common::UserIdentifier->new({
            hashedPhoneNumber => normalize_and_hash($record->{phone}, 1)}));
    }

    # Check if the record has all the required mailing address elements, and if so, add
    # a UserIdentifier for the mailing address.
    if (defined $record->{firstName}) {
      my $required_keys = ["lastName", "countryCode", "postalCode"];
      my $missing_keys  = [];

      foreach my $key (@$required_keys) {
        if (!defined $record->{$key}) {
          push(@$missing_keys, $key);
        }
      }

      if (@$missing_keys) {
        print
"Skipping addition of mailing address information because the following"
          . "keys are missing: "
          . join(",", @$missing_keys);
      } else {
        push(
          @$user_identifiers,
          Google::Ads::GoogleAds::V16::Common::UserIdentifier->new({
              addressInfo =>
                Google::Ads::GoogleAds::V16::Common::OfflineUserAddressInfo->
                new({
                  # First and last name must be normalized and hashed.
                  hashedFirstName => normalize_and_hash($record->{firstName}),
                  hashedLastName  => normalize_and_hash($record->{lastName}),
                  # Country code and zip code are sent in plain text.
                  countryCode => $record->{countryCode},
                  postalCode  => $record->{postalCode},
                })}));
      }
    }

    # If the user_identifiers array is not empty, create a new
    # OfflineUserDataJobOperation and add the UserData to it.
    if (@$user_identifiers) {
      my $user_data = Google::Ads::GoogleAds::V16::Common::UserData->new({
          userIdentifiers => [$user_identifiers]});
      push(
        @$operations,
        Google::Ads::GoogleAds::V16::Services::OfflineUserDataJobService::OfflineUserDataJobOperation
          ->new({
            create => $user_data
          }));
    }
  }
      

তালিকা আপলোড এবং ম্যাচ হার যাচাই করুন

একবার OfflineUserDataJob একটি SUCCESS স্থিতি হয়ে গেলে, আনুমানিক ম্যাচ রেট operation_metadata.match_rate_range ক্ষেত্রে উপলব্ধ। কাজ শেষ হওয়ার আগে আপনি যদি এই ক্ষেত্রটি জিজ্ঞাসা করেন, তাহলে এই ক্ষেত্রের মান শূন্য হতে পারে। আপনার ম্যাচ রেট যাচাইয়ের জন্য প্রস্তুত এবং লক্ষ্য নির্ধারণের জন্য প্রস্তুত তালিকা নিশ্চিত করতে, আমরা কাজটি সম্পূর্ণ করার জন্য পোলিং করার সুপারিশ করি। কাজটি সম্পূর্ণ হতে 10 মিনিট বা 24 ঘন্টা পর্যন্ত সময় লাগতে পারে।

কাজের স্থিতি পরীক্ষা করতে কোড উদাহরণ

জাভা

private void checkJobStatus(
    GoogleAdsClient googleAdsClient, long customerId, String offlineUserDataJobResourceName) {
  try (GoogleAdsServiceClient googleAdsServiceClient =
      googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
    String query =
        String.format(
            "SELECT offline_user_data_job.resource_name, "
                + "offline_user_data_job.id, "
                + "offline_user_data_job.status, "
                + "offline_user_data_job.type, "
                + "offline_user_data_job.failure_reason, "
                + "offline_user_data_job.customer_match_user_list_metadata.user_list "
                + "FROM offline_user_data_job "
                + "WHERE offline_user_data_job.resource_name = '%s'",
            offlineUserDataJobResourceName);
    // Issues the query and gets the GoogleAdsRow containing the job from the response.
    GoogleAdsRow googleAdsRow =
        googleAdsServiceClient
            .search(Long.toString(customerId), query)
            .iterateAll()
            .iterator()
            .next();
    OfflineUserDataJob offlineUserDataJob = googleAdsRow.getOfflineUserDataJob();
    System.out.printf(
        "Offline user data job ID %d with type '%s' has status: %s%n",
        offlineUserDataJob.getId(), offlineUserDataJob.getType(), offlineUserDataJob.getStatus());
    OfflineUserDataJobStatus jobStatus = offlineUserDataJob.getStatus();
    if (OfflineUserDataJobStatus.SUCCESS == jobStatus) {
      // Prints information about the user list.
      printCustomerMatchUserListInfo(
          googleAdsClient,
          customerId,
          offlineUserDataJob.getCustomerMatchUserListMetadata().getUserList());
    } else if (OfflineUserDataJobStatus.FAILED == jobStatus) {
      System.out.printf("  Failure reason: %s%n", offlineUserDataJob.getFailureReason());
    } else if (OfflineUserDataJobStatus.PENDING == jobStatus
        || OfflineUserDataJobStatus.RUNNING == jobStatus) {
      System.out.println();
      System.out.printf(
          "To check the status of the job periodically, use the following GAQL query with"
              + " GoogleAdsService.search:%n%s%n",
          query);
    }
  }
}

      

সি#

private static void CheckJobStatusAndPrintResults(GoogleAdsClient client, long customerId,
    string offlineUserDataJobResourceName)
{
    // Get the GoogleAdsService.
    GoogleAdsServiceClient service = client.GetService(Services.V16.GoogleAdsService);

    string query = "SELECT offline_user_data_job.resource_name, " +
        "offline_user_data_job.id, offline_user_data_job.status, " +
        "offline_user_data_job.type, offline_user_data_job.failure_reason " +
        "offline_user_data_job.customer_match_user_list_metadata_user_list " +
        "FROM offline_user_data_job WHERE " +
        $"offline_user_data_job.resource_name = '{offlineUserDataJobResourceName}'";

    // Issues the query and gets the GoogleAdsRow containing the job from the response.
    GoogleAdsRow googleAdsRow = service.Search(customerId.ToString(), query).First();

    OfflineUserDataJob offlineUserDataJob = googleAdsRow.OfflineUserDataJob;
    Console.WriteLine($"Offline user data job ID {offlineUserDataJob.Id} with type " +
        $"'{offlineUserDataJob.Type}' has status: {offlineUserDataJob.Status}");

    switch (offlineUserDataJob.Status)
    {
        case OfflineUserDataJobStatus.Success:
            // Prints information about the user list.
            PrintCustomerMatchUserListInfo(client, customerId,
                offlineUserDataJob.CustomerMatchUserListMetadata.UserList);
            break;

        case OfflineUserDataJobStatus.Failed:
            Console.WriteLine($"  Failure reason: {offlineUserDataJob.FailureReason}");
            break;

        case OfflineUserDataJobStatus.Pending:
        case OfflineUserDataJobStatus.Running:
            Console.WriteLine("To check the status of the job periodically, use the " +
                $"following GAQL query with GoogleAdsService.search:\n\n{query}");
            break;
    }
}
      

পিএইচপি

private static function checkJobStatus(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    string $offlineUserDataJobResourceName
) {
    $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();

    // Creates a query that retrieves the offline user data job.
    $query = "SELECT offline_user_data_job.resource_name, "
          . "offline_user_data_job.id, "
          . "offline_user_data_job.status, "
          . "offline_user_data_job.type, "
          . "offline_user_data_job.failure_reason, "
          . "offline_user_data_job.customer_match_user_list_metadata.user_list "
          . "FROM offline_user_data_job "
          . "WHERE offline_user_data_job.resource_name = '$offlineUserDataJobResourceName'";

    // Issues a search request to get the GoogleAdsRow containing the job from the response.
    /** @var GoogleAdsRow $googleAdsRow */
    $googleAdsRow =
        $googleAdsServiceClient->search(SearchGoogleAdsRequest::build($customerId, $query))
            ->getIterator()
            ->current();
    $offlineUserDataJob = $googleAdsRow->getOfflineUserDataJob();

    // Prints out some information about the offline user data job.
    $offlineUserDataJobStatus = $offlineUserDataJob->getStatus();
    printf(
        "Offline user data job ID %d with type '%s' has status: %s.%s",
        $offlineUserDataJob->getId(),
        OfflineUserDataJobType::name($offlineUserDataJob->getType()),
        OfflineUserDataJobStatus::name($offlineUserDataJobStatus),
        PHP_EOL
    );

    if ($offlineUserDataJobStatus === OfflineUserDataJobStatus::SUCCESS) {
        // Prints information about the user list.
        self::printCustomerMatchUserListInfo(
            $googleAdsClient,
            $customerId,
            $offlineUserDataJob->getCustomerMatchUserListMetadata()->getUserList()
        );
    } elseif ($offlineUserDataJobStatus === OfflineUserDataJobStatus::FAILED) {
        printf("  Failure reason: %s.%s", $offlineUserDataJob->getFailureReason(), PHP_EOL);
    } elseif (
        $offlineUserDataJobStatus === OfflineUserDataJobStatus::PENDING
        || $offlineUserDataJobStatus === OfflineUserDataJobStatus::RUNNING
    ) {
        printf(
            '%1$sTo check the status of the job periodically, use the following GAQL query with'
            . ' GoogleAdsService.search:%1$s%2$s%1$s',
            PHP_EOL,
            $query
        );
    }
}
      

পাইথন

def check_job_status(client, customer_id, offline_user_data_job_resource_name):
    """Retrieves, checks, and prints the status of the offline user data job.

    If the job is completed successfully, information about the user list is
    printed. Otherwise, a GAQL query will be printed, which can be used to
    check the job status at a later date.

    Offline user data jobs may take 6 hours or more to complete, so checking the
    status periodically, instead of waiting, can be more efficient.

    Args:
        client: The Google Ads client.
        customer_id: The ID for the customer that owns the user list.
        offline_user_data_job_resource_name: The resource name of the offline
            user data job to get the status of.
    """
    query = f"""
        SELECT
          offline_user_data_job.resource_name,
          offline_user_data_job.id,
          offline_user_data_job.status,
          offline_user_data_job.type,
          offline_user_data_job.failure_reason,
          offline_user_data_job.customer_match_user_list_metadata.user_list
        FROM offline_user_data_job
        WHERE offline_user_data_job.resource_name =
          '{offline_user_data_job_resource_name}'
        LIMIT 1"""

    # Issues a search request using streaming.
    google_ads_service = client.get_service("GoogleAdsService")
    results = google_ads_service.search(customer_id=customer_id, query=query)
    offline_user_data_job = next(iter(results)).offline_user_data_job
    status_name = offline_user_data_job.status.name
    user_list_resource_name = (
        offline_user_data_job.customer_match_user_list_metadata.user_list
    )

    print(
        f"Offline user data job ID '{offline_user_data_job.id}' with type "
        f"'{offline_user_data_job.type_.name}' has status: {status_name}"
    )

    if status_name == "SUCCESS":
        print_customer_match_user_list_info(
            client, customer_id, user_list_resource_name
        )
    elif status_name == "FAILED":
        print(f"\tFailure Reason: {offline_user_data_job.failure_reason}")
    elif status_name in ("PENDING", "RUNNING"):
        print(
            "To check the status of the job periodically, use the following "
            f"GAQL query with GoogleAdsService.Search: {query}"
        )
      

রুবি

def check_job_status(client, customer_id, offline_user_data_job)
  query = <<~QUERY
    SELECT
      offline_user_data_job.id,
      offline_user_data_job.status,
      offline_user_data_job.type,
      offline_user_data_job.failure_reason,
      offline_user_data_job.customer_match_user_list_metadata.user_list
    FROM
      offline_user_data_job
    WHERE
      offline_user_data_job.resource_name = '#{offline_user_data_job}'
  QUERY

  row = client.service.google_ads.search(
    customer_id: customer_id,
    query: query,
  ).first

  job = row.offline_user_data_job
  puts "Offline user data job ID #{job.id} with type '#{job.type}' has status: #{job.status}."

  case job.status
  when :SUCCESS
    print_customer_match_user_list(client, customer_id, job.customer_match_user_list_metadata.user_list)
  when :FAILED
    puts "  Failure reason: #{job.failure_reason}"
  else
    puts "  To check the status of the job periodically, use the following GAQL " \
      "query with GoogleAdsService.search:"
    puts query
  end
end
      

পার্ল

sub check_job_status() {
  my ($api_client, $customer_id, $offline_user_data_job_resource_name) = @_;

  my $search_query =
    "SELECT offline_user_data_job.resource_name, " .
    "offline_user_data_job.id, offline_user_data_job.status, " .
    "offline_user_data_job.type, offline_user_data_job.failure_reason, " .
    "offline_user_data_job.customer_match_user_list_metadata.user_list " .
    "FROM offline_user_data_job " .
    "WHERE offline_user_data_job.resource_name = " .
    "$offline_user_data_job_resource_name LIMIT 1";

  my $search_request =
    Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsRequest
    ->new({
      customerId => $customer_id,
      query      => $search_query
    });

  # Get the GoogleAdsService.
  my $google_ads_service = $api_client->GoogleAdsService();

  my $iterator = Google::Ads::GoogleAds::Utils::SearchGoogleAdsIterator->new({
    service => $google_ads_service,
    request => $search_request
  });

  # The results have exactly one row.
  my $google_ads_row        = $iterator->next;
  my $offline_user_data_job = $google_ads_row->{offlineUserDataJob};
  my $status                = $offline_user_data_job->{status};

  printf
    "Offline user data job ID %d with type %s has status: %s.\n",
    $offline_user_data_job->{id},
    $offline_user_data_job->{type},
    $status;

  if ($status eq SUCCESS) {
    print_customer_match_user_list_info($api_client, $customer_id,
      $offline_user_data_job->{customerMatchUserListMetadata}{userList});
  } elsif ($status eq FAILED) {
    print "Failure reason: $offline_user_data_job->{failure_reason}";
  } elsif (grep /$status/, (PENDING, RUNNING)) {
    print
      "To check the status of the job periodically, use the following GAQL " .
      "query with the GoogleAdsService->search() method:\n$search_query\n";
  }

  return 1;
}
      

তালিকার আকার যাচাই করতে, আপনি user_list সংস্থানটি জিজ্ঞাসা করতে পারেন।

user_list রিসোর্স জিজ্ঞাসা করার জন্য কোড উদাহরণ

জাভা

try (GoogleAdsServiceClient googleAdsServiceClient =
    googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
  // Creates a query that retrieves the user list.
  String query =
      String.format(
          "SELECT user_list.size_for_display, user_list.size_for_search "
              + "FROM user_list "
              + "WHERE user_list.resource_name = '%s'",
          userListResourceName);

  // Constructs the SearchGoogleAdsStreamRequest.
  SearchGoogleAdsStreamRequest request =
      SearchGoogleAdsStreamRequest.newBuilder()
          .setCustomerId(Long.toString(customerId))
          .setQuery(query)
          .build();

  // Issues the search stream request.
  ServerStream<SearchGoogleAdsStreamResponse> stream =
      googleAdsServiceClient.searchStreamCallable().call(request);
      

সি#

 // Get the GoogleAdsService.
 GoogleAdsServiceClient service =
     client.GetService(Services.V16.GoogleAdsService);

 // Creates a query that retrieves the user list.
 string query =
     "SELECT user_list.size_for_display, user_list.size_for_search " +
     "FROM user_list " +
     $"WHERE user_list.resource_name = '{userListResourceName}'";
 // Issues a search stream request.
 service.SearchStream(customerId.ToString(), query,
    delegate (SearchGoogleAdsStreamResponse resp)
    {
        // Display the results.
        foreach (GoogleAdsRow userListRow in resp.Results)
        {
            UserList userList = userListRow.UserList;
            Console.WriteLine("The estimated number of users that the user list " +
                $"'{userList.ResourceName}' has is {userList.SizeForDisplay}" +
                $" for Display and {userList.SizeForSearch} for Search.");
        }
    }
);
      

পিএইচপি

$googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();

// Creates a query that retrieves the user list.
$query =
    "SELECT user_list.size_for_display, user_list.size_for_search " .
    "FROM user_list " .
    "WHERE user_list.resource_name = '$userListResourceName'";

// Issues a search stream request.
/** @var GoogleAdsServerStreamDecorator $stream */
$stream = $googleAdsServiceClient->searchStream(
    SearchGoogleAdsStreamRequest::build($customerId, $query)
);
      

পাইথন

googleads_service_client = client.get_service("GoogleAdsService")

# Creates a query that retrieves the user list.
query = f"""
    SELECT
      user_list.size_for_display,
      user_list.size_for_search
    FROM user_list
    WHERE user_list.resource_name = '{user_list_resource_name}'"""

# Issues a search request.
search_results = googleads_service_client.search(
    customer_id=customer_id, query=query
)
      

রুবি

query = <<~EOQUERY
  SELECT user_list.size_for_display, user_list.size_for_search
  FROM user_list
  WHERE user_list.resource_name = #{user_list}
EOQUERY

response = client.service.google_ads.search_stream(
  customer_id: customer_id,
  query: query,
)
      

পার্ল

# Create a query that retrieves the user list.
my $search_query =
  "SELECT user_list.size_for_display, user_list.size_for_search " .
  "FROM user_list " .
  "WHERE user_list.resource_name = '$user_list_resource_name'";

# Create a search Google Ads stream request that will retrieve the user list.
my $search_stream_request =
  Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsStreamRequest
  ->new({
    customerId => $customer_id,
    query      => $search_query,
  });

# Get the GoogleAdsService.
my $google_ads_service = $api_client->GoogleAdsService();

my $search_stream_handler =
  Google::Ads::GoogleAds::Utils::SearchStreamHandler->new({
    service => $google_ads_service,
    request => $search_stream_request
  });
      

গোপনীয়তার উদ্দেশ্যে, তালিকায় কমপক্ষে 1,000 সদস্য না থাকা পর্যন্ত ব্যবহারকারীর তালিকার আকার শূন্য হিসাবে দেখায়। এর পরে, আকারটি সবচেয়ে উল্লেখযোগ্য দুটি সংখ্যায় বৃত্তাকার হয়।

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

Google বিজ্ঞাপন UI এর সাথে তুলনা করুন

Google Ads UI থেকে অডিয়েন্স ম্যানেজারে দেখা হলে একটি তালিকা প্রত্যাশার চেয়ে ছোট দেখা যেতে পারে। এই ভিউ তালিকায় সক্রিয় ব্যবহারকারীর সংখ্যা দেখায়। আরও তথ্যের জন্য, এই সমস্যা সমাধানের নির্দেশিকা দেখুন।

যেহেতু সদস্যদের সাথে একটি তালিকা তৈরি হতে 24 ঘন্টা পর্যন্ত সময় লাগতে পারে, তাই আপনি যদি প্রতি 12 ঘন্টায় একবারের বেশিবার একটি দর্শক তালিকায় আপলোড করেন তবে আপনি Google Ads UI-তে একটি In Progress অবস্থা দেখতে পাবেন।

আমার তালিকা টার্গেট

আপনি বিজ্ঞাপন গ্রুপ স্তরে বা প্রচারাভিযান স্তরে আপনার তালিকা টার্গেট করতে পারেন. প্রক্রিয়াটি API-তে অন্যান্য ধরনের লক্ষ্য নির্ণয়ের মানদণ্ডের মতো।

একটি ব্যবহারকারী তালিকায় বিজ্ঞাপন গোষ্ঠীর বিজ্ঞাপনগুলিকে লক্ষ্য করার জন্য কোড উদাহরণ

জাভা

private String targetAdsInAdGroupToUserList(
    GoogleAdsClient googleAdsClient, long customerId, long adGroupId, String userList) {
  // Creates the ad group criterion targeting members of the user list.
  AdGroupCriterion adGroupCriterion =
      AdGroupCriterion.newBuilder()
          .setAdGroup(ResourceNames.adGroup(customerId, adGroupId))
          .setUserList(UserListInfo.newBuilder().setUserList(userList).build())
          .build();

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

  // Creates the ad group criterion service.
  try (AdGroupCriterionServiceClient adGroupCriterionServiceClient =
      googleAdsClient.getLatestVersion().createAdGroupCriterionServiceClient()) {
    // Adds the ad group criterion.
    MutateAdGroupCriteriaResponse response =
        adGroupCriterionServiceClient.mutateAdGroupCriteria(
            Long.toString(customerId), ImmutableList.of(operation));
    // Gets and prints the results.
    String adGroupCriterionResourceName = response.getResults(0).getResourceName();
    System.out.printf(
        "Successfully created ad group criterion with resource name '%s' "
            + "targeting user list with resource name '%s' with ad group with ID %d.%n",
        adGroupCriterionResourceName, userList, adGroupId);
    return adGroupCriterionResourceName;
  }
}
      

সি#

private string TargetAdsInAdGroupToUserList(
    GoogleAdsClient client, long customerId, long adGroupId, string userListResourceName)
{
    // Get the AdGroupCriterionService client.
    AdGroupCriterionServiceClient adGroupCriterionServiceClient = client.GetService
        (Services.V16.AdGroupCriterionService);

    // Create the ad group criterion targeting members of the user list.
    AdGroupCriterion adGroupCriterion = new AdGroupCriterion
    {
        AdGroup = ResourceNames.AdGroup(customerId, adGroupId),
        UserList = new UserListInfo
        {
            UserList = userListResourceName
        }
    };

    // Create the operation.
    AdGroupCriterionOperation adGroupCriterionOperation = new AdGroupCriterionOperation
    {
        Create = adGroupCriterion
    };

    // Add the ad group criterion, then print and return the new criterion's resource name.
    MutateAdGroupCriteriaResponse mutateAdGroupCriteriaResponse =
        adGroupCriterionServiceClient.MutateAdGroupCriteria(customerId.ToString(),
            new[] { adGroupCriterionOperation });

    string adGroupCriterionResourceName =
        mutateAdGroupCriteriaResponse.Results.First().ResourceName;
    Console.WriteLine("Successfully created ad group criterion with resource name " +
        $"'{adGroupCriterionResourceName}' targeting user list with resource name " +
        $"'{userListResourceName}' with ad group with ID {adGroupId}.");
    return adGroupCriterionResourceName;
}
      

পিএইচপি

private static function targetAdsInAdGroupToUserList(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    int $adGroupId,
    string $userListResourceName
): string {
    // Creates the ad group criterion targeting members of the user list.
    $adGroupCriterion = new AdGroupCriterion([
        'ad_group' => ResourceNames::forAdGroup($customerId, $adGroupId),
        'user_list' => new UserListInfo(['user_list' => $userListResourceName])
    ]);

    // Creates the operation.
    $operation = new AdGroupCriterionOperation();
    $operation->setCreate($adGroupCriterion);

    // Issues a mutate request to add an ad group criterion.
    $adGroupCriterionServiceClient = $googleAdsClient->getAdGroupCriterionServiceClient();
    /** @var MutateAdGroupCriteriaResponse $adGroupCriterionResponse */
    $adGroupCriterionResponse = $adGroupCriterionServiceClient->mutateAdGroupCriteria(
        MutateAdGroupCriteriaRequest::build($customerId, [$operation])
    );

    $adGroupCriterionResourceName =
        $adGroupCriterionResponse->getResults()[0]->getResourceName();
    printf(
        "Successfully created ad group criterion with resource name '%s' " .
        "targeting user list with resource name '%s' with ad group with ID %d.%s",
        $adGroupCriterionResourceName,
        $userListResourceName,
        $adGroupId,
        PHP_EOL
    );

    return $adGroupCriterionResourceName;
}
      

পাইথন

def target_ads_in_ad_group_to_user_list(
    client, customer_id, ad_group_id, user_list_resource_name
):
    """Creates an ad group criterion that targets a user list with an ad group.

    Args:
        client: an initialized GoogleAdsClient instance.
        customer_id: a str client customer ID used to create an ad group
            criterion.
        ad_group_id: a str ID for an ad group used to create an ad group
            criterion that targets members of a user list.
        user_list_resource_name: a str resource name for a user list.

    Returns:
        a str resource name for an ad group criterion.
    """
    ad_group_criterion_operation = client.get_type("AdGroupCriterionOperation")
    # Creates the ad group criterion targeting members of the user list.
    ad_group_criterion = ad_group_criterion_operation.create
    ad_group_criterion.ad_group = client.get_service(
        "AdGroupService"
    ).ad_group_path(customer_id, ad_group_id)
    ad_group_criterion.user_list.user_list = user_list_resource_name

    ad_group_criterion_service = client.get_service("AdGroupCriterionService")
    response = ad_group_criterion_service.mutate_ad_group_criteria(
        customer_id=customer_id, operations=[ad_group_criterion_operation]
    )
    resource_name = response.results[0].resource_name
    print(
        "Successfully created ad group criterion with resource name: "
        f"'{resource_name}' targeting user list with resource name: "
        f"'{user_list_resource_name}' and with ad group with ID "
        f"{ad_group_id}."
    )
    return resource_name
      

রুবি

def target_ads_in_ad_group_to_user_list(
  client,
  customer_id,
  ad_group_id,
  user_list
)
  # Creates the ad group criterion targeting members of the user list.
  operation = client.operation.create_resource.ad_group_criterion do |agc|
    agc.ad_group = client.path.ad_group(customer_id, ad_group_id)
    agc.user_list = client.resource.user_list_info do |info|
      info.user_list = user_list
    end
  end

  # Issues a mutate request to create the ad group criterion.
  response = client.service.ad_group_criterion.mutate_ad_group_criteria(
    customer_id: customer_id,
    operations: [operation],
  )
  ad_group_criterion_resource_name = response.results.first.resource_name
  puts "Successfully created ad group criterion with resource name " \
    "'#{ad_group_criterion_resource_name}' targeting user list with resource name " \
    "'#{user_list}' with ad group with ID #{ad_group_id}"

  ad_group_criterion_resource_name
end
      

পার্ল

sub target_ads_in_ad_group_to_user_list {
  my ($api_client, $customer_id, $ad_group_id, $user_list_resource_name) = @_;

  # Create the ad group criterion targeting members of the user list.
  my $ad_group_criterion =
    Google::Ads::GoogleAds::V16::Resources::AdGroupCriterion->new({
      adGroup => Google::Ads::GoogleAds::V16::Utils::ResourceNames::ad_group(
        $customer_id, $ad_group_id
      ),
      userList => Google::Ads::GoogleAds::V16::Common::UserListInfo->new({
          userList => $user_list_resource_name
        })});

  # Create the operation.
  my $ad_group_criterion_operation =
    Google::Ads::GoogleAds::V16::Services::AdGroupCriterionService::AdGroupCriterionOperation
    ->new({
      create => $ad_group_criterion
    });

  # Add the ad group criterion, then print and return the new criterion's resource name.
  my $ad_group_criteria_response =
    $api_client->AdGroupCriterionService()->mutate({
      customerId => $customer_id,
      operations => [$ad_group_criterion_operation]});

  my $ad_group_criterion_resource_name =
    $ad_group_criteria_response->{results}[0]{resourceName};
  printf "Successfully created ad group criterion with resource name '%s' " .
    "targeting user list with resource name '%s' with ad group with ID %d.\n",
    $ad_group_criterion_resource_name, $user_list_resource_name, $ad_group_id;

  return $ad_group_criterion_resource_name;
}
      

লক্ষ্য একাধিক গ্রাহক তালিকা

একটি crm_based_user_list শুধুমাত্র অন্য crm_based_user_list এর সাথে মিলিত হতে পারে যখন একটি logical_user_list ব্যবহার করা হয়। crm_based_user_list এর জন্য সমস্ত নীতি ফলাফল ব্যবহারকারী তালিকায় প্রযোজ্য।