क्लिक कन्वर्ज़न अपलोड करें

Google Ads API का इस्तेमाल करके, ऑफ़लाइन क्लिक कन्वर्ज़न को Google Ads में अपलोड किया जा सकता है. इससे, उन विज्ञापनों को ट्रैक किया जा सकता है जिनकी वजह से ऑफ़लाइन दुनिया में बिक्री हुई है. जैसे, फ़ोन पर या बिक्री प्रतिनिधि के ज़रिए.

सेटअप

ऑफ़लाइन कन्वर्ज़न सेटअप करने के लिए, कुछ ज़रूरी शर्तें पूरी करनी होती हैं. लागू करने की प्रोसेस शुरू करने से पहले, पक्का करें कि सभी ज़रूरी शर्तें पूरी हों:

  1. अपने Google Ads कन्वर्ज़न ग्राहक खाते में, कन्वर्ज़न ट्रैकिंग की सुविधा चालू करें.

  2. टैगिंग कॉन्फ़िगर करें और क्लिक आईडी स्टोर करें.

1. अपने Google Ads कन्वर्ज़न ग्राहक खाते में, कन्वर्ज़न ट्रैकिंग की सुविधा चालू करना

अगर आपने कन्वर्ज़न ट्रैकिंग की सुविधा सेट अप करने की गाइड में दिए गए निर्देशों का पालन किया है और कन्वर्ज़न ट्रैकिंग की सुविधा चालू है, तो दूसरे चरण पर जाएं: टैगिंग कॉन्फ़िगर करना.

कन्वर्ज़न ट्रैकिंग सेटअप के बारे में जानकारी पाना

`ConversionTrackingSetting` के लिए संसाधन की क्वेरी करके, अपने खाते के कन्वर्ज़न ट्रैकिंग सेटअप की जांच की जा सकती है. साथ ही, यह पुष्टि की जा सकती है कि कन्वर्ज़न ट्रैकिंग की सुविधा चालू है.Customer GoogleAdsService.SearchStream के साथ यह क्वेरी जारी करें:

SELECT
  customer.conversion_tracking_setting.google_ads_conversion_customer,
  customer.conversion_tracking_setting.conversion_tracking_status,
  customer.conversion_tracking_setting.conversion_tracking_id,
  customer.conversion_tracking_setting.cross_account_conversion_tracking_id
FROM customer

google_ads_conversion_customer फ़ील्ड, उस Google Ads खाते के बारे में बताता है जो इस ग्राहक के लिए कन्वर्ज़न बनाता और मैनेज करता है. कई खातों में होने वाले कन्वर्ज़न को ट्रैक करने की सुविधा का इस्तेमाल करने वाले ग्राहकों के लिए, यह किसी मैनेजर खाते का आईडी होता है. कन्वर्ज़न बनाने और मैनेज करने के लिए, Google Ads API के अनुरोधों में Google Ads कन्वर्ज़न ग्राहक आईडी को customer_id के तौर पर दिया जाना चाहिए. ध्यान दें कि कन्वर्ज़न ट्रैकिंग की सुविधा चालू न होने पर भी, यह फ़ील्ड अपने-आप भर जाता है.

The conversion_tracking_status फ़ील्ड से पता चलता है कि कन्वर्ज़न ट्रैकिंग की सुविधा चालू है या नहीं. साथ ही, यह भी पता चलता है कि खाता कई खातों में होने वाले कन्वर्ज़न ट्रैक करने की सुविधा का इस्तेमाल कर रहा है या नहीं.

Google Ads कन्वर्ज़न ग्राहक खाते में कन्वर्ज़न ऐक्शन बनाना

अगर conversion_tracking_status की वैल्यू NOT_CONVERSION_TRACKED है, तो इसका मतलब है कि खाते के लिए कन्वर्ज़न ट्रैकिंग की सुविधा चालू नहीं है. Google Ads कन्वर्ज़न खाते में कम से कम एक ConversionAction बनाकर, कन्वर्ज़न ट्रैकिंग की सुविधा चालू करें . जैसे, यहां दिए गए उदाहरण में दिखाया गया है. इसके अलावा, यूज़र इंटरफ़ेस (यूआई) में कन्वर्ज़न ऐक्शन बनाया जा सकता है. इसके लिए, उस कन्वर्ज़न टाइप के लिए सहायता केंद्र में दिए गए निर्देशों का पालन करें जिसे चालू करना है.

ध्यान दें कि Google Ads API के ज़रिए भेजे जाने पर, बेहतर कन्वर्ज़न ट्रैकिंग की सुविधा अपने-आप चालू हो जाती है. हालांकि, इसे Google Ads के यूज़र इंटरफ़ेस (यूआई) से बंद किया जा सकता है.

कोड का उदाहरण

Java

private void runExample(GoogleAdsClient googleAdsClient, long customerId) {

  // Creates a ConversionAction.
  ConversionAction conversionAction =
      ConversionAction.newBuilder()
          // Note that conversion action names must be unique. If a conversion action already
          // exists with the specified conversion_action_name the create operation will fail with
          // a ConversionActionError.DUPLICATE_NAME error.
          .setName("Earth to Mars Cruises Conversion #" + getPrintableDateTime())
          .setCategory(ConversionActionCategory.DEFAULT)
          .setType(ConversionActionType.WEBPAGE)
          .setStatus(ConversionActionStatus.ENABLED)
          .setViewThroughLookbackWindowDays(15L)
          .setValueSettings(
              ValueSettings.newBuilder()
                  .setDefaultValue(23.41)
                  .setAlwaysUseDefaultValue(true)
                  .build())
          .build();

  // Creates the operation.
  ConversionActionOperation operation =
      ConversionActionOperation.newBuilder().setCreate(conversionAction).build();

  try (ConversionActionServiceClient conversionActionServiceClient =
      googleAdsClient.getLatestVersion().createConversionActionServiceClient()) {
    MutateConversionActionsResponse response =
        conversionActionServiceClient.mutateConversionActions(
            Long.toString(customerId), Collections.singletonList(operation));
    System.out.printf("Added %d conversion actions:%n", response.getResultsCount());
    for (MutateConversionActionResult result : response.getResultsList()) {
      System.out.printf(
          "New conversion action added with resource name: '%s'%n", result.getResourceName());
    }
  }
}
      

C#

public void Run(GoogleAdsClient client, long customerId)
{
    // Get the ConversionActionService.
    ConversionActionServiceClient conversionActionService =
        client.GetService(Services.V25.ConversionActionService);

    // Note that conversion action names must be unique.
    // If a conversion action already exists with the specified name the create operation
    // will fail with a ConversionAction.DUPLICATE_NAME error.
    string ConversionActionName = "Earth to Mars Cruises Conversion #"
        + ExampleUtilities.GetRandomString();

    // Add a conversion action.
    ConversionAction conversionAction = new ConversionAction()
    {
        Name = ConversionActionName,
        Category = ConversionActionCategory.Default,
        Type = ConversionActionType.Webpage,
        Status = ConversionActionStatus.Enabled,
        ViewThroughLookbackWindowDays = 15,
        ValueSettings = new ConversionAction.Types.ValueSettings()
        {
            DefaultValue = 23.41,
            AlwaysUseDefaultValue = true
        }
    };

    // Create the operation.
    ConversionActionOperation operation = new ConversionActionOperation()
    {
        Create = conversionAction
    };

    try
    {
        // Create the conversion action.
        MutateConversionActionsResponse response =
            conversionActionService.MutateConversionActions(customerId.ToString(),
                    new ConversionActionOperation[] { operation });

        // Display the results.
        foreach (MutateConversionActionResult newConversionAction in response.Results)
        {
            Console.WriteLine($"New conversion action with resource name = " +
                $"'{newConversionAction.ResourceName}' was added.");
        }
    }
    catch (GoogleAdsException e)
    {
        Console.WriteLine("Failure:");
        Console.WriteLine($"Message: {e.Message}");
        Console.WriteLine($"Failure: {e.Failure}");
        Console.WriteLine($"Request ID: {e.RequestId}");
        throw;
    }
}
      

PHP

public static function runExample(GoogleAdsClient $googleAdsClient, int $customerId)
{
    // Creates a conversion action.
    $conversionAction = new ConversionAction([
        // Note that conversion action names must be unique.
        // If a conversion action already exists with the specified conversion_action_name
        // the create operation will fail with a ConversionActionError.DUPLICATE_NAME error.
        'name' => 'Earth to Mars Cruises Conversion #' . Helper::getPrintableDatetime(),
        'category' => ConversionActionCategory::PBDEFAULT,
        'type' => ConversionActionType::WEBPAGE,
        'status' => ConversionActionStatus::ENABLED,
        'view_through_lookback_window_days' => 15,
        'value_settings' => new ValueSettings([
            'default_value' => 23.41,
            'always_use_default_value' => true
        ])
    ]);

    // Creates a conversion action operation.
    $conversionActionOperation = new ConversionActionOperation();
    $conversionActionOperation->setCreate($conversionAction);

    // Issues a mutate request to add the conversion action.
    $conversionActionServiceClient = $googleAdsClient->getConversionActionServiceClient();
    $response = $conversionActionServiceClient->mutateConversionActions(
        MutateConversionActionsRequest::build($customerId, [$conversionActionOperation])
    );

    printf("Added %d conversion actions:%s", $response->getResults()->count(), PHP_EOL);

    foreach ($response->getResults() as $addedConversionAction) {
        /** @var ConversionAction $addedConversionAction */
        printf(
            "New conversion action added with resource name: '%s'%s",
            $addedConversionAction->getResourceName(),
            PHP_EOL
        );
    }
}
      

Python

def main(client: GoogleAdsClient, customer_id: str) -> None:
    conversion_action_service: ConversionActionServiceClient = (
        client.get_service("ConversionActionService")
    )

    # Create the operation.
    conversion_action_operation: ConversionActionOperation = client.get_type(
        "ConversionActionOperation"
    )

    # Create conversion action.
    conversion_action: ConversionAction = conversion_action_operation.create

    # Note that conversion action names must be unique. If a conversion action
    # already exists with the specified conversion_action_name, the create
    # operation will fail with a ConversionActionError.DUPLICATE_NAME error.
    conversion_action.name = f"Earth to Mars Cruises Conversion {uuid.uuid4()}"
    conversion_action.type_ = (
        client.enums.ConversionActionTypeEnum.UPLOAD_CLICKS
    )
    conversion_action.category = (
        client.enums.ConversionActionCategoryEnum.DEFAULT
    )
    conversion_action.status = client.enums.ConversionActionStatusEnum.ENABLED
    conversion_action.view_through_lookback_window_days = 15

    # Create a value settings object.
    value_settings: ConversionAction.ValueSettings = (
        conversion_action.value_settings
    )
    value_settings.default_value = 15.0
    value_settings.always_use_default_value = True

    # Add the conversion action.
    conversion_action_response: MutateConversionActionsResponse = (
        conversion_action_service.mutate_conversion_actions(
            customer_id=customer_id,
            operations=[conversion_action_operation],
        )
    )

    print(
        "Created conversion action "
        f'"{conversion_action_response.results[0].resource_name}".'
    )
      

Ruby

def add_conversion_action(customer_id)
  # GoogleAdsClient will read a config file from
  # ENV['HOME']/google_ads_config.rb when called without parameters
  client = Google::Ads::GoogleAds::GoogleAdsClient.new


  # Add a conversion action.
  conversion_action = client.resource.conversion_action do |ca|
    ca.name = "Earth to Mars Cruises Conversion #{(Time.new.to_f * 100).to_i}"
    ca.type = :UPLOAD_CLICKS
    ca.category = :DEFAULT
    ca.status = :ENABLED
    ca.view_through_lookback_window_days = 15

    # Create a value settings object.
    ca.value_settings = client.resource.value_settings do |vs|
      vs.default_value = 15
      vs.always_use_default_value = true
    end
  end

  # Create the operation.
  conversion_action_operation = client.operation.create_resource.conversion_action(conversion_action)

  # Add the ad group ad.
  response = client.service.conversion_action.mutate_conversion_actions(
    customer_id: customer_id,
    operations: [conversion_action_operation],
  )

  puts "New conversion action with resource name = #{response.results.first.resource_name}."
end
      

Perl

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

  # Note that conversion action names must be unique.
  # If a conversion action already exists with the specified conversion_action_name,
  # the create operation fails with error ConversionActionError.DUPLICATE_NAME.
  my $conversion_action_name = "Earth to Mars Cruises Conversion #" . uniqid();

  # Create a conversion action.
  my $conversion_action =
    Google::Ads::GoogleAds::V25::Resources::ConversionAction->new({
      name                          => $conversion_action_name,
      category                      => DEFAULT,
      type                          => WEBPAGE,
      status                        => ENABLED,
      viewThroughLookbackWindowDays => 15,
      valueSettings                 =>
        Google::Ads::GoogleAds::V25::Resources::ValueSettings->new({
          defaultValue          => 23.41,
          alwaysUseDefaultValue => "true"
        })});

  # Create a conversion action operation.
  my $conversion_action_operation =
    Google::Ads::GoogleAds::V25::Services::ConversionActionService::ConversionActionOperation
    ->new({create => $conversion_action});

  # Add the conversion action.
  my $conversion_actions_response =
    $api_client->ConversionActionService()->mutate({
      customerId => $customer_id,
      operations => [$conversion_action_operation]});

  printf "New conversion action added with resource name: '%s'.\n",
    $conversion_actions_response->{results}[0]{resourceName};

  return 1;
}
      

curl

पक्का करें कि conversion_action_type को सही ConversionActionType वैल्यू पर सेट किया गया हो. Google Ads API में कन्वर्ज़न ऐक्शन बनाने के बारे में ज़्यादा जानने के लिए, कन्वर्ज़न ऐक्शन बनाना लेख देखें.

किसी मौजूदा कन्वर्ज़न ऐक्शन की जानकारी पाना

किसी मौजूदा कन्वर्ज़न ऐक्शन की जानकारी पाने के लिए, यह क्वेरी जारी करें. पक्का करें कि अनुरोध में मौजूद ग्राहक आईडी, ऊपर बताए गए Google Ads कन्वर्ज़न ग्राहक खाते के लिए सेट किया गया हो. साथ ही, कन्वर्ज़न ऐक्शन का टाइप, सही ConversionActionType वैल्यू पर सेट किया गया हो.

SELECT
  conversion_action.resource_name,
  conversion_action.name,
  conversion_action.status
FROM conversion_action
WHERE conversion_action.type = 'INSERT_CONVERSION_ACTION_TYPE'

2. टैगिंग कॉन्फ़िगर करना और क्लिक आईडी स्टोर करना

ऑटो-टैगिंग की सुविधा चालू है या नहीं, इसकी पुष्टि करने के लिए निर्देशों का पालन करें. अपने Google Ads खाते, वेबसाइट, और लीड-ट्रैकिंग सिस्टम को सेट अप करें, ताकि हर इंप्रेशन के लिए GCLID कैप्चर और स्टोर किया जा सके. साथ ही, अपने विज्ञापनों के लिए GBRAID या WBRAID यूआरएल पैरामीटर भी कैप्चर और स्टोर किए जा सकें. नए खातों के लिए, ऑटो-टैगिंग डिफ़ॉल्ट रूप से चालू होती है.

अनुरोध बनाना

UploadClickConversionsRequest बनाने और इसके फ़ील्ड को सही वैल्यू पर सेट करने के लिए, इस गाइडेंस का पालन करें.

customer_id

इससे, अपलोड किए जा रहे Google Ads खाते की पहचान होती है. इसे उस खाते के Google Ads कन्वर्ज़न ग्राहक खाते पर सेट करें जो क्लिक का सोर्स है.

job_id

इससे, ऑफ़लाइन डेटा डाइग्नोस्टिक्स में, हर जॉब की जानकारी के साथ अपलोड के अनुरोधों को जोड़ने का तरीका मिलता है.

अगर यह फ़ील्ड सेट नहीं किया जाता है, तो Google Ads API, हर अनुरोध को [2^31, 2^63) की रेंज में एक यूनीक वैल्यू असाइन करता है. अगर आपको कई अनुरोधों को एक लॉजिकल जॉब में ग्रुप करना है, तो अपनी जॉब के हर अनुरोध में इस फ़ील्ड को [0, 2^31) की रेंज में एक ही वैल्यू पर सेट करें.

जवाब में मौजूद job_id में, अनुरोध के लिए जॉब आईडी होता है. भले ही, आपने कोई वैल्यू तय की हो या Google Ads API को वैल्यू असाइन करने दिया हो.

partial_failure_enabled

इससे यह तय होता है कि Google Ads API, कार्रवाइयों से जुड़ी गड़बड़ियों को कैसे हैंडल करता है.

इस फ़ील्ड को true पर सेट करना ज़रूरी है. जवाब को प्रोसेस करते समय, आंशिक गड़बड़ियों से जुड़ी गाइडलाइन का पालन करें.

debug_enabled

इससे, लीड के लिए बेहतर कन्वर्ज़न ट्रैकिंग के अपलोड के लिए, गड़बड़ी की रिपोर्टिंग का तरीका तय होता है. gclid या gbraid या wbraid यूआरएल पैरामीटर का इस्तेमाल करके, क्लिक कन्वर्ज़न के लिए अपलोड को हैंडल करते समय, Google Ads API इस फ़ील्ड को अनदेखा करता है.

क्लिक कन्वर्ज़न की कार्रवाइयां बनाना

आपके UploadClickConversionRequest में मौजूद ClickConversion ऑब्जेक्ट का कलेक्शन, उन कन्वर्ज़न के सेट को तय करता है जिन्हें अपलोड करना है. हर ClickConversion को बनाने और उसके फ़ील्ड को सही वैल्यू पर सेट करने के लिए, इस गाइडेंस का पालन करें.

हर कन्वर्ज़न कार्रवाई के लिए ज़रूरी फ़ील्ड सेट करना

ClickConversion के ज़रूरी फ़ील्ड को सही वैल्यू पर सेट करने के लिए, इन निर्देशों का पालन करें.

gclid, gbraid, wbraid

ये GCLID या यूआरएल पैरामीटर होते हैं जिन्हें तब कैप्चर किया जाता है, जब कोई उपयोगकर्ता विज्ञापन पर क्लिक करने के बाद आपकी वेबसाइट या ऐप्लिकेशन पर पहुंचता है. इनमें से किसी एक की जानकारी देना ज़रूरी है:

  • gclid
  • gbraid
  • wbraid
conversion_date_time

कन्वर्ज़न की तारीख और समय.

वैल्यू में टाइमज़ोन तय किया जाना चाहिए. साथ ही, इसका फ़ॉर्मैट yyyy-mm-dd HH:mm:ss+|-HH:mm होना चाहिए. उदाहरण के लिए: 2022-01-01 19:32:45-05:00 (डेलाइट सेविंग टाइम को अनदेखा करते हुए) .

टाइमज़ोन की वैल्यू कोई भी मान्य वैल्यू हो सकती है. यह ज़रूरी नहीं है कि यह खाते के टाइमज़ोन से मेल खाए. हालांकि, अगर अपलोड किए गए कन्वर्ज़न डेटा की तुलना Google Ads के यूज़र इंटरफ़ेस (यूआई) में मौजूद डेटा से करनी है, तो हमारा सुझाव है कि Google Ads खाते के टाइमज़ोन का ही इस्तेमाल करें, ताकि कन्वर्ज़न की संख्या मेल खाए. ज़्यादा जानकारी और उदाहरण के लिए, सहायता केंद्र पर जाएं. साथ ही, मान्य टाइमज़ोन आईडी की सूची के लिए, कोड और फ़ॉर्मैट देखें.

user_identifiers

सिर्फ़ क्लिक आईडी का इस्तेमाल करके कन्वर्ज़न अपलोड करते समय, यह फ़ील्ड सेट न करें. अगर यह फ़ील्ड सेट किया जाता है, तो Google Ads, अपलोड की कार्रवाई को लीड के लिए बेहतर कन्वर्ज़न ट्रैकिंग के लिए अपलोड के तौर पर मानता है.

conversion_action

यह क्लिक कन्वर्ज़न के लिए ConversionAction का संसाधन नाम है.

कन्वर्ज़न ऐक्शन का type, UPLOAD_CLICKS होना चाहिए. साथ ही, यह उस Google Ads खाते के Google Ads कन्वर्ज़न ग्राहक खाते में मौजूद होना चाहिए जो क्लिक से जुड़ा है.

conversion_value

कन्वर्ज़न की वैल्यू.

currency_code

यह मुद्रा कोड है conversion_value.

हर कन्वर्ज़न कार्रवाई के लिए ज़रूरी नहीं फ़ील्ड सेट करना

ज़रूरी नहीं फ़ील्ड की इस सूची की समीक्षा करें और ज़रूरत के हिसाब से, इन्हें अपने ClickConversion पर सेट करें.

order_id
यह कन्वर्ज़न के लिए लेन-देन आईडी है. यह फ़ील्ड ज़रूरी नहीं है, लेकिन हमारा सुझाव है कि इसे सेट करें. अगर अपलोड के दौरान इसे सेट किया जाता है, तो कन्वर्ज़न में किए गए किसी भी तरह के अडजस्टमेंट के लिए इसका इस्तेमाल करना ज़रूरी है. डुप्लीकेट कन्वर्ज़न कम करने के लिए, लेन-देन आईडी का इस्तेमाल करने के तरीके के बारे में ज़्यादा जानने के लिए, सहायता केंद्र का यह लेख देखें.
external_attribution_data

अगर कन्वर्ज़न ट्रैक करने के लिए, तीसरे पक्ष के टूल या इन-हाउस समाधानों का इस्तेमाल किया जाता है, तो Google Ads को कन्वर्ज़न का सिर्फ़ कुछ क्रेडिट दिया जा सकता है. इसके अलावा, किसी कन्वर्ज़न के लिए क्रेडिट को कई क्लिक में डिस्ट्रिब्यूट किया जा सकता है. बाहर से एट्रिब्यूट किए गए कन्वर्ज़न इंपोर्ट की मदद से, हर क्लिक को असाइन किए गए क्रेडिट में हिस्सा अपलोड किया जा सकता है.

क्रेडिट का कुछ हिस्सा अपलोड करने के लिए, इस फ़ील्ड को ExternalAttributionData ऑब्जेक्ट पर सेट करें, जिसमें external_attribution_model और external_attribution_credit की वैल्यू हों.

custom_variables

ये कन्वर्ज़न के लिए कस्टम वैरिएबल की वैल्यू हैं.

Google Ads, wbraid या gbraid के साथ मिलकर, कन्वर्ज़न के लिए कस्टम वैरिएबल इस्तेमाल करने की सुविधा नहीं देता.

cart_data

cart_data फ़ील्ड में, ClickConversion के लिए शॉपिंग कार्ट डेटा शामिल किया जा सकता है. इसमें ये एट्रिब्यूट शामिल होते हैं:

  • merchant_id: यह Merchant Center के जुड़े खाते का आईडी है.
  • feed_country_code: यह Merchant Center के फ़ीड का आईएसओ 3166 दो वर्णों वाला इलाका कोड है.
  • feed_language_code: यह Merchant Center के फ़ीड का आईएसओ 639-1 भाषा कोड है.
  • local_transaction_cost: यह ClickConversion के currency_code में, लेन-देन के लेवल पर मिलने वाली सभी छूट का योग है.
  • items: यह शॉपिंग कार्ट में मौजूद आइटम हैं.

    items में मौजूद हर आइटम में ये एट्रिब्यूट शामिल होते हैं:

  • product_id: यह प्रॉडक्ट का आईडी है. इसे कभी-कभी ऑफ़र आईडी या आइटम आईडी भी कहा जाता है.

  • quantity: यह आइटम की संख्या है.

  • unit_price: यह आइटम की यूनिट प्राइस है.

conversion_environment

इससे पता चलता है कि यह कन्वर्ज़न किस एनवायरमेंट में रिकॉर्ड किया गया था. उदाहरण के लिए, ऐप्लिकेशन या वेब.

कोड का उदाहरण

Java

private void runExample(
    GoogleAdsClient googleAdsClient,
    long customerId,
    long conversionActionId,
    String gclid,
    String gbraid,
    String wbraid,
    String conversionDateTime,
    Double conversionValue,
    Long conversionCustomVariableId,
    String conversionCustomVariableValue,
    String orderId,
    ConsentStatus adUserDataConsent)
    throws InvalidProtocolBufferException {
  // Verifies that exactly one of gclid, gbraid, and wbraid is specified, as required.
  // See https://developers.google.com/google-ads/api/docs/conversions/upload-clicks for details.
  long numberOfIdsSpecified =
      Arrays.asList(gclid, gbraid, wbraid).stream().filter(idField -> idField != null).count();
  if (numberOfIdsSpecified != 1) {
    throw new IllegalArgumentException(
        "Exactly 1 of gclid, gbraid, or wbraid is required, but "
            + numberOfIdsSpecified
            + " ID values were provided");
  }

  // Constructs the conversion action resource name from the customer and conversion action IDs.
  String conversionActionResourceName =
      ResourceNames.conversionAction(customerId, conversionActionId);

  // Creates the click conversion.
  ClickConversion.Builder clickConversionBuilder =
      ClickConversion.newBuilder()
          .setConversionAction(conversionActionResourceName)
          .setConversionDateTime(conversionDateTime)
          .setConversionValue(conversionValue)
          .setCurrencyCode("USD");

  // Sets the single specified ID field.
  if (gclid != null) {
    clickConversionBuilder.setGclid(gclid);
  } else if (gbraid != null) {
    clickConversionBuilder.setGbraid(gbraid);
  } else {
    clickConversionBuilder.setWbraid(wbraid);
  }

  if (conversionCustomVariableId != null && conversionCustomVariableValue != null) {
    // Sets the custom variable and value, if provided.
    clickConversionBuilder.addCustomVariables(
        CustomVariable.newBuilder()
            .setConversionCustomVariable(
                ResourceNames.conversionCustomVariable(customerId, conversionCustomVariableId))
            .setValue(conversionCustomVariableValue));
  }

  if (orderId != null) {
    // Sets the order ID (unique transaction ID), if provided.
    clickConversionBuilder.setOrderId(orderId);
  }

  // Sets the consent information, if provided.
  if (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(adUserDataConsent));
  }
  ClickConversion clickConversion = clickConversionBuilder.build();

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

    // Prints any partial errors returned.
    if (response.hasPartialFailureError()) {
      GoogleAdsFailure googleAdsFailure =
          ErrorUtils.getInstance().getGoogleAdsFailure(response.getPartialFailureError());
      // Constructs a protocol buffer printer that will print error details in a concise format.
      Printer errorPrinter = JsonFormat.printer().omittingInsignificantWhitespace();
      for (int operationIndex = 0;
          operationIndex < response.getResultsCount();
          operationIndex++) {
        ClickConversionResult conversionResult = response.getResults(operationIndex);
        if (ErrorUtils.getInstance().isPartialFailureResult(conversionResult)) {
          // Prints the errors for the failed operation.
          System.out.printf("Operation %d failed with the following errors:%n", operationIndex);
          for (GoogleAdsError resultError :
              ErrorUtils.getInstance().getGoogleAdsErrors(operationIndex, googleAdsFailure)) {
            // Prints the error with newlines and extra spaces removed.
            System.out.printf("  %s%n", errorPrinter.print(resultError));
          }
        } else {
          // Prints the information about the successful operation.
          StringBuilder clickInfoBuilder =
              new StringBuilder("conversion that occurred at ")
                  .append(String.format("'%s' ", conversionResult.getConversionDateTime()))
                  .append("with ");
          if (conversionResult.hasGclid()) {
            clickInfoBuilder.append(String.format("gclid '%s'", conversionResult.getGclid()));
          } else if (!conversionResult.getGbraid().isEmpty()) {
            clickInfoBuilder.append(String.format("gbraid '%s'", conversionResult.getGbraid()));
          } else if (!conversionResult.getWbraid().isEmpty()) {
            clickInfoBuilder.append(String.format("wbraid '%s'", conversionResult.getWbraid()));
          } else {
            clickInfoBuilder.append("no click ID");
          }
          System.out.printf("Operation %d for %s succeeded.%n", operationIndex, clickInfoBuilder);
        }
      }
    }
  }
}
      

C#

public void Run(GoogleAdsClient client, long customerId, long conversionActionId,
    string gclid, string gbraid, string wbraid, string conversionTime,
    double conversionValue, ConsentStatus? adUserDataConsent)
{
    // Get the ConversionActionService.
    ConversionUploadServiceClient conversionUploadService =
        client.GetService(Services.V25.ConversionUploadService);

    // Creates a click conversion by specifying currency as USD.
    ClickConversion clickConversion = new ClickConversion()
    {
        ConversionAction = ResourceNames.ConversionAction(customerId, conversionActionId),
        ConversionValue = conversionValue,
        ConversionDateTime = conversionTime,
        CurrencyCode = "USD",
    };

    // Sets the consent information, if provided.
    if (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.
        clickConversion.Consent = new Consent()
        {
            AdUserData = (ConsentStatus)adUserDataConsent
        };
    }

    // Verifies that exactly one of gclid, gbraid, and wbraid is specified, as required.
    // See https://developers.google.com/google-ads/api/docs/conversions/upload-clicks
    // for details.
    string[] ids = { gclid, gbraid, wbraid };
    int idCount = ids.Where(id => !string.IsNullOrEmpty(id)).Count();

    if (idCount != 1)
    {
        throw new ArgumentException($"Exactly 1 of gclid, gbraid, or wbraid is " +
            $"required, but {idCount} ID values were provided");
    }

    // Sets the single specified ID field.
    if (!string.IsNullOrEmpty(gclid))
    {
        clickConversion.Gclid = gclid;
    }
    else if (!string.IsNullOrEmpty(wbraid))
    {
        clickConversion.Wbraid = wbraid;
    }
    else if (!string.IsNullOrEmpty(gbraid))
    {
        clickConversion.Gbraid = gbraid;
    }

    try
    {
        // Issues a request to upload the click conversion.
        UploadClickConversionsResponse response =
            conversionUploadService.UploadClickConversions(
                new UploadClickConversionsRequest()
                {
                    CustomerId = customerId.ToString(),
                    Conversions = { clickConversion },
                    PartialFailure = true,
                    ValidateOnly = false
                });

        // Prints the result.
        ClickConversionResult uploadedClickConversion = response.Results[0];
        Console.WriteLine($"Uploaded conversion that occurred at " +
            $"'{uploadedClickConversion.ConversionDateTime}' from Google " +
            $"Click ID '{uploadedClickConversion.Gclid}' to " +
            $"'{uploadedClickConversion.ConversionAction}'.");
    }
    catch (GoogleAdsException e)
    {
        Console.WriteLine("Failure:");
        Console.WriteLine($"Message: {e.Message}");
        Console.WriteLine($"Failure: {e.Failure}");
        Console.WriteLine($"Request ID: {e.RequestId}");
        throw;
    }
}
      

PHP

public static function runExample(
    GoogleAdsClient $googleAdsClient,
    int $customerId,
    int $conversionActionId,
    ?string $gclid,
    ?string $gbraid,
    ?string $wbraid,
    ?string $orderId,
    string $conversionDateTime,
    float $conversionValue,
    ?string $conversionCustomVariableId,
    ?string $conversionCustomVariableValue,
    ?int $adUserDataConsent
) {
    // Verifies that exactly one of gclid, gbraid, and wbraid is specified, as required.
    // See https://developers.google.com/google-ads/api/docs/conversions/upload-clicks for details.
    $nonNullFields = array_filter(
        [$gclid, $gbraid, $wbraid],
        function ($field) {
            return !is_null($field);
        }
    );
    if (count($nonNullFields) !== 1) {
        throw new \UnexpectedValueException(
            sprintf(
                "Exactly 1 of gclid, gbraid or wbraid is required, but %d ID values were "
                . "provided",
                count($nonNullFields)
            )
        );
    }

    // Creates a click conversion by specifying currency as USD.
    $clickConversion = new ClickConversion([
        'conversion_action' =>
            ResourceNames::forConversionAction($customerId, $conversionActionId),
        'conversion_value' => $conversionValue,
        'conversion_date_time' => $conversionDateTime,
        'currency_code' => 'USD'
    ]);
    // Sets the single specified ID field.
    if (!is_null($gclid)) {
        $clickConversion->setGclid($gclid);
    } elseif (!is_null($gbraid)) {
        $clickConversion->setGbraid($gbraid);
    } else {
        $clickConversion->setWbraid($wbraid);
    }

    if (!is_null($conversionCustomVariableId) && !is_null($conversionCustomVariableValue)) {
        $clickConversion->setCustomVariables([new CustomVariable([
            'conversion_custom_variable' => ResourceNames::forConversionCustomVariable(
                $customerId,
                $conversionCustomVariableId
            ),
            'value' => $conversionCustomVariableValue
        ])]);
    }
    // Sets the consent information, if provided.
    if (!empty($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' => $adUserDataConsent]));
    }

    if (!empty($orderId)) {
        // Sets the order ID (unique transaction ID), if provided.
        $clickConversion->setOrderId($orderId);
    }

    // Issues a request to upload the click conversion.
    $conversionUploadServiceClient = $googleAdsClient->getConversionUploadServiceClient();
    /** @var UploadClickConversionsResponse $response */
    // 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(
        // Uploads the click conversion. Partial failure should always be set to true.
        UploadClickConversionsRequest::build($customerId, [$clickConversion], true)
    );

    // Prints the status message if any partial failure error is returned.
    // Note: The details of each partial failure error are not printed here, you can refer to
    // the example HandlePartialFailure.php to learn more.
    if ($response->hasPartialFailureError()) {
        printf(
            "Partial failures occurred: '%s'.%s",
            $response->getPartialFailureError()->getMessage(),
            PHP_EOL
        );
    } else {
        // Prints the result if exists.
        /** @var ClickConversionResult $uploadedClickConversion */
        $uploadedClickConversion = $response->getResults()[0];
        printf(
            "Uploaded click conversion that occurred at '%s' from Google Click ID '%s' " .
            "to '%s'.%s",
            $uploadedClickConversion->getConversionDateTime(),
            $uploadedClickConversion->getGclid(),
            $uploadedClickConversion->getConversionAction(),
            PHP_EOL
        );
    }
}
      

Python

def main(
    client: GoogleAdsClient,
    customer_id: str,
    conversion_action_id: str,
    gclid: Optional[str],
    conversion_date_time: str,
    conversion_value: str,
    conversion_custom_variable_id: Optional[str],
    conversion_custom_variable_value: Optional[str],
    gbraid: Optional[str],
    wbraid: Optional[str],
    order_id: Optional[str],
    ad_user_data_consent: Optional[str],
) -> None:
    """Creates a click conversion with a default currency of USD.

    Args:
        client: An initialized GoogleAdsClient instance.
        customer_id: The client customer ID string.
        conversion_action_id: The ID of the conversion action to upload to.
        gclid: The Google Click Identifier ID. If set, the wbraid and gbraid
            parameters must be None.
        conversion_date_time: The the date and time of the conversion (should be
            after the click time). The format is 'yyyy-mm-dd hh:mm:ss+|-hh:mm',
            e.g. '2021-01-01 12:32:45-08:00'.
        conversion_value: The conversion value in the desired currency.
        conversion_custom_variable_id: The ID of the conversion custom
            variable to associate with the upload.
        conversion_custom_variable_value: The str value of the conversion custom
            variable to associate with the upload.
        gbraid: The GBRAID for the iOS app conversion. If set, the gclid and
            wbraid parameters must be None.
        wbraid: The WBRAID for the iOS app conversion. If set, the gclid and
            gbraid parameters must be None.
        order_id: The order ID for the click conversion.
        ad_user_data_consent: The ad user data consent for the click.
    """
    click_conversion: ClickConversion = client.get_type("ClickConversion")
    conversion_upload_service: ConversionUploadServiceClient = (
        client.get_service("ConversionUploadService")
    )
    conversion_action_service: ConversionActionServiceClient = (
        client.get_service("ConversionActionService")
    )
    click_conversion.conversion_action = (
        conversion_action_service.conversion_action_path(
            customer_id, conversion_action_id
        )
    )

    # Sets the single specified ID field.
    if gclid:
        click_conversion.gclid = gclid
    elif gbraid:
        click_conversion.gbraid = gbraid
    else:
        click_conversion.wbraid = wbraid

    click_conversion.conversion_value = float(conversion_value)
    click_conversion.conversion_date_time = conversion_date_time
    click_conversion.currency_code = "USD"

    if conversion_custom_variable_id and conversion_custom_variable_value:
        conversion_custom_variable: CustomVariable = client.get_type(
            "CustomVariable"
        )
        conversion_custom_variable.conversion_custom_variable = (
            conversion_upload_service.conversion_custom_variable_path(
                customer_id, conversion_custom_variable_id
            )
        )
        conversion_custom_variable.value = conversion_custom_variable_value
        click_conversion.custom_variables.append(conversion_custom_variable)

    if order_id:
        click_conversion.order_id = order_id

    # Sets the consent information, if provided.
    if ad_user_data_consent:
        # 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
        click_conversion.consent.ad_user_data = client.enums.ConsentStatusEnum[
            ad_user_data_consent
        ]

    # Uploads the click conversion. Partial failure must be set to True here.
    #
    # 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
    request: UploadClickConversionsRequest = client.get_type(
        "UploadClickConversionsRequest"
    )
    request.customer_id = customer_id
    request.conversions.append(click_conversion)
    request.partial_failure = True
    conversion_upload_response: UploadClickConversionsResponse = (
        conversion_upload_service.upload_click_conversions(
            request=request,
        )
    )
    uploaded_click_conversion: ClickConversionResult = (
        conversion_upload_response.results[0]
    )
    print(
        f"Uploaded conversion that occurred at "
        f'"{uploaded_click_conversion.conversion_date_time}" from '
        f'Google Click ID "{uploaded_click_conversion.gclid}" '
        f'to "{uploaded_click_conversion.conversion_action}"'
    )
      

Ruby

def upload_offline_conversion(
  customer_id,
  conversion_action_id,
  gclid,
  gbraid,
  wbraid,
  conversion_date_time,
  conversion_value,
  conversion_custom_variable_id,
  conversion_custom_variable_value,
  ad_user_data_consent)
  # GoogleAdsClient will read a config file from
  # ENV['HOME']/google_ads_config.rb when called without parameters
  client = Google::Ads::GoogleAds::GoogleAdsClient.new

  # Verifies that exactly one of gclid, gbraid, and wbraid is specified, as required.
  # See https://developers.google.com/google-ads/api/docs/conversions/upload-clicks for details.
  identifiers_specified = [gclid, gbraid, wbraid].reject {|v| v.nil?}.count
  if identifiers_specified != 1
    raise "Must specify exactly one of GCLID, GBRAID, and WBRAID. " \
      "#{identifiers_specified} values were provided."
  end

  click_conversion = client.resource.click_conversion do |cc|
    cc.conversion_action = client.path.conversion_action(customer_id, conversion_action_id)
    # Sets the single specified ID field.
    if !gclid.nil?
      cc.gclid = gclid
    elsif !gbraid.nil?
      cc.gbraid = gbraid
    else
      cc.wbraid = wbraid
    end
    cc.conversion_value = conversion_value.to_f
    cc.conversion_date_time = conversion_date_time
    cc.currency_code = 'USD'
    if conversion_custom_variable_id && conversion_custom_variable_value
      cc.custom_variables << client.resource.custom_variable do |cv|
        cv.conversion_custom_variable = client.path.conversion_custom_variable(
          customer_id, conversion_custom_variable_id)
        cv.value = conversion_custom_variable_value
      end
    end
    # Sets the consent information, if provided.
    unless ad_user_data_consent.nil?
      cc.consent = client.resource.consent do |c|
        # 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
        c.ad_user_data = ad_user_data_consent
      end
    end
  end

  response = client.service.conversion_upload.upload_click_conversions(
    customer_id: customer_id,
    # 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
    conversions: [click_conversion],
    partial_failure: true,
  )
  if response.partial_failure_error.nil?
    result = response.results.first
    puts "Uploaded conversion that occurred at #{result.conversion_date_time} " \
      "from Google Click ID #{result.gclid} to #{result.conversion_action}."
  else
    failures = client.decode_partial_failure_error(response.partial_failure_error)
    puts "Request failed. Failure details:"
    failures.each do |failure|
      failure.errors.each do |error|
        puts "\t#{error.error_code.error_code}: #{error.message}"
      end
    end
  end
end
      

Perl

sub upload_offline_conversion {
  my (
    $api_client,                    $customer_id,
    $conversion_action_id,          $gclid,
    $gbraid,                        $wbraid,
    $conversion_date_time,          $conversion_value,
    $conversion_custom_variable_id, $conversion_custom_variable_value,
    $order_id,                      $ad_user_data_consent
  ) = @_;

  # Verify that exactly one of gclid, gbraid, and wbraid is specified, as required.
  # See https://developers.google.com/google-ads/api/docs/conversions/upload-clicks for details.
  my $number_of_ids_specified = grep { defined $_ } ($gclid, $gbraid, $wbraid);
  if ($number_of_ids_specified != 1) {
    die sprintf "Exactly 1 of gclid, gbraid, or wbraid is required, " .
      "but %d ID values were provided.\n",
      $number_of_ids_specified;
  }

  # Create a click conversion by specifying currency as USD.
  my $click_conversion =
    Google::Ads::GoogleAds::V25::Services::ConversionUploadService::ClickConversion
    ->new({
      conversionAction =>
        Google::Ads::GoogleAds::V25::Utils::ResourceNames::conversion_action(
        $customer_id, $conversion_action_id
        ),
      conversionDateTime => $conversion_date_time,
      conversionValue    => $conversion_value,
      currencyCode       => "USD"
    });

  # Set the single specified ID field.
  if (defined $gclid) {
    $click_conversion->{gclid} = $gclid;
  } elsif (defined $gbraid) {
    $click_conversion->{gbraid} = $gbraid;
  } else {
    $click_conversion->{wbraid} = $wbraid;
  }

  if ($conversion_custom_variable_id && $conversion_custom_variable_value) {
    $click_conversion->{customVariables} = [
      Google::Ads::GoogleAds::V25::Services::ConversionUploadService::CustomVariable
        ->new({
          conversionCustomVariable =>
            Google::Ads::GoogleAds::V25::Utils::ResourceNames::conversion_custom_variable(
            $customer_id, $conversion_custom_variable_id
            ),
          value => $conversion_custom_variable_value
        })];
  }

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

  # Set the consent information, if provided.
  if ($ad_user_data_consent) {
    # Specify whether user consent was obtained for the data you are uploading.
    # See https://www.google.com/about/company/user-consent-policy for details.
    $click_conversion->{consent} =
      Google::Ads::GoogleAds::V25::Common::Consent->new({
        adUserData => $ad_user_data_consent
      });
  }

  # Issue a request to 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 $upload_click_conversions_response =
    $api_client->ConversionUploadService()->upload_click_conversions({
      customerId     => $customer_id,
      conversions    => [$click_conversion],
      partialFailure => "true"
    });

  # Print any partial errors returned.
  if ($upload_click_conversions_response->{partialFailureError}) {
    printf "Partial error encountered: '%s'.\n",
      $upload_click_conversions_response->{partialFailureError}{message};
  }

  # Print the result if valid.
  my $uploaded_click_conversion =
    $upload_click_conversions_response->{results}[0];
  if (%$uploaded_click_conversion) {
    printf
      "Uploaded conversion that occurred at '%s' from Google Click ID '%s' " .
      "to the conversion action with resource name '%s'.\n",
      $uploaded_click_conversion->{conversionDateTime},
      $uploaded_click_conversion->{gclid},
      $uploaded_click_conversion->{conversionAction};
  }

  return 1;
}
      

curl

# This code example uploads a click conversion.
#
# Variables:
#   API_VERSION,
#   CUSTOMER_ID,
#   DEVELOPER_TOKEN,
#   MANAGER_CUSTOMER_ID,
#   OAUTH2_ACCESS_TOKEN:
#     See https://developers.google.com/google-ads/api/rest/auth#request_headers
#     for details.
#
#   CONVERSION_ACTION_RESOURCE_NAME: Resource name of the conversion action
#     associated with this conversion.
#   GCLID: The Google click ID (gclid) associated with this conversion.
#   CONVERSION_VALUE: The value of the conversion for the advertiser.
#   CONVERSION_DATE_TIME: The date time at which the conversion occurred. The
#     format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", for example,
#     "2019-01-01 12:32:45-08:00".
#   CURRENCY_CODE: The currency code of the conversion value. This is the
#     ISO 4217 3-character currency code. For example: USD, EUR.
#   CONVERSION_CUSTOM_VARIABLE: The name of the conversion custom variable.
#   CONVERSION_CUSTOM_VARIABLE_VALUE: The value of the conversion custom
#     variable.
#   ORDER_ID: The order ID of the conversion.
curl -f --request POST \
"https://googleads.googleapis.com/v${API_VERSION}/customers/${CUSTOMER_ID}:uploadClickConversions" \
--header "Content-Type: application/json" \
--header "developer-token: ${DEVELOPER_TOKEN}" \
--header "login-customer-id: ${MANAGER_CUSTOMER_ID}" \
--header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \
--data @- <<EOF
{
  "conversions": [
    {
      "conversionAction": "${CONVERSION_ACTION_RESOURCE_NAME}",
      "gclid": "${GCLID}",
      "conversionValue": ${CONVERSION_VALUE},
      "conversionDateTime": "${CONVERSION_DATE_TIME}",
      "currencyCode": "${CURRENCY_CODE}",
      "customVariables": [
        {
          "conversionCustomVariable": "${CONVERSION_CUSTOM_VARIABLE}",
          "value": "${CONVERSION_CUSTOM_VARIABLE_VALUE}"
        }
      ],
      "orderId": "${ORDER_ID}",
      "consent": {
        "adUserData": "GRANTED"
      }
    }
  ],
  "partialFailure": true
}
EOF
      

समस्या हल करें

ऑफ़लाइन डेटा डाइग्नोस्टिक्स, अपलोड की गई फ़ाइलों की परफ़ॉर्मेंस की लगातार समीक्षा करने के लिए एक ही संसाधन उपलब्ध कराता है. हालांकि, लागू करने के दौरान, जवाब के partial_failure_error फ़ील्ड में रिपोर्ट की गई किसी भी गड़बड़ी की जांच करने के लिए, इस सेक्शन में दी गई जानकारी का इस्तेमाल किया जा सकता है.

कन्वर्ज़न ऐक्शन अपलोड करते समय, होने वाली कुछ सामान्य गड़बड़ियां, अनुमति से जुड़ी गड़बड़ियां होती हैं. जैसे, USER_PERMISSION_DENIED. दोबारा जांच करें कि आपके अनुरोध में मौजूद ग्राहक आईडी, उस Google Ads कन्वर्ज़न ग्राहक खाते के लिए सेट किया गया है जो कन्वर्ज़न ऐक्शन का मालिक है. ज़्यादा जानकारी के लिए, अनुमति से जुड़ी हमारी गाइड देखें. साथ ही, इन अलग-अलग गड़बड़ियों को डीबग करने के तरीके के बारे में सुझाव पाने के लिए, सामान्य गड़बड़ियों से जुड़ी हमारी गाइड देखें.

सामान्य गड़बड़ियों को डीबग करना

गड़बड़ी
INVALID_CONVERSION_ACTION_TYPE तय किए गए कन्वर्ज़न ऐक्शन का टाइप क्लिक कन्वर्ज़न अपलोड करने के लिए मान्य नहीं है. पक्का करें कि अपलोड के अनुरोध में तय किए गए ConversionAction का टाइप, UPLOAD_CLICKS हो.
NO_CONVERSION_ACTION_FOUND तय किया गया कन्वर्ज़न ऐक्शन या तो चालू नहीं है या अपलोड किए जा रहे customer_id में नहीं मिला. अपने कन्वर्ज़न सेटअप के बारे में जानकारी पाएं ताकि यह पक्का किया जा सके कि अपलोड में मौजूद कन्वर्ज़न ऐक्शन चालू है और यह अपलोड के अनुरोध के customer_id के मालिकाना हक में है.
TOO_RECENT_CONVERSION_ACTION कन्वर्ज़न ऐक्शन हाल ही में बनाया गया है. फ़ेल हुए कन्वर्ज़न को फिर से अपलोड करने से पहले, ऐक्शन बनाने के बाद कम से कम छह घंटे इंतज़ार करें.
INVALID_CUSTOMER_FOR_CLICK अनुरोध का customer_id उस ग्राहक आईडी से अलग है जो क्लिक के समय Google Ads API का कन्वर्ज़न खाता था. अनुरोध के customer_id को सही ग्राहक आईडी पर अपडेट करें.
EVENT_NOT_FOUND Google Ads को क्लिक आईडी और customer_id का कॉम्बिनेशन नहीं मिला. ज़रूरी शर्तेंcustomer_id देखें और पुष्टि करें कि आपने सही Google Ads खाते का इस्तेमाल करके अपलोड किया है.
DUPLICATE_CLICK_CONVERSION_IN_REQUEST अनुरोध में मौजूद कई कन्वर्ज़न में, क्लिक आईडी, conversion_date_time और conversion_action का एक ही कॉम्बिनेशन है. अपने अनुरोध से डुप्लीकेट कन्वर्ज़न हटाएं.
CLICK_CONVERSION_ALREADY_EXISTS क्लिक आईडी, conversion_date_time, और conversion_action के एक ही कॉम्बिनेशन वाला कन्वर्ज़न, पहले ही अपलोड किया जा चुका है. अगर अपलोड को फिर से करने की कोशिश की जा रही थी और यह कन्वर्ज़न पहले ही अपलोड हो चुका है, तो इस गड़बड़ी को अनदेखा करें. अगर पहले से अपलोड किए गए कन्वर्ज़न के अलावा कोई दूसरा कन्वर्ज़न जोड़ना है, तो पहले से अपलोड किए गए कन्वर्ज़न को डुप्लीकेट होने से बचाने के लिए, conversion_date_time के ClickConversion को अडजस्ट करें.
EVENT_NOT_FOUND Google Ads को क्लिक आईडी और customer_id का कॉम्बिनेशन नहीं मिला. ज़रूरी शर्तेंcustomer_id देखें और पुष्टि करें कि आपने सही Google Ads खाते का इस्तेमाल करके अपलोड किया है.
EXPIRED_EVENT इंपोर्ट किया गया क्लिक, click_through_lookback_window_days फ़ील्ड में तय की गई समयावधि से पहले हुआ था. A `click_through_lookback_window_days` click_through_lookback_window_days में किया गया बदलाव, सिर्फ़ बदलाव के बाद रिकॉर्ड किए गए क्लिक पर असर डालता है. इसलिए, लुकबैक विंडो में बदलाव करने से, इस क्लिक के लिए यह गड़बड़ी ठीक नहीं होगी. अगर ज़रूरी हो, तो conversion_action को किसी दूसरे ऐक्शन पर बदलें जिसकी लुकबैक विंडो लंबी हो.
CONVERSION_PRECEDES_EVENT conversion_date_time, क्लिक की तारीख और समय से पहले का है. conversion_date_time को बाद की वैल्यू पर अपडेट करें.
GBRAID_WBRAID_BOTH_SET ClickConversion में, gbraid और wbraid, दोनों के लिए वैल्यू सेट की गई है. कन्वर्ज़न को अपडेट करें, ताकि सिर्फ़ एक क्लिक आईडी या यूआरएल पैरामीटर का इस्तेमाल किया जा सके. साथ ही, पक्का करें कि एक ही कन्वर्ज़न में कई क्लिक को शामिल न किया गया हो. हर क्लिक के लिए, सिर्फ़ एक क्लिक आईडी या यूआरएल पैरामीटर होता है.
VALUE_MUST_BE_UNSET गड़बड़ी की वजह इनमें से कौनसी समस्या है, यह पता लगाने के लिए location की GoogleAdsError देखें.
  • ClickConversion में, gclid के साथ-साथ gbraid या wbraid में से कम से कम एक के लिए वैल्यू सेट की गई है. कन्वर्ज़न को अपडेट करें, ताकि सिर्फ़ एक क्लिक आईडी या यूआरएल पैरामीटर का इस्तेमाल किया जा सके. साथ ही, पक्का करें कि एक ही कन्वर्ज़न में कई क्लिक को शामिल न किया गया हो. हर क्लिक के लिए, सिर्फ़ एक क्लिक आईडी या यूआरएल पैरामीटर होता है.
  • ClickConversion में, gbraid या wbraid में से किसी एक के लिए वैल्यू सेट की गई है. साथ ही, इसमें custom_variables के लिए भी वैल्यू है. Google Ads, gbraid या wbraid यूआरएल पैरामीटर वाले कन्वर्ज़न के लिए, कस्टम वैरिएबल इस्तेमाल करने की सुविधा नहीं देता. कन्वर्ज़न के custom_variables फ़ील्ड को अनसेट करें.

रिपोर्ट में कन्वर्ज़न

अपलोड किए गए कन्वर्ज़न, ओरिजनल क्लिक की इंप्रेशन की तारीख के लिए रिपोर्ट में दिखते हैं, ये अपलोड के अनुरोध की तारीख या conversion_date_time की तारीख के लिए नहीं दिखते ClickConversion.

इंपोर्ट किए गए कन्वर्ज़न के आंकड़े, Google Ads खाते में लास्ट-क्लिक एट्रिब्यूशन के लिए दिखने में तीन घंटे तक लग सकते हैं. सर्च एट्रिब्यूशन के अन्य मॉडल के लिए, इसमें तीन घंटे से ज़्यादा समय लग सकता है. ज़्यादा जानकारी के लिए, डेटा के अपडेट होने की दर से जुड़ी गाइड देखें.