এই নির্দেশিকাটিতে ক্যাম্পেইন ম্যানেজার ৩৬০ এপিআই Conversions পরিষেবা ব্যবহার করে কনভার্সন সম্পাদনা করার জন্য বিস্তারিত নির্দেশাবলী রয়েছে। চালিয়ে যাওয়ার আগে, অফলাইন কনভার্সনগুলির ভূমিকার জন্য এবং এই নির্দেশিকাতে আলোচিত ধারণাগুলির সাথে নিজেকে পরিচিত করার জন্য আপনাকে ওভারভিউ পর্যালোচনা করার পরামর্শ দেওয়া হচ্ছে।
শুরু করার আগে
এই সম্পাদনা কর্মপ্রবাহ আপনাকে বিদ্যমান অনলাইন এবং অফলাইন রূপান্তরগুলির quantity এবং value পরিবর্তন করতে দেয়। এটি করার জন্য, আপনাকে এমন মান প্রদান করতে হবে যা সম্পাদনা করা রূপান্তরগুলিকে স্বতন্ত্রভাবে সনাক্ত করে। আপনি যে ধরণের রূপান্তর সম্পাদনা করছেন তার উপর নির্ভর করে, আপনি এই মানগুলি বিভিন্ন উপায়ে পাবেন:
অনলাইন রূপান্তর সনাক্ত করার জন্য প্রয়োজনীয় মানগুলি ডেটা ট্রান্সফার থেকে পাওয়া যেতে পারে।
অফলাইন রূপান্তর সনাক্ত করার জন্য প্রয়োজনীয় মানগুলি সফল
batchinsertঅনুরোধেরConversionsBatchInsertResponseএ ফেরত পাঠানো হয়।
একবার আপনি যেকোনো ধরণের রূপান্তর সফলভাবে সম্পাদনা করার পরে, ConversionsBatchUpdateResponse এ পরবর্তী সম্পাদনাগুলি সম্পাদনার জন্য প্রয়োজনীয় মানগুলি থাকবে।
রূপান্তর রিসোর্স কনফিগার করুন
সম্পাদনা কর্মপ্রবাহের প্রথম ধাপে এক বা একাধিক Conversion সংস্থান বস্তু তৈরি করা জড়িত।
নিম্নলিখিত ক্ষেত্রগুলি সম্পাদনার জন্য একটি রূপান্তর সনাক্ত করতে ব্যবহৃত হয়। এই ক্ষেত্রগুলি প্রয়োজনীয় এবং বিদ্যমান রূপান্তরের সাথে হুবহু মিলতে হবে।
| মাঠ | বিবরণ |
|---|---|
| এনক্রিপ্ট করা ব্যবহারকারী আইডি, গুগল ক্লিক আইডি, ডিসপ্লে ক্লিক আইডি, ম্যাচ আইডি, অথবা মোবাইল ডিভাইস আইডি যা রূপান্তরটি তৈরি করেছে। |
floodlightActivityId | ফ্লাডলাইট অ্যাক্টিভিটির সাথে রূপান্তরটি যুক্ত করা হয়েছে। |
floodlightConfigurationId | নির্দিষ্ট কার্যকলাপে ব্যবহৃত ফ্লাডলাইট কনফিগারেশন। |
ordinal | রূপান্তরের সাথে সম্পর্কিত ডিডুপ্লিকেশন শনাক্তকারী । |
timestampMicros | ইউনিক্স যুগের পর থেকে মাইক্রোসেকেন্ডে রূপান্তরের টাইমস্ট্যাম্প। |
যে ক্ষেত্রগুলি সম্পাদনা করা যেতে পারে সেগুলি নীচে তালিকাভুক্ত করা হয়েছে।
এই ক্ষেত্রগুলি আবশ্যক এবং আপনার প্রদত্ত মানগুলি সম্পাদনা করা রূপান্তরের উপর পূর্ব-বিদ্যমান যেকোনো মানকে ওভাররাইট করবে।
| মাঠ | বিবরণ |
|---|---|
quantity | রূপান্তরের সাথে সম্পর্কিত আইটেমের সংখ্যা। |
value | রূপান্তরের ফলে উৎপন্ন রাজস্বের পরিমাণ। |
এই ক্ষেত্রগুলি ঐচ্ছিক। সেট না করা হলে মান অপরিবর্তিত থাকবে।
| মাঠ | বিবরণ |
|---|---|
customVariables | রূপান্তরের কাস্টম ফ্লাডলাইট ভেরিয়েবল। ভেরিয়েবল সেট করা থাকলে মান আপডেট বা সন্নিবেশ করা হবে। সেট না থাকলে ভেরিয়েবলের মান অপরিবর্তিত থাকবে। |
রেফারেন্স ডকুমেন্টেশনে উল্লেখিত অন্যান্য সমস্ত ক্ষেত্র অসমর্থিত এবং সংশোধন করা যাবে না। আপনার সম্পাদনা অনুরোধে অসমর্থিত ক্ষেত্রগুলি অন্তর্ভুক্ত করলে একটি ত্রুটি দেখা দেবে। যদি সম্পাদনা করা রূপান্তরটিতে কোনও অসমর্থিত ক্ষেত্রগুলির জন্য পূর্ব-বিদ্যমান মান থাকে, তাহলে সেই মানগুলি স্বয়ংক্রিয়ভাবে সংরক্ষিত হবে।
নিচের উদাহরণটি সম্পাদনার জন্য একটি সহজ রূপান্তর রিসোর্স অবজেক্ট তৈরির চিত্র তুলে ধরে:
সি#
// 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)
মনে রাখবেন যে Campaign Manager 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 ক্ষেত্রটি প্রদত্ত ব্যাচের কোনও রূপান্তর ব্যর্থ হয়েছে কিনা তা দ্রুত নির্ধারণ করতে ব্যবহার করা যেতে পারে।