রূপান্তর সম্পাদনা করুন

এই নির্দেশিকা ক্যাম্পেইন ম্যানেজার 360 API Conversions পরিষেবা ব্যবহার করে রূপান্তর সম্পাদনা করার জন্য বিস্তারিত নির্দেশনা প্রদান করে। চালিয়ে যাওয়ার আগে, অফলাইন রূপান্তরগুলির একটি ভূমিকার জন্য এবং এই নির্দেশিকায় আলোচিত ধারণাগুলির সাথে নিজেকে পরিচিত করার জন্য আপনাকে ওভারভিউটি পর্যালোচনা করার পরামর্শ দেওয়া হচ্ছে৷

তুমি শুরু করার আগে

এই সম্পাদনা কর্মপ্রবাহ আপনাকে বিদ্যমান অনলাইন এবং অফলাইন রূপান্তরগুলির quantity এবং value পরিবর্তন করতে দেয়৷ এটি করার জন্য, আপনাকে এমন মান প্রদান করতে হবে যা সম্পাদনা করার জন্য রূপান্তরগুলিকে অনন্যভাবে চিহ্নিত করে। আপনি যে ধরনের রূপান্তরগুলি সম্পাদনা করছেন তার উপর নির্ভর করে, আপনি বিভিন্ন উপায়ে এই মানগুলি পাবেন:

  • অনলাইন রূপান্তর সনাক্ত করার জন্য প্রয়োজনীয় মানগুলি ডেটা স্থানান্তর থেকে প্রাপ্ত করা যেতে পারে।

  • অফলাইন রূপান্তর সনাক্ত করার জন্য প্রয়োজনীয় মানগুলি সফল batchinsert অনুরোধের ConversionsBatchInsertResponse এ ফেরত দেওয়া হয়।

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

রূপান্তর সংস্থান কনফিগার করুন

সম্পাদনা কর্মপ্রবাহের প্রথম ধাপে এক বা একাধিক Conversion সংস্থান বস্তু তৈরি করা জড়িত।

নিম্নলিখিত ক্ষেত্রগুলি সম্পাদনা করার জন্য একটি রূপান্তর সনাক্ত করতে ব্যবহৃত হয়। এই ক্ষেত্রগুলি আবশ্যক এবং একটি বিদ্যমান রূপান্তরের সাথে হুবহু মেলে।

মাঠ বর্ণনা

encryptedUserId বা gclid বা dclicd বা matchid বা mobileDeviceId

এনক্রিপ্ট করা ইউজার আইডি, Google ক্লিক আইডি, ডিসপ্লে ক্লিক আইডি, ম্যাচ আইডি বা মোবাইল ডিভাইস আইডি যা কনভার্সন জেনারেট করেছে।
floodlightActivityId ফ্লাডলাইট অ্যাক্টিভিটি যার জন্য রূপান্তরকে দায়ী করা হয়েছে।
floodlightConfigurationId নির্দিষ্ট কার্যকলাপ দ্বারা ব্যবহৃত ফ্লাডলাইট কনফিগারেশন।
ordinal রূপান্তরের সাথে যুক্ত অনুলিপি শনাক্তকারী
timestampMicros ইউনিক্স যুগ থেকে মাইক্রোসেকেন্ডে রূপান্তরের টাইমস্ট্যাম্প।

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

মাঠ বর্ণনা
quantity রূপান্তরের সাথে যুক্ত আইটেমের সংখ্যা।
value রূপান্তর দ্বারা উত্পন্ন রাজস্ব পরিমাণ.

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

নীচের উদাহরণটি সম্পাদনা করার জন্য একটি সাধারণ রূপান্তর সংস্থান বস্তু তৈরির চিত্র তুলে ধরে:

সি#

// Find the Floodlight configuration ID based on the provided activity ID.
FloodlightActivity floodlightActivity =
    service.FloodlightActivities.Get(profileId, floodlightActivityId).Execute();
long floodlightConfigurationId = (long) floodlightActivity.FloodlightConfigurationId;

// Construct the conversion object with values that identify the conversion to update.
Conversion conversion = new Conversion();
conversion.EncryptedUserId = conversionUserId;
conversion.FloodlightActivityId = floodlightActivityId;
conversion.FloodlightConfigurationId = floodlightConfigurationId;
conversion.Ordinal = conversionOrdinal;
conversion.TimestampMicros = conversionTimestamp;

// Set the fields to be updated. These fields are required; to preserve a value from the
// existing conversion, it must be copied over manually.
conversion.Quantity = newQuantity;
conversion.Value = newValue;

জাভা

// Create a conversion object populated with values that identify the conversion to update.
Conversion conversion = new Conversion();
conversion.setEncryptedUserId(encryptedUserId);
conversion.setFloodlightActivityId(floodlightActivityId);
conversion.setFloodlightConfigurationId(floodlightConfigurationId);
conversion.setOrdinal(ordinal);
conversion.setTimestampMicros(timestampMicros);

// Set the fields to be updated. These fields are required; to preserve a value from the
// existing conversion, it must be copied over manually.
conversion.setQuantity(newQuantity);
conversion.setValue(newValue);

পিএইচপি

// Find Floodlight configuration ID based on provided activity ID.
$activity = $this->service->floodlightActivities->get(
    $values['user_profile_id'],
    $values['floodlight_activity_id']
);
$floodlightConfigId = $activity->getFloodlightConfigurationId();

// Create a conversion object with values that identify the conversion to
// update.
$conversion = new Google_Service_Dfareporting_Conversion();
$conversion->setEncryptedUserId($values['encrypted_user_id']);
$conversion->setFloodlightActivityId($values['floodlight_activity_id']);
$conversion->setFloodlightConfigurationId($floodlightConfigId);
$conversion->setOrdinal($values['ordinal']);
$conversion->setTimestampMicros($values['timestamp']);

// Set the fields to be updated. These fields are required; to preserve a
// value from the existing conversion, it must be copied over manually.
$conversion->setQuantity($values['new_quantity']);
$conversion->setValue($values['new_value']);

পাইথন

# Construct the conversion object with values that identify the conversion
# to update.
conversion = {
    'encryptedUserId': encrypted_user_id,
    'floodlightActivityId': floodlight_activity_id,
    'floodlightConfigurationId': floodlight_config_id,
    'ordinal': ordinal,
    'timestampMicros': timestamp
}

# Set the fields to be updated. These fields are required; to preserve a
# value from the existing conversion, it must be copied over manually.
conversion['quantity'] = new_quantity
conversion['value'] = new_value

রুবি

# Look up the Floodlight configuration ID based on activity ID.
floodlight_activity = service.get_floodlight_activity(profile_id,
  existing_conversion[:floodlight_activity_id])
floodlight_config_id = floodlight_activity.floodlight_configuration_id

# Construct the conversion with values that identify the conversion to
# update.
conversion = DfareportingUtils::API_NAMESPACE::Conversion.new(
  encrypted_user_id: existing_conversion[:encrypted_user_id],
  floodlight_activity_id: existing_conversion[:floodlight_activity_id],
  floodlight_configuration_id: floodlight_config_id,
  ordinal: existing_conversion[:ordinal],
  timestamp_micros: existing_conversion[:timestamp]
)

# Set the fields to be updated. These fields are required; to preserve a
# value from the existing conversion, it must be copied over manually.
conversion.quantity = new_quantity
conversion.value = new_value

এনক্রিপশন তথ্য নির্দিষ্ট করুন

যদি এডিট করা কনভার্সনগুলি এনক্রিপ্ট করা ইউজার আইডির সাথে যুক্ত হয়, তাহলে আপনাকে এডিট রিকোয়েস্টের অংশ হিসেবে সেগুলি কীভাবে এনক্রিপ্ট করা হয়েছে সে সম্পর্কে বিস্তারিত জানাতে হবে। বিস্তারিত জানার জন্য আপলোডিং রূপান্তর নির্দেশিকা পড়ুন।

যখন প্রয়োজন হয়, একটি EncryptionInfo অবজেক্ট তৈরি করা যা এই মানগুলিকে নির্দিষ্ট করে সম্পাদনা কর্মপ্রবাহের দ্বিতীয় ধাপ:

সি#

// Create the encryption info.
EncryptionInfo encryptionInfo = new EncryptionInfo();
encryptionInfo.EncryptionEntityId = encryptionEntityId;
encryptionInfo.EncryptionEntityType = encryptionEntityType;
encryptionInfo.EncryptionSource = encryptionSource;

জাভা

// Create the encryption info.
EncryptionInfo encryptionInfo = new EncryptionInfo();
encryptionInfo.setEncryptionEntityId(encryptionEntityId);
encryptionInfo.setEncryptionEntityType(encryptionEntityType);
encryptionInfo.setEncryptionSource(encryptionSource);

পিএইচপি

$encryptionInfo = new Google_Service_Dfareporting_EncryptionInfo();
$encryptionInfo->setEncryptionEntityId($values['encryption_entity_id']);
$encryptionInfo->setEncryptionEntityType($values['encryption_entity_type']);
$encryptionInfo->setEncryptionSource($values['encryption_source']);

পাইথন

# Construct the encryption info.
encryption_info = {
    'encryptionEntityId': encryption_entity_id,
    'encryptionEntityType': encryption_entity_type,
    'encryptionSource': encryption_source
}

রুবি

# Construct the encryption info.
encryption_info = DfareportingUtils::API_NAMESPACE::EncryptionInfo.new(
  encryption_entity_id: encryption[:entity_id],
  encryption_entity_type: encryption[:entity_type],
  encryption_source: encryption[:source]
)

একটি আপডেট অনুরোধ তৈরি করুন

এই প্রক্রিয়ার চূড়ান্ত ধাপ হল batchupdate কল দিয়ে রূপান্তরগুলি সম্পাদনা করা। এই পদ্ধতিটি একটি ConversionsBatchUpdateRequest অবজেক্ট গ্রহণ করে, যা তাদের সম্পর্কিত এনক্রিপশন তথ্যের সাথে সম্পাদনা করার জন্য রূপান্তরগুলির সেটকে একত্রিত করে (যখন প্রয়োজন হয়):

সি#

// Insert the conversion.
ConversionsBatchUpdateRequest request = new ConversionsBatchUpdateRequest();
request.Conversions = new List<Conversion>() { conversion };
request.EncryptionInfo = encryptionInfo;

ConversionsBatchUpdateResponse response =
    service.Conversions.Batchupdate(request, profileId).Execute();

জাভা

ConversionsBatchUpdateRequest request = new ConversionsBatchUpdateRequest();
request.setConversions(ImmutableList.of(conversion));
request.setEncryptionInfo(encryptionInfo);

ConversionsBatchUpdateResponse response = reporting.conversions()
    .batchupdate(profileId, request).execute();

পিএইচপি

$batch = new Google_Service_Dfareporting_ConversionsBatchUpdateRequest();
$batch->setConversions([$conversion]);
$batch->setEncryptionInfo($encryptionInfo);

$result = $this->service->conversions->batchupdate(
    $values['user_profile_id'],
    $batch
);

পাইথন

# Update the conversion.
request_body = {
    'conversions': [conversion],
    'encryptionInfo': encryption_info
}
request = service.conversions().batchupdate(
    profileId=profile_id, body=request_body)
response = request.execute()

রুবি

# Construct the batch update request.
batch_update_request =
  DfareportingUtils::API_NAMESPACE::ConversionsBatchUpdateRequest.new(
    conversions: [conversion],
    encryption_info: encryption_info
  )

# Update the conversion.
result = service.batchupdate_conversion(profile_id, batch_update_request)

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

সি#

// Handle the batchinsert response.
if (!response.HasFailures.Value) {
  Console.WriteLine("Successfully updated conversion for encrypted user ID {0}.",
      conversionUserId);
} else {
  Console.WriteLine("Error(s) updating conversion for encrypted user ID {0}:",
      conversionUserId);

  ConversionStatus status = response.Status[0];
  foreach(ConversionError error in status.Errors) {
    Console.WriteLine("\t[{0}]: {1}", error.Code, error.Message);
  }
}

জাভা

if (!response.getHasFailures()) {
  System.out.printf("Successfully updated conversion for encrypted user ID %s.%n",
      encryptedUserId);
} else {
  System.out.printf("Error(s) updating conversion for encrypted user ID %s:%n",
      encryptedUserId);

  // Retrieve the conversion status and report any errors found. If multiple conversions
  // were included in the original request, the response would contain a status for each.
  ConversionStatus status = response.getStatus().get(0);
  for (ConversionError error : status.getErrors()) {
    System.out.printf("\t[%s]: %s.%n", error.getCode(), error.getMessage());
  }
}

পিএইচপি

if (!$result->getHasFailures()) {
    printf(
        'Successfully updated conversion for encrypted user ID %s.',
        $values['encrypted_user_id']
    );
} else {
    printf(
        'Error(s) updating conversion for encrypted user ID %s:<br><br>',
        $values['encrypted_user_id']
    );

    $status = $result->getStatus()[0];
    foreach ($status->getErrors() as $error) {
        printf('[%s] %s<br>', $error->getCode(), $error->getMessage());
    }
}

পাইথন

if not response['hasFailures']:
  print('Successfully updated conversion for encrypted user ID %s.' %
        encrypted_user_id)
else:
  print('Error(s) updating conversion for encrypted user ID %s.' %
        encrypted_user_id)

  status = response['status'][0]
  for error in status['errors']:
    print '\t[%s]: %s' % (error['code'], error['message'])

রুবি

if result.has_failures
  puts format('Error(s) updating conversion for encrypted user ID %s.',
    existing_conversion[:encrypted_user_id])

  status = result.status[0]
  status.errors.each do |error|
    puts format("\t[%s]: %s", error.code, error.message)
  end
else
  puts format('Successfully updated conversion for encrypted user ID %s.',
    existing_conversion[:encrypted_user_id])
end

উত্তরের status ফিল্ডে, যেমন উপরে দেখানো হয়েছে, মূল অনুরোধে অন্তর্ভুক্ত প্রতিটি রূপান্তরের জন্য একটি ConversionStatus অবজেক্ট থাকবে। আপনি যদি শুধুমাত্র সেই রূপান্তরগুলিতে আগ্রহী হন যা আপডেট করতে ব্যর্থ হয়, তাহলে hasFailures ক্ষেত্রটি প্রদত্ত ব্যাচে কোনো রূপান্তর ব্যর্থ হয়েছে কিনা তা দ্রুত নির্ধারণ করতে ব্যবহার করা যেতে পারে।