লিডের জন্য উন্নত রূপান্তরগুলি প্রয়োগ করুন

লিডের জন্য উন্নত রূপান্তরগুলি আপনাকে ক্লিক কনভার্সন আপলোড করার মাধ্যমে আপনার অফলাইন রূপান্তর পরিমাপের নির্ভুলতা উন্নত করতে সক্ষম করে যাতে হ্যাশ করা ব্যবহারকারী শনাক্তকারী এবং কিছু ঐচ্ছিক অতিরিক্ত বিবরণ রয়েছে যা Google বিজ্ঞাপনকে সেই বিজ্ঞাপনের সাথে রূপান্তর করতে সাহায্য করে যা লিড চালিত করে।

শুরু করার নির্দেশিকা পর্যালোচনা করা নিশ্চিত করুন এবং বাস্তবায়নের সাথে এগিয়ে যাওয়ার আগে লিডের জন্য উন্নত রূপান্তরগুলির পূর্বশর্তগুলি প্রয়োগ করুন৷

আপনি Google Ads UI-এর মাধ্যমে লিডের জন্য উন্নত রূপান্তরগুলি আপলোড করতে পারেন, যেমন সহায়তা কেন্দ্রে বর্ণিত হয়েছে বা Google বিজ্ঞাপন API-এর মাধ্যমে, যেমন এই নির্দেশিকায় বর্ণিত হয়েছে৷

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

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

Google Ads API-এ লিডের জন্য উন্নত রূপান্তর আপলোড করার সামগ্রিক প্রবাহ এখানে রয়েছে।

  1. নিশ্চিত করুন যে আপনি পূর্বশর্তগুলি বাস্তবায়ন করেছেন, যার মধ্যে নিম্নলিখিতগুলি অন্তর্ভুক্ত রয়েছে:

    1. রূপান্তর ট্র্যাকিং সক্ষম করুন।

    2. গ্রাহক ডেটা শর্তাবলী গ্রহণ করুন.

    3. আপনার ওয়েবসাইটের লিড ফর্মগুলিতে ট্যাগিং কনফিগার করুন।

    বিস্তারিত নির্দেশনার জন্য পূর্বশর্তগুলি বাস্তবায়ন দেখুন।

  2. লিড ডেটা যেমন ইমেল ঠিকানা, ফোন নম্বর এবং মেইলিং ঠিকানাকে স্বাভাবিক করুন এবং হ্যাশ করুন।

  3. ClickConversion অবজেক্টে নরমালাইজড এবং হ্যাশ করা লিড ডেটা রাখুন। প্রতিটি ClickConversion জন্য:

    1. নর্মালাইজড এবং হ্যাশড লিড ডেটা দিয়ে user_identifiers পপুলেট করুন। আপনার যদি একাধিক ব্যবহারকারী শনাক্তকারী উপলব্ধ থাকে, তাহলে প্রত্যেকটির জন্য একটি পৃথক UserIdentifier তৈরি করুন, পাঁচটি শনাক্তকারী পর্যন্ত।

    2. (ঐচ্ছিক কিন্তু দৃঢ়ভাবে প্রস্তাবিত) order_id পপুলেট করুন।

    3. (ঐচ্ছিক) সবচেয়ে সঠিক পরিমাপের জন্য gclid পপুলেট করুন।

    4. Google Ads API-এর ভার্সন v15 দিয়ে শুরু করে, আপনাকে ClickConversion অবজেক্টের consent ক্ষেত্রটি পূরণ করতে হবে।

    5. UPLOAD_CLICKS type একটি ConversionAction এর রিসোর্স নামের সাথে conversion_action সেট করুন। আপনি পূর্বশর্তগুলি বাস্তবায়ন করার সময় আপনার তৈরি করা ConversionAction এর রিসোর্স নাম হওয়া উচিত।

  4. ConversionUploadServiceClickConversion তৈরির ক্রিয়াকলাপ আপলোড করুন, partial_failure true এ সেট করে।

  5. আপনার আপলোড পর্যালোচনা করুন.

সেরা অনুশীলন

লিডের জন্য উন্নত রূপান্তরগুলি প্রয়োগ করার সময় নিম্নলিখিত সেরা অনুশীলনগুলি মনে রাখবেন৷

আপনার যদি একাধিক শনাক্তকারী থাকে তবে অন্তর্ভুক্ত করুন

আপনি যদি একটি রূপান্তরের জন্য একটি order_id বরাদ্দ করেন, আমরা দৃঢ়ভাবে এটি অন্তর্ভুক্ত করার সুপারিশ করি। যদি আপনার কাছে একটি রূপান্তরের জন্য gclid থাকে, তাহলে আমরা উন্নত কর্মক্ষমতার জন্য user_identifiers ছাড়াও এটি পাঠানোর সুপারিশ করি। তদ্ব্যতীত, যদি আপনার কাছে রূপান্তরের জন্য একাধিক UserIdentifier থাকে, একাধিক সহ একটি মিলের সম্ভাবনা উন্নত করতে পারে। একই ClickConversion সমস্ত শনাক্তকারী অন্তর্ভুক্ত করুন।

আপনার ইন্টিগ্রেশন সেট আপ করার সময় আংশিক ব্যর্থতার ত্রুটিগুলি পর্যালোচনা করুন৷

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

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

একক অনুরোধে একাধিক রূপান্তর ব্যাচ করুন

আপলোড করার জন্য আপনার একাধিক রূপান্তর থাকলে, প্রতি রূপান্তরে একটি আপলোড অনুরোধ পাঠানোর পরিবর্তে অপারেশনগুলিকে একটি UploadClickConversionsRequest এ ব্যাচ করুন৷

প্রতি অনুরোধে রূপান্তরের সংখ্যার সীমার জন্য কোটা নির্দেশিকা দেখুন।

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

সমস্ত উপলব্ধ অফলাইন রূপান্তর ইভেন্ট আপলোড করুন

সম্পূর্ণ এবং সঠিক রূপান্তর প্রতিবেদন নিশ্চিত করতে, সমস্ত উপলব্ধ অফলাইন রূপান্তর ইভেন্ট আপলোড করুন, যেগুলি Google বিজ্ঞাপন থেকে নাও আসতে পারে।

সমস্ত রূপান্তর ইভেন্ট আপলোড করলে Google Ads থেকে নয় এমন যেকোনো ইভেন্টের জন্য CLICK_NOT_FOUND ত্রুটি দেখা দেয়। যেহেতু সমস্ত রূপান্তর ইভেন্ট আপলোড করার সময় এই ত্রুটিগুলি প্রত্যাশিত, তাই UploadClickConversionsRequest একটি debug_enabled ক্ষেত্র রয়েছে৷

  • debug_enabled false হলে বা সেট করা না থাকলে, Google Ads API শুধুমাত্র মৌলিক ইনপুট যাচাই করে, পরবর্তী আপলোড চেকগুলি এড়িয়ে যায় এবং প্রদত্ত user_identifiers এর জন্য কোনো ক্লিক না পাওয়া গেলেও সফলতা প্রদান করে।

    এটি ডিফল্ট।

  • debug_enabled true হলে, Google Ads API সমস্ত যাচাইকরণ করে এবং যেকোন ClickConversion জন্য একটি CLICK_NOT_FOUND ত্রুটি ফেরত দেয় যেখানে প্রদত্ত user_identifiers এর জন্য Google Ads রূপান্তর নেই।

বিকাশ এবং পরীক্ষার সময়, আপনি সমস্যাগুলি সনাক্ত করতে সহায়তা করার জন্য debug_enabled true সেট করতে পারেন। উদাহরণ স্বরূপ, যদি আপনার কাছে Google Ads রূপান্তরগুলি থেকে পরিচিত রূপান্তর এবং user_identifiers একটি সেট থাকে, তাহলে আপনি true সেটিং ব্যবহার করে যাচাই করতে পারেন যে সেই আপলোডগুলির ফলে CLICK_NOT_FOUND ত্রুটি হয় না। যাইহোক, যখন আপনি অতীতের উন্নয়ন এবং পরীক্ষায় এগিয়ে যান, আমরা অতিরিক্ত ত্রুটি এড়াতে debug_enabled false সেট করার পরামর্শ দিই।

এক্সটার্নাল অ্যাট্রিবিউশন ডেটা ব্যবহার করবেন না

ClickConversionexternal_attribution_data সেট করবেন না বা বহিরাগত অ্যাট্রিবিউশন মডেল ব্যবহার করে এমন একটি conversion_action নির্দিষ্ট করবেন না। Google Ads শনাক্তকারী ব্যবহার করে আপলোডের জন্য বাহ্যিকভাবে বৈশিষ্ট্যযুক্ত রূপান্তর সমর্থন করে না।

আপলোডের জন্য ডেটা প্রস্তুত করুন

গোপনীয়তা বিবেচনার জন্য, আপলোড করার আগে নিম্নলিখিত ডেটা SHA-256 ব্যবহার করে হ্যাশ করতে হবে:

  • ইমেইল ঠিকানা
  • ফোন নম্বর
  • নামের প্রথম অংশ
  • নামের শেষাংশ
  • রাস্তার ঠিকানা

নিম্নলিখিত ডেটা হ্যাশ করবেন না :

  • দেশ
  • অবস্থা
  • শহর
  • জিপ কোড

হ্যাশ ফলাফল মানক করার জন্য, আপনাকে এই মানগুলির একটি হ্যাশ করার আগে নিম্নলিখিতগুলি করতে হবে:

  • অগ্রণী এবং পিছনের হোয়াইটস্পেসগুলি সরান৷
  • লেখাটিকে ছোট হাতের অক্ষরে রূপান্তর করুন।
  • E164 মান অনুযায়ী ফোন নম্বর ফরম্যাট করুন।
  • gmail.com এবং googlemail.com ইমেল ঠিকানাগুলিতে ডোমেন নামের আগে থাকা সমস্ত সময়কাল ( . সরান৷

জাভা

private String normalizeAndHash(MessageDigest digest, String s)
    throws UnsupportedEncodingException {
  // Normalizes by first converting all characters to lowercase, then trimming spaces.
  String normalized = s.toLowerCase();
  // Removes leading, trailing, and intermediate spaces.
  normalized = normalized.replaceAll("\\s+", "");
  // Hashes the normalized string using the hashing algorithm.
  byte[] hash = digest.digest(normalized.getBytes("UTF-8"));
  StringBuilder result = new StringBuilder();
  for (byte b : hash) {
    result.append(String.format("%02x", b));
  }

  return result.toString();
}

/**
 * Returns the result of normalizing and hashing an email address. For this use case, Google Ads
 * requires removal of any '.' characters preceding {@code gmail.com} or {@code googlemail.com}.
 *
 * @param digest the digest to use to hash the normalized string.
 * @param emailAddress the email address to normalize and hash.
 */
private String normalizeAndHashEmailAddress(MessageDigest digest, String emailAddress)
    throws UnsupportedEncodingException {
  String normalizedEmail = emailAddress.toLowerCase();
  String[] emailParts = normalizedEmail.split("@");
  if (emailParts.length > 1 && emailParts[1].matches("^(gmail|googlemail)\\.com\\s*")) {
    // Removes any '.' characters from the portion of the email address before the domain if the
    // domain is gmail.com or googlemail.com.
    emailParts[0] = emailParts[0].replaceAll("\\.", "");
    normalizedEmail = String.format("%s@%s", emailParts[0], emailParts[1]);
  }
  return normalizeAndHash(digest, normalizedEmail);
}
      

সি#

/// <summary>
/// Normalizes the email address and hashes it. For this use case, Google Ads requires
/// removal of any '.' characters preceding <code>gmail.com</code> or
/// <code>googlemail.com</code>.
/// </summary>
/// <param name="emailAddress">The email address.</param>
/// <returns>The hash code.</returns>
private string NormalizeAndHashEmailAddress(string emailAddress)
{
    string normalizedEmail = emailAddress.ToLower();
    string[] emailParts = normalizedEmail.Split('@');
    if (emailParts.Length > 1 && (emailParts[1] == "gmail.com" ||
        emailParts[1] == "googlemail.com"))
    {
        // Removes any '.' characters from the portion of the email address before
        // the domain if the domain is gmail.com or googlemail.com.
        emailParts[0] = emailParts[0].Replace(".", "");
        normalizedEmail = $"{emailParts[0]}@{emailParts[1]}";
    }
    return NormalizeAndHash(normalizedEmail);
}

/// <summary>
/// Normalizes and hashes a string value.
/// </summary>
/// <param name="value">The value to normalize and hash.</param>
/// <returns>The normalized and hashed value.</returns>
private static string NormalizeAndHash(string value)
{
    return ToSha256String(digest, ToNormalizedValue(value));
}

/// <summary>
/// Hash a string value using SHA-256 hashing algorithm.
/// </summary>
/// <param name="digest">Provides the algorithm for SHA-256.</param>
/// <param name="value">The string value (e.g. an email address) to hash.</param>
/// <returns>The hashed value.</returns>
private static string ToSha256String(SHA256 digest, string value)
{
    byte[] digestBytes = digest.ComputeHash(Encoding.UTF8.GetBytes(value));
    // Convert the byte array into an unhyphenated hexadecimal string.
    return BitConverter.ToString(digestBytes).Replace("-", string.Empty);
}

/// <summary>
/// Removes leading and trailing whitespace and converts all characters to
/// lower case.
/// </summary>
/// <param name="value">The value to normalize.</param>
/// <returns>The normalized value.</returns>
private static string ToNormalizedValue(string value)
{
    return value.Trim().ToLower();
}
      

পিএইচপি

private static function normalizeAndHash(string $hashAlgorithm, string $value): string
{
    // Normalizes by first converting all characters to lowercase, then trimming spaces.
    $normalized = strtolower($value);
    // Removes leading, trailing, and intermediate spaces.
    $normalized = str_replace(' ', '', $normalized);
    return hash($hashAlgorithm, strtolower(trim($normalized)));
}

/**
 * Returns the result of normalizing and hashing an email address. For this use case, Google
 * Ads requires removal of any '.' characters preceding "gmail.com" or "googlemail.com".
 *
 * @param string $hashAlgorithm the hash algorithm to use
 * @param string $emailAddress the email address to normalize and hash
 * @return string the normalized and hashed email address
 */
private static function normalizeAndHashEmailAddress(
    string $hashAlgorithm,
    string $emailAddress
): string {
    $normalizedEmail = strtolower($emailAddress);
    $emailParts = explode("@", $normalizedEmail);
    if (
        count($emailParts) > 1
        && preg_match('/^(gmail|googlemail)\.com\s*/', $emailParts[1])
    ) {
        // Removes any '.' characters from the portion of the email address before the domain
        // if the domain is gmail.com or googlemail.com.
        $emailParts[0] = str_replace(".", "", $emailParts[0]);
        $normalizedEmail = sprintf('%s@%s', $emailParts[0], $emailParts[1]);
    }
    return self::normalizeAndHash($hashAlgorithm, $normalizedEmail);
}
      

পাইথন

def normalize_and_hash_email_address(email_address):
    """Returns the result of normalizing and hashing an email address.

    For this use case, Google Ads requires removal of any '.' characters
    preceding "gmail.com" or "googlemail.com"

    Args:
        email_address: An email address to normalize.

    Returns:
        A normalized (lowercase, removed whitespace) and SHA-265 hashed string.
    """
    normalized_email = email_address.lower()
    email_parts = normalized_email.split("@")
    # Checks whether the domain of the email address is either "gmail.com"
    # or "googlemail.com". If this regex does not match then this statement
    # will evaluate to None.
    is_gmail = re.match(r"^(gmail|googlemail)\.com$", email_parts[1])

    # Check that there are at least two segments and the second segment
    # matches the above regex expression validating the email domain name.
    if len(email_parts) > 1 and is_gmail:
        # Removes any '.' characters from the portion of the email address
        # before the domain if the domain is gmail.com or googlemail.com.
        email_parts[0] = email_parts[0].replace(".", "")
        normalized_email = "@".join(email_parts)

    return normalize_and_hash(normalized_email)


def normalize_and_hash(s):
    """Normalizes and hashes a string with SHA-256.

    Private customer data must be hashed during upload, as described at:
    https://support.google.com/google-ads/answer/7474263

    Args:
        s: The string to perform this operation on.

    Returns:
        A normalized (lowercase, removed whitespace) and SHA-256 hashed string.
    """
    return hashlib.sha256(s.strip().lower().encode()).hexdigest()
      

রুবি

# Returns the result of normalizing and then hashing the string using the
# provided digest.  Private customer data must be hashed during upload, as
# described at https://support.google.com/google-ads/answer/7474263.
def normalize_and_hash(str)
  # Remove leading and trailing whitespace and ensure all letters are lowercase
  # before hasing.
  Digest::SHA256.hexdigest(str.strip.downcase)
end

# Returns the result of normalizing and hashing an email address. For this use
# case, Google Ads requires removal of any '.' characters preceding 'gmail.com'
# or 'googlemail.com'.
def normalize_and_hash_email(email)
  email_parts = email.downcase.split("@")
  # Removes any '.' characters from the portion of the email address before the
  # domain if the domain is gmail.com or googlemail.com.
  if email_parts.last =~ /^(gmail|googlemail)\.com\s*/
    email_parts[0] = email_parts[0].gsub('.', '')
  end
  normalize_and_hash(email_parts.join('@'))
end
      

পার্ল

sub normalize_and_hash {
  my $value = shift;

  # Removes leading, trailing, and intermediate spaces.
  $value =~ s/\s+//g;
  return sha256_hex(lc $value);
}

# Returns the result of normalizing and hashing an email address. For this use
# case, Google Ads requires removal of any '.' characters preceding 'gmail.com'
# or 'googlemail.com'.
sub normalize_and_hash_email_address {
  my $email_address = shift;

  my $normalized_email = lc $email_address;
  my @email_parts      = split('@', $normalized_email);
  if (scalar @email_parts > 1
    && $email_parts[1] =~ /^(gmail|googlemail)\.com\s*/)
  {
    # Remove any '.' characters from the portion of the email address before the
    # domain if the domain is 'gmail.com' or 'googlemail.com'.
    $email_parts[0] =~ s/\.//g;
    $normalized_email = sprintf '%s@%s', $email_parts[0], $email_parts[1];
  }
  return normalize_and_hash($normalized_email);
}
      

উন্নত রূপান্তর আপলোড করুন

নিম্নলিখিত স্নিপেটগুলি দেখায় যে কীভাবে একটি রূপান্তর আপলোড তৈরি করতে হয় যাতে ইমেল ঠিকানা এবং ফোন নম্বরের জন্য শনাক্তকারী থাকে, প্রমিতকরণ এবং প্রয়োজন অনুসারে হ্যাশিং প্রয়োগ করা হয়। একটি সর্বোত্তম অনুশীলন হিসাবে, যদি সেগুলি উপলব্ধ থাকে তবে রূপান্তরে gclid এবং order_id অন্তর্ভুক্ত করুন৷

ক্লিক কনভার্সনে ব্যবহারকারী শনাক্তকারী যোগ করুন

জাভা

// Creates an empty builder for constructing the click conversion.
ClickConversion.Builder clickConversionBuilder = ClickConversion.newBuilder();

// Extracts user email and phone from the raw data, normalizes and hashes it, then wraps it in
// UserIdentifier objects.
// Creates a separate UserIdentifier object for each. The data in this example is hardcoded, but
// in your application you might read the raw data from an input file.

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

Map<String, String> rawRecord =
    ImmutableMap.<String, String>builder()
        // Email address that includes a period (.) before the Gmail domain.
        .put("email", "alex.2@example.com")
        // Phone number to be converted to E.164 format, with a leading '+' as required.
        .put("phone", "+1 800 5550102")
        // This example lets you input conversion details as arguments, but in reality you might
        // store this data alongside other user data, so we include it in this sample user
        // record.
        .put("orderId", orderId)
        .put("gclid", gclid)
        .put("conversionActionId", Long.toString(conversionActionId))
        .put("conversionDateTime", conversionDateTime)
        .put("conversionValue", Double.toString(conversionValue))
        .put("currencyCode", "USD")
        .put("adUserDataConsent", adUserDataConsent == null ? null : adUserDataConsent.name())
        .build();

// Creates a SHA256 message digest for hashing user identifiers in a privacy-safe way, as
// described at https://support.google.com/google-ads/answer/9888656.
MessageDigest sha256Digest = MessageDigest.getInstance("SHA-256");

// Creates a list for the user identifiers.
List<UserIdentifier> userIdentifiers = new ArrayList<>();

// Creates a user identifier using the hashed email address, using the normalize and hash method
// specifically for email addresses.
UserIdentifier emailIdentifier =
    UserIdentifier.newBuilder()
        // Optional: specify the user identifier source.
        .setUserIdentifierSource(UserIdentifierSource.FIRST_PARTY)
        // Uses the normalize and hash method specifically for email addresses.
        .setHashedEmail(normalizeAndHashEmailAddress(sha256Digest, rawRecord.get("email")))
        .build();
userIdentifiers.add(emailIdentifier);

// Creates a user identifier using normalized and hashed phone info.
UserIdentifier hashedPhoneNumberIdentifier =
    UserIdentifier.newBuilder()
        .setHashedPhoneNumber(normalizeAndHash(sha256Digest, rawRecord.get("phone")))
        .build();
// Adds the hashed phone number identifier to the UserData object's list.
userIdentifiers.add(hashedPhoneNumberIdentifier);

// Adds the user identifiers to the conversion.
clickConversionBuilder.addAllUserIdentifiers(userIdentifiers);
      

সি#

// Adds a user identifier using the hashed email address, using the normalize
// and hash method specifically for email addresses.
clickConversion.UserIdentifiers.Add(new UserIdentifier()
{
    HashedEmail = NormalizeAndHashEmailAddress("alex.2@example.com"),
    // Optional: Specifies the user identifier source.
    UserIdentifierSource = UserIdentifierSource.FirstParty
});

// Adds a user identifier using normalized and hashed phone info.
clickConversion.UserIdentifiers.Add(new UserIdentifier()
{
    HashedPhoneNumber = NormalizeAndHash("+1 800 5550102"),
    // Optional: Specifies the user identifier source.
    UserIdentifierSource = UserIdentifierSource.FirstParty
});

// Adds a user identifier with all the required mailing address elements.
clickConversion.UserIdentifiers.Add(new UserIdentifier()
{
    AddressInfo = new OfflineUserAddressInfo()
    {
        // FirstName and LastName must be normalized and hashed.
        HashedFirstName = NormalizeAndHash("Alex"),
        HashedLastName = NormalizeAndHash("Quinn"),
        // CountryCode and PostalCode are sent in plain text.
        CountryCode = "US",
        PostalCode = "94045"
    }
});
      

পিএইচপি

// Creates a click conversion with the specified attributes.
$clickConversion = new ClickConversion();

// Extract user email and phone from the raw data, normalize and hash it, then wrap it in
// UserIdentifier objects. Creates a separate UserIdentifier object for each.
// The data in this example is hardcoded, but in your application you might read the raw
// data from an input file.

// 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.
//
// $incorrectlyPopulatedUserIdentifier = new UserIdentifier([
//    'hashed_email' => '...',
//    'hashed_phone_number' => '...'
// ]);

$rawRecord = [
    // Email address that includes a period (.) before the Gmail domain.
    'email' => 'alex.2@example.com',
    // Phone number to be converted to E.164 format, with a leading '+' as required.
    'phone' => '+1 800 5550102',
    // This example lets you input conversion details as arguments, but in reality you might
    // store this data alongside other user data, so we include it in this sample user
    // record.
    'orderId' => $orderId,
    'gclid' => $gclid,
    'conversionActionId' => $conversionActionId,
    'conversionDateTime' => $conversionDateTime,
    'conversionValue' => $conversionValue,
    'currencyCode' => 'USD',
    'adUserDataConsent' => $adUserDataConsent
];

// Creates a list for the user identifiers.
$userIdentifiers = [];

// Uses the SHA-256 hash algorithm for hashing user identifiers in a privacy-safe way, as
// described at https://support.google.com/google-ads/answer/9888656.
$hashAlgorithm = "sha256";

// Creates a user identifier using the hashed email address, using the normalize and hash
// method specifically for email addresses.
$emailIdentifier = new UserIdentifier([
    // Uses the normalize and hash method specifically for email addresses.
    'hashed_email' => self::normalizeAndHashEmailAddress(
        $hashAlgorithm,
        $rawRecord['email']
    ),
    // Optional: Specifies the user identifier source.
    'user_identifier_source' => UserIdentifierSource::FIRST_PARTY
]);
$userIdentifiers[] = $emailIdentifier;

// 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(
            $hashAlgorithm,
            $rawRecord['phone'],
            true
        )
    ]);
    // Adds the hashed email identifier to the user identifiers list.
    $userIdentifiers[] = $hashedPhoneNumberIdentifier;
}

// Adds the user identifiers to the conversion.
$clickConversion->setUserIdentifiers($userIdentifiers);
      

পাইথন

# Extract user email and phone from the raw data, normalize and hash it,
# then wrap it in UserIdentifier objects. Create a separate UserIdentifier
# object for each. The data in this example is hardcoded, but in your
# application you might read the raw data from an input file.

# 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:
#
# incorrectly_populated_user_identifier = client.get_type("UserIdentifier")
# incorrectly_populated_user_identifier.hashed_email = "...""
# incorrectly_populated_user_identifier.hashed_phone_number = "...""

raw_record = {
    # Email address that includes a period (.) before the Gmail domain.
    "email": "alex.2@example.com",
    # Phone number to be converted to E.164 format, with a leading '+' as
    # required.
    "phone": "+1 800 5550102",
    # This example lets you input conversion details as arguments,
    # but in reality you might store this data alongside other user data,
    # so we include it in this sample user record.
    "order_id": order_id,
    "gclid": gclid,
    "conversion_action_id": conversion_action_id,
    "conversion_date_time": conversion_date_time,
    "conversion_value": conversion_value,
    "currency_code": "USD",
    "ad_user_data_consent": ad_user_data_consent,
}

# Constructs the click conversion.
click_conversion = client.get_type("ClickConversion")
# Creates a user identifier using the hashed email address, using the
# normalize and hash method specifically for email addresses.
email_identifier = client.get_type("UserIdentifier")
# Optional: Specifies the user identifier source.
email_identifier.user_identifier_source = (
    client.enums.UserIdentifierSourceEnum.FIRST_PARTY
)
# Uses the normalize and hash method specifically for email addresses.
email_identifier.hashed_phone_number = normalize_and_hash_email_address(
    raw_record["email"]
)
# Adds the user identifier to the conversion.
click_conversion.user_identifiers.append(email_identifier)

# Checks if the record has a phone number, and if so, adds a UserIdentifier
# for it.
if raw_record.get("phone") is not None:
    phone_identifier = client.get_type("UserIdentifier")
    phone_identifier.hashed_phone_number = normalize_and_hash(
        raw_record["phone"]
    )
    # Adds the phone identifier to the conversion adjustment.
    click_conversion.user_identifiers.append(phone_identifier)
      

রুবি

# Extract user email and phone from the raw data, normalize and hash it,
# then wrap it in UserIdentifier objects. Create a separate UserIdentifier
# object for each. The data in this example is hardcoded, but in your
# application you might read the raw data from an input file.

# 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:
#
# incorrectly_populated_user_identifier.hashed_email = "...""
# incorrectly_populated_user_identifier.hashed_phone_number = "...""

raw_record = {
  # Email address that includes a period (.) before the Gmail domain.
  "email" => "alex.2@example.com",
  # Phone number to be converted to E.164 format, with a leading '+' as
  # required.
  "phone" => "+1 800 5550102",
  # This example lets you input conversion details as arguments,
  # but in reality you might store this data alongside other user data,
  # so we include it in this sample user record.
  "order_id" => order_id,
  "gclid" => gclid,
  "conversion_action_id" => conversion_action_id,
  "conversion_date_time" => conversion_date_time,
  "conversion_value" => conversion_value,
  "currency_code" => "USD",
  "ad_user_data_consent" => ad_user_data_consent,
}

click_conversion = client.resource.click_conversion do |cc|
  cc.conversion_action = client.path.conversion_action(customer_id, conversion_action_id)
  cc.conversion_date_time = conversion_date_time
  cc.conversion_value = conversion_value.to_f
  cc.currency_code = 'USD'

  unless order_id.nil?
    cc.order_id = order_id
  end

  unless raw_record["gclid"].nil?
    cc.gclid = gclid
  end

  # Specifies whether user consent was obtained for the data you are
  # uploading. For more details, see:
  # https://www.google.com/about/company/user-consent-policy
  unless raw_record["ad_user_data_consent"].nil?
    cc.consent = client.resource.consent do |c|
      c.ad_user_data = ad_user_data_consent
    end
  end

  # Creates a user identifier using the hashed email address, using the
  # normalize and hash method specifically for email addresses.
  # If using a phone number, use the normalize_and_hash method instead.
  cc.user_identifiers << client.resource.user_identifier do |ui|
    ui.hashed_phone_number = normalize_and_hash_email(raw_record["email"])
    # Optional: Specifies the user identifier source.
    ui.user_identifier_source = :FIRST_PARTY
  end

  # Checks if the record has a phone number, and if so, adds a UserIdentifier
  # for it.
  unless raw_record["phone"].nil?
    cc.user_identifiers << client.resource.user_identifier do |ui|
      ui.hashed_phone_number = normalize_and_hash_email(raw_record["phone"])
    end
  end
end
      

পার্ল

# Create an empty click conversion.
my $click_conversion =
  Google::Ads::GoogleAds::V16::Services::ConversionUploadService::ClickConversion
  ->new({});

# Extract user email and phone from the raw data, normalize and hash it,
# then wrap it in UserIdentifier objects. Create a separate UserIdentifier
# object for each.
# The data in this example is hardcoded, but in your application
# you might read the raw data from an input file.
#
# 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 => '...',
# });
my $raw_record = {
  # Email address that includes a period (.) before the Gmail domain.
  email => 'alex.2@example.com',
  # Phone number to be converted to E.164 format, with a leading '+' as
  # required.
  phone => '+1 800 5550102',
  # This example lets you input conversion details as arguments,
  # but in reality you might store this data alongside other user data,
  # so we include it in this sample user record.
  orderId            => $order_id,
  gclid              => $gclid,
  conversionActionId => $conversion_action_id,
  conversionDateTime => $conversion_date_time,
  conversionValue    => $conversion_value,
  currencyCode       => "USD",
  adUserDataConsent  => $ad_user_data_consent
};
my $user_identifiers = [];

# Create a user identifier using the hashed email address, using the normalize
# and hash method specifically for email addresses.
my $hashed_email = normalize_and_hash_email_address($raw_record->{email});
push(
  @$user_identifiers,
  Google::Ads::GoogleAds::V16::Common::UserIdentifier->new({
      hashedEmail => $hashed_email,
      # Optional: Specify the user identifier source.
      userIdentifierSource => FIRST_PARTY
    }));

# Create a user identifier using normalized and hashed phone info.
my $hashed_phone = normalize_and_hash($raw_record->{phone});
push(
  @$user_identifiers,
  Google::Ads::GoogleAds::V16::Common::UserIdentifier->new({
      hashedPhone => $hashed_phone,
      # Optional: Specify the user identifier source.
      userIdentifierSource => FIRST_PARTY
    }));

# Add the user identifiers to the conversion.
$click_conversion->{userIdentifiers} = $user_identifiers;
      

ক্লিক কনভার্সনে রূপান্তর বিবরণ যোগ করুন

জাভা

// Adds details of the conversion.
clickConversionBuilder.setConversionAction(
    ResourceNames.conversionAction(
        customerId, Long.parseLong(rawRecord.get("conversionActionId"))));
clickConversionBuilder.setConversionDateTime(rawRecord.get("conversionDateTime"));
clickConversionBuilder.setConversionValue(Double.parseDouble(rawRecord.get("conversionValue")));
clickConversionBuilder.setCurrencyCode(rawRecord.get("currencyCode"));

// Sets the order ID if provided.
if (rawRecord.get("orderId") != null) {
  clickConversionBuilder.setOrderId(rawRecord.get("orderId"));
}

// Sets the Google click ID (gclid) if provided.
if (rawRecord.get("gclid") != null) {
  clickConversionBuilder.setGclid(rawRecord.get("gclid"));
}

// Sets the consent information, if provided.
if (rawRecord.get("adUserDataConsent") != null) {
  // Specifies whether user consent was obtained for the data you are uploading. See
  // https://www.google.com/about/company/user-consent-policy for details.
  clickConversionBuilder.setConsent(
      Consent.newBuilder()
          .setAdUserData(ConsentStatus.valueOf(rawRecord.get("adUserDataConsent"))));
}

// Calls build to build the conversion.
ClickConversion clickConversion = clickConversionBuilder.build();
      

সি#

// Adds details of the conversion.
clickConversion.ConversionAction =
    ResourceNames.ConversionAction(customerId, conversionActionId);
clickConversion.ConversionDateTime = conversionDateTime;
clickConversion.ConversionValue = conversionValue;
clickConversion.CurrencyCode = "USD";

// Sets the order ID if provided.
if (!string.IsNullOrEmpty(orderId))
{
    clickConversion.OrderId = orderId;
}

// Sets the Google click ID (gclid) if provided.
if (!string.IsNullOrEmpty(gclid))
{
    clickConversion.Gclid = gclid;
}

      

পিএইচপি

// Adds details of the conversion.
$clickConversion->setConversionAction(
    ResourceNames::forConversionAction($customerId, $rawRecord['conversionActionId'])
);
$clickConversion->setConversionDateTime($rawRecord['conversionDateTime']);
$clickConversion->setConversionValue($rawRecord['conversionValue']);
$clickConversion->setCurrencyCode($rawRecord['currencyCode']);

// Sets the order ID if provided.
if (!empty($rawRecord['orderId'])) {
    $clickConversion->setOrderId($rawRecord['orderId']);
}

// Sets the Google click ID (gclid) if provided.
if (!empty($rawRecord['gclid'])) {
    $clickConversion->setGclid($rawRecord['gclid']);
}

// Sets the ad user data consent if provided.
if (!empty($rawRecord['adUserDataConsent'])) {
    // Specifies whether user consent was obtained for the data you are uploading. See
    // https://www.google.com/about/company/user-consent-policy for details.
    $clickConversion->setConsent(
        new Consent(['ad_user_data' => $rawRecord['adUserDataConsent']])
    );
}
      

পাইথন

# Add details of the conversion.
# Gets the conversion action resource name.
conversion_action_service = client.get_service("ConversionActionService")
click_conversion.conversion_action = (
    conversion_action_service.conversion_action_path(
        customer_id, raw_record["conversion_action_id"]
    )
)
click_conversion.conversion_date_time = raw_record["conversion_date_time"]
click_conversion.conversion_value = raw_record["conversion_value"]
click_conversion.currency_code = raw_record["currency_code"]

# Sets the order ID if provided.
if raw_record.get("order_id"):
    click_conversion.order_id = raw_record["order_id"]

# Sets the gclid if provided.
if raw_record.get("gclid"):
    click_conversion.gclid = raw_record["gclid"]

# Specifies whether user consent was obtained for the data you are
# uploading. For more details, see:
# https://www.google.com/about/company/user-consent-policy
if raw_record["ad_user_data_consent"]:
    click_conversion.consent.ad_user_data = client.enums.ConsentStatusEnum[
        raw_record["ad_user_data_consent"]
    ]
      

রুবি

cc.conversion_action = client.path.conversion_action(customer_id, conversion_action_id)
cc.conversion_date_time = conversion_date_time
cc.conversion_value = conversion_value.to_f
cc.currency_code = 'USD'

unless order_id.nil?
  cc.order_id = order_id
end

unless raw_record["gclid"].nil?
  cc.gclid = gclid
end

# Specifies whether user consent was obtained for the data you are
# uploading. For more details, see:
# https://www.google.com/about/company/user-consent-policy
unless raw_record["ad_user_data_consent"].nil?
  cc.consent = client.resource.consent do |c|
    c.ad_user_data = ad_user_data_consent
  end
end
      

পার্ল

# Add details of the conversion.
$click_conversion->{conversionAction} =
  Google::Ads::GoogleAds::V16::Utils::ResourceNames::conversion_action(
  $customer_id, $raw_record->{conversionActionId});
$click_conversion->{conversionDateTime} = $raw_record->{conversionDateTime};
$click_conversion->{conversionValue}    = $raw_record->{conversionValue};
$click_conversion->{currencyCode}       = $raw_record->{currencyCode};

# Set the order ID if provided.
if (defined $raw_record->{orderId}) {
  $click_conversion->{orderId} = $raw_record->{orderId};
}

# Set the Google click ID (gclid) if provided.
if (defined $raw_record->{gclid}) {
  $click_conversion->{gclid} = $raw_record->{gclid};
}

# Set the consent information, if provided.
if (defined $raw_record->{adUserDataConsent}) {
  $click_conversion->{consent} =
    Google::Ads::GoogleAds::V16::Common::Consent->new({
      adUserData => $raw_record->{adUserDataConsent}});
}
      

ক্লিক কনভার্সন আপলোড করুন

জাভা

// Creates the conversion upload service client.
try (ConversionUploadServiceClient conversionUploadServiceClient =
    googleAdsClient.getLatestVersion().createConversionUploadServiceClient()) {
  // Uploads the click conversion. Partial failure should always be set to true.

  // NOTE: This request contains a single conversion as a demonstration.  However, if you have
  // multiple conversions to upload, it's best to upload multiple conversions per request
  // instead of sending a separate request per conversion. See the following for per-request
  // limits:
  // https://developers.google.com/google-ads/api/docs/best-practices/quotas#conversion_upload_service
  UploadClickConversionsResponse response =
      conversionUploadServiceClient.uploadClickConversions(
          UploadClickConversionsRequest.newBuilder()
              .setCustomerId(Long.toString(customerId))
              .addConversions(clickConversion)
              // Enables partial failure (must be true).
              .setPartialFailure(true)
              .build());
      

সি#

// Uploads the click conversion. Partial failure should always be set to true.
// NOTE: This request contains a single conversion as a demonstration.
// However, if you have multiple conversions to upload, it's best to upload multiple
// conversions per request instead of sending a separate request per conversion.
// See the following for per-request limits:
// https://developers.google.com/google-ads/api/docs/best-practices/quotas#conversion_upload
UploadClickConversionsResponse response =
    conversionUploadService.UploadClickConversions(
        new UploadClickConversionsRequest()
        {
            CustomerId = customerId.ToString(),
            Conversions = { clickConversion },
            // Enables partial failure (must be true).
            PartialFailure = true
        });

      

পিএইচপি

// Issues a request to upload the click conversion.
$conversionUploadServiceClient = $googleAdsClient->getConversionUploadServiceClient();
// NOTE: This request contains a single conversion as a demonstration.  However, if you have
// multiple conversions to upload, it's best to upload multiple conversions per request
// instead of sending a separate request per conversion. See the following for per-request
// limits:
// https://developers.google.com/google-ads/api/docs/best-practices/quotas#conversion_upload_service
$response = $conversionUploadServiceClient->uploadClickConversions(
    // Enables partial failure (must be true).
    UploadClickConversionsRequest::build($customerId, [$clickConversion], true)
);
      

পাইথন

# Creates the conversion upload service client.
conversion_upload_service = client.get_service("ConversionUploadService")
# Uploads the click conversion. Partial failure should always be set to
# True.
# NOTE: This request only uploads a single conversion, but if you have
# multiple conversions to upload, it's most efficient to upload them in a
# single request. See the following for per-request limits for reference:
# https://developers.google.com/google-ads/api/docs/best-practices/quotas#conversion_upload_service
response = conversion_upload_service.upload_click_conversions(
    customer_id=customer_id,
    conversions=[click_conversion],
    # Enables partial failure (must be true).
    partial_failure=True,
)
      

রুবি

response = client.service.conversion_upload.upload_click_conversions(
  customer_id: customer_id,
  conversions: [click_conversion],
  # Partial failure must be true.
  partial_failure: true,
)

if response.partial_failure_error
  puts "Partial failure encountered: #{response.partial_failure_error.message}"
else
  result = response.results.first
  puts "Uploaded click conversion that happened at #{result.conversion_date_time} " \
    "to #{result.conversion_action}."
end
      

পার্ল

# Upload the click conversion. Partial failure should always be set to true.
#
# NOTE: This request contains a single conversion as a demonstration.
# However, if you have multiple conversions to upload, it's best to
# upload multiple conversions per request instead of sending a separate
# request per conversion. See the following for per-request limits:
# https://developers.google.com/google-ads/api/docs/best-practices/quotas#conversion_upload_service
my $response =
  $api_client->ConversionUploadService()->upload_click_conversions({
    customerId  => $customer_id,
    conversions => [$click_conversion],
    # Enable partial failure (must be true).
    partialFailure => "true"
  });
      

আপনার আপলোড পর্যালোচনা করুন

আপনার সাম্প্রতিক আপলোডগুলির সামগ্রিক স্বাস্থ্য পর্যালোচনা করতে অফলাইন ডেটা ডায়াগনস্টিকগুলি ব্যবহার করুন৷ মনে রাখবেন যে আপলোড সফলতার মানে এই নয় যে আপলোডগুলির মিল আছে৷

আপনার প্রচারাভিযানের জন্য রূপান্তর মেট্রিক সম্পর্কে রিপোর্ট করার সময়, Google Ads API রিপোর্টিং ফিল্ডের সাথে Google Ads UI মেট্রিক্সের সম্পর্ক স্থাপন করতে ম্যাপিং ইউজার ইন্টারফেস মেট্রিক্স দেখুন। আপনি একটি প্রদত্ত রূপান্তর কর্মের জন্য রূপান্তরগুলির মোট সংখ্যা এবং মোট রূপান্তর মান দেখতে conversion_action সংস্থানটি জিজ্ঞাসা করতে পারেন৷

পরবর্তী পদক্ষেপ

আপনি যদি আপনার রূপান্তরগুলি সামঞ্জস্য করতে চান তবে আপলোড রূপান্তর সামঞ্জস্য নির্দেশিকা দেখুন৷

লিড ইন্টিগ্রেশনের জন্য আপনার বর্ধিত রূপান্তরগুলির সমস্যা সমাধানের নির্দেশিকা পেতে, সমস্যা সমাধানের নির্দেশিকাতে যান৷