অবস্থান সম্পদ

অন্যান্য সম্পদের বিপরীতে, আপনি একটি সম্পদ সেট তৈরি করার পরে Google Ads API দ্বারা অবস্থান সম্পদগুলি স্বয়ংক্রিয়ভাবে তৈরি হয়। প্রথমে, একটি অবস্থান সিঙ্ক সম্পদ সেট তৈরি করুন এবং এটি গ্রাহকের সাথে সংযুক্ত করুন। তারপর, যদি আপনি একটি প্রচারাভিযান বা বিজ্ঞাপন গোষ্ঠীর জন্য সম্পদ সেটে অবস্থান সম্পদের একটি উপসেট নির্বাচন করতে চান, একটি অবস্থান গোষ্ঠী সম্পদ সেট তৈরি করুন এবং প্রচার বা বিজ্ঞাপন গোষ্ঠীতে এটি সংযুক্ত করুন৷

একটি অবস্থান সিঙ্ক সম্পদ সেট তৈরি করুন এবং এটি গ্রাহকের সাথে সংযুক্ত করুন

  1. একটি অবস্থান সিঙ্ক সম্পদ সেট তৈরি করুন
  2. CustomerAssetSetService ব্যবহার করে একজন গ্রাহকের সাথে এটি সংযুক্ত করুন

একটি অবস্থান সিঙ্ক সম্পদ সেট তৈরি করুন

  1. একটি নতুন AssetSet তৈরি করুন।
    1. LOCATION_SYNC type সেট করুন।
    2. একটি নতুন LocationSetlocation_set সেট করুন।
  2. নতুন LocationSet ,
    1. আপনার ব্যবহারের ক্ষেত্রে উপর ভিত্তি করে location_ownership_type সেট করুন:
      • আপনি যদি ব্যবসার অবস্থানের মালিক হন তবে এটিকে BUSINESS_OWNER এ সেট করুন৷
      • আপনি যদি ব্যবসার অবস্থানের মালিক না হন তবে এটিকে AFFILIATE সেট করুন, কিন্তু সেখানে আপনার পণ্য বিক্রি করুন।
    2. আপনার ব্যবহারের ক্ষেত্রে উপর ভিত্তি করে ক্ষেত্রের source সেট করুন:
      • আপনি যদি আপনার Google ব্যবসায়িক প্রোফাইল অ্যাকাউন্টে আপনার অবস্থানের সাথে সিঙ্ক করতে চান তাহলে business_profile_location_set সেট করুন।
      • আপনি যদি নির্দিষ্ট চেইন আইডিতে অবস্থানের সাথে সিঙ্ক করতে চান তাহলে chain_location_set সেট করুন।
      • আপনি যদি প্লেস আইডি ব্যবহার করে ম্যানুয়ালি অবস্থান যোগ করতে চান তাহলে maps_location_set সেট করুন।

আপনি এই ধাপগুলি সম্পূর্ণ করার পরে, Google Ads API লোকেশন অ্যাসেট তৈরি করে এবং আপনার জন্য তৈরি করা লোকেশন সিঙ্ক অ্যাসেট সেটে সেগুলি যোগ করে, যেমন আপনি AssetSetAssetService ব্যবহার করে ম্যানুয়ালি করেন। আপনি ম্যানুয়ালি একটি স্ট্যাটিক অবস্থান গ্রুপ সম্পদ সেটে যোগ করতে না চাইলে সেগুলিকে কাজে লাগাতে হবে না৷

শুধুমাত্র একটি সক্রিয় অবস্থান সিঙ্ক সম্পদ সেট ( ENABLED status ) সহ একটি গ্রাহকের জন্য বিদ্যমান থাকতে পারে৷ আপনি যদি একটি ভিন্ন ধরনের লোকেশন সিঙ্ক অ্যাসেট সেট তৈরি করতে চান, তাহলে আগে বিদ্যমানটিকে সরিয়ে দিন।

একটি গ্রাহকের কাছে অবস্থান সিঙ্ক সম্পদ সেট সংযুক্ত করুন

আপনার গ্রাহকের সাথে পূর্ববর্তী বিভাগে অবস্থান সিঙ্ক সম্পদ সেট সংযুক্ত করতে CustomerAssetSetService.MutateCustomerAssetSets ব্যবহার করুন।

(ঐচ্ছিক) একটি অবস্থান গ্রুপ সম্পদ সেট তৈরি করুন এবং এটি একটি প্রচারাভিযান বা একটি বিজ্ঞাপন গোষ্ঠীতে সংযুক্ত করুন৷

একটি অবস্থান গ্রুপ সম্পদ সেট প্রয়োজন শুধুমাত্র যদি আপনি অবস্থান সম্পদ একটি উপসেট নির্বাচন করতে হবে. এটি প্রচারাভিযান এবং বিজ্ঞাপন গোষ্ঠীর কারণে গ্রাহক স্তর থেকে অবস্থান সম্পদ উত্তরাধিকারসূত্রে পাওয়া যায়৷

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

  1. একটি অবস্থান গ্রুপ সম্পদ সেট তৈরি করুন । অবস্থান গ্রুপ সম্পদ সেট গতিশীল বা স্ট্যাটিক হতে পারে.
  2. আপনার প্রয়োজনের উপর নির্ভর করে একটি বিজ্ঞাপন গোষ্ঠী ব্যবহার করে বা একটি প্রচারাভিযানের সাথে সম্পদ সেট সংযুক্ত করুন
  3. (ঐচ্ছিক) নতুন তৈরি স্ট্যাটিক অবস্থান গ্রুপ সম্পদ সেটে পূর্বে জেনারেট করা সম্পদ যোগ করুন

একটি প্রদত্ত গ্রাহকের জন্য, আপনি একাধিক গতিশীল বা স্ট্যাটিক অবস্থান গ্রুপ সম্পদ সেট তৈরি করতে পারেন।

একটি অবস্থান গ্রুপ সম্পদ সেট তৈরি করুন

একটি নতুন AssetSet তৈরি করুন এবং পূর্বে তৈরি লোকেশন সিঙ্ক সম্পদ সেটের আইডিতে location_group_parent_asset_set_id সেট করুন।

তারপর, আপনি একটি গতিশীল বা স্ট্যাটিক অবস্থান গ্রুপ সম্পদ সেট তৈরি করতে চান কিনা তার উপর ভিত্তি করে কিছু ক্ষেত্র সেট করুন।

গতিশীল সম্পদ সেট

আপনি LocationSet এ যে ক্ষেত্রটি সেট করেছেন তার উপর নির্ভর করে, নিম্নলিখিত নিয়মের উপর ভিত্তি করে ক্ষেত্রগুলি সেট করুন:

আপনি নিচের ফিল্ড সেট করলে তারপর টাইপ সেট করুন এবং এই ক্ষেত্রটিকে asset_set_source one of field হিসাবে সেট করুন
business_profile_location_set BUSINESS_PROFILE_DYNAMIC_LOCATION_GROUP business_profile_location_group
chain_location_set CHAIN_DYNAMIC_LOCATION_GROUP chain_location_group

অবস্থান সিঙ্ক সম্পদ সেট তৈরি করার সময় আপনি যদি maps_location_set সেট করেন, তাহলে আপনি একটি গতিশীল অবস্থান গ্রুপ সম্পদ সেট তৈরি করতে পারবেন না। এর কারণ হল আপনি প্লেস আইডি দ্বারা ম্যানুয়ালি অবস্থান যোগ করেছেন এবং এই ধরনের অবস্থানের জন্য আপনি ব্যবহার করতে পারেন এমন কোনো ফিল্টারিং বৈশিষ্ট্য নেই৷

স্ট্যাটিক সম্পদ সেট

type STATIC_LOCATION_GROUP এ সেট করুন। আপনি অবস্থান সিঙ্ক সম্পদ সেটের যেকোন প্রকারের জন্য স্ট্যাটিক লোকেশন গ্রুপ অ্যাসেট সেট তৈরি করতে পারেন, আপনি LocationSet এ যে ক্ষেত্রগুলি ( business_profile_location_set , chain_location_set , বা maps_location_set ) সেট করুন না কেন।

স্ট্যাটিক লোকেশন গ্রুপ অ্যাসেট সেটের জন্য, আপনাকে ম্যানুয়ালি লোকেশন গ্রুপ অ্যাসেট সেটে জেনারেট করা লোকেশন অ্যাসেট যোগ করতে হবে।

একটি প্রচারাভিযান বা একটি বিজ্ঞাপন গ্রুপে সম্পদ সেট সংযুক্ত করুন

আপনার প্রচারাভিযানের সাথে লোকেশন গ্রুপ অ্যাসেট সেট সংযুক্ত করতে CampaignAssetSetService.MutateCampaignAssetSets ব্যবহার করুন।

বিকল্পভাবে, AdGroupAssetSetService.MutateAdGroupAssetSets ব্যবহার করুন যদি আপনি লোকেশন গ্রুপ অ্যাসেট সেটটিকে বিজ্ঞাপন গোষ্ঠীতে সংযুক্ত করতে চান।

(ঐচ্ছিক) স্ট্যাটিক অবস্থান গ্রুপ সম্পদ সেটে অবস্থান সম্পদ যোগ করুন

আপনি পূর্বে সেট করা একটি স্ট্যাটিক লোকেশন গ্রুপ অ্যাসেট তৈরি করলেই এই ধাপটি প্রয়োজন।

  1. পূর্বে তৈরি করা অবস্থান সিঙ্ক সম্পদ সেটের জন্য স্বয়ংক্রিয়ভাবে তৈরি হওয়া সম্পদের সম্পদের নাম আনতে asset_set_asset রিপোর্টটি ব্যবহার করুন। শুধুমাত্র আপনার পছন্দসই সম্পদ পুনরুদ্ধার করতে ফিল্টারিং ব্যবহার করুন।
  2. AssetSetAssetService.MutateAssetSetAssets ব্যবহার করে স্ট্যাটিক অবস্থান গ্রুপ সম্পদ সেটে তাদের যোগ করুন।

ব্যবসার প্রোফাইল লোকেশন আইডি ম্যানেজ করুন

আপনি যখন একটি business_profile_location_set ব্যবহার করেন এবং listing_id_filters এ ফিল্টার করেন যা ব্যবসায়িক প্রোফাইল ওয়েবসাইট বা API থেকে পুনরুদ্ধার করা হয়, তখন এই সংখ্যাসূচক মানগুলিকে uint64 থেকে int64 টাইপ করার প্রয়োজন হতে পারে। যদি আপনার কোড একটি রানটাইম ত্রুটি তৈরি করে যে তালিকা_id_filters[] পুনরাবৃত্ত ফিল্ডে যোগ করার সময় আপনার ব্যবসার প্রোফাইল লোকেশন আইডি সীমার বাইরে, তাহলে আপনাকে সম্ভবত নিম্নলিখিত উদাহরণগুলির মধ্যে যেকোনো একটি ব্যবহার করে এটিকে রূপান্তর করতে হবে:

জাভা

/**
* Converts the business profile location ID to the format expected by the
* DynamicBusinessProfileLocationGroupFilter.listing_id_filters[] repeated field.
* The business profile location ID is an unsigned 64-bit integer, while the
* listing_id_filters[] field expects signed 64-bit integers. This means that
* for business profile location IDs that are out of range, we must perform the
* two's complement to convert it into a signed int.
 *
 * @param businessProfileLocationId The ID of a Business Profile location ID.
 * @return a Business Profile location ID as a signed 64-bit integer (long).
 */
public static long convertBusinessProfileLocationId(String businessProfileLocationId) {
    return Long.parseUnsignedLong(businessProfileLocationId);
}

সি#

/// <summary>
/// Converts the business profile location ID to the format expected by the
/// DynamicBusinessProfileLocationGroupFilter.listing_id_filters[] repeated field.
/// The business profile location ID is an unsigned 64-bit integer, while the
/// listing_id_filters[] field expects signed 64-bit integers. This means that
/// for business profile location IDs that are out of range, we must perform the
/// two's complement to convert it into a signed int.
/// </summary>
/// <param name="businessProfileLocationId">The ID of a Business Profile location.</param>
/// <returns>The converted business location ID in signed 64 bit.</returns>
public long ConvertBusinessProfileLocationId(ulong businessProfileLocationId)
{
  return unchecked((long)businessProfileLocationId);
}

পিএইচপি

/**
* Converts a business profile location ID to a signed 64 bit integer.
*
* Converts the business profile location ID to the format expected by the
* DynamicBusinessProfileLocationGroupFilter.listing_id_filters[] repeated field.
* The business profile location ID is an unsigned 64-bit integer, while the
* listing_id_filters[] field expects signed 64-bit integers. This means that
* for business profile location IDs that are out of range, we must perform the
* two's complement to convert it into a signed int.
*
* @param string $businessProfileLocationId the ID of a Business Profile location
* @return int the converted business location ID in signed 64 bit
*/
public static function convertBusinessProfileLocationId(string $businessProfileLocationId): int
{
    $unsignedMax = '18446744073709551615'; // 2^64 - 1
    $signedMax = '9223372036854775807'; // 2^63 - 1

    // Check if the business profile location ID is within 64 bit range.
    // If not, throw an error.
    if (bccomp($businessProfileLocationId, '0') < 0 || bccomp($businessProfileLocationId, $unsignedMax) > 0) {
        throw new InvalidArgumentException(
            'The given business profile location id is outside of the range for a 64 bit integer.'
        );
    }

    // Check if the business profile location ID is in signed 64 bit range.
    // If it's not, convert it to its two's complement.
    if (bccomp($businessProfileLocationId, $signedMax) > 0) {
        // Two's complement: ID - 2^64
        return (int) bcsub($businessProfileLocationId, '18446744073709551616');
    }

    return (int) $businessProfileLocationId;
}

পাইথন

import ctypes

def convert_business_profile_location_id(business_profile_location_id):
    """Converts a business profile location ID to a signed 64 bit integer.

    Converts the business profile location ID to the format expected by the
    DynamicBusinessProfileLocationGroupFilter.listing_id_filters[] repeated field.
    The business profile location ID is an unsigned 64-bit integer, while the
    listing_id_filters[] field expects signed 64-bit integers. This means that
    for business profile location IDs that are out of range, we must perform the
    two's complement to convert it into a signed int.

    Args:
        business_profile_location_id: the ID of a Business Profile location ID.

    Returns:
        a Business Profile location ID as a signed 64 bit integer.
    """
    # Check if the business profile location ID is within 64 bit range.
    # If not, throw an error.
    if business_profile_location_id >= 2 ** 64:
        raise ValueError(
            "The given business profile location id is outside of the range for a 64 bit integer."
        )
    # Check if the business profile location ID is in signed 64 bit range.
    # If it's not, convert it to its two's complement.
    elif business_profile_location_id >= 2 ** 63:
        return ctypes.c_int64(business_profile_location_id).value
    else:
        return business_profile_location_id

রুবি

# Converts the business profile location ID to the format expected by the
# DynamicBusinessProfileLocationGroupFilter.listing_id_filters[] repeated field.
# The business profile location ID is an unsigned 64-bit integer, while the
# listing_id_filters[] field expects signed 64-bit integers. This means that
# for business profile location IDs that are out of range, we must perform the
# two's complement to convert it into a signed int.
# Since Ruby supports arbitrary precision numbers, we have to calculate it
# manually.
LONG_MAX = 2 ** 63
ULONG_MAX = LONG_MAX * 2
def convert_business_profile_location_id(business_profile_location_id)
  # Check if the business profile location ID is within 64 bit range.
  # If not, throw an error.
  if business_profile_location_id >= 2 ** 64
    raise "The given business profile location id is outside of the range for a 64 bit integer."
  # Check if the business profile location ID is in signed 64 bit range.
  # If it's not, convert it to its two's complement.
  elseif business_profile_location_id >= 2**63
    -1 * (ULONG_MAX - business_profile_location_id)
  else
    business_profile_location_id
  end
end

পার্ল

use bigint;

# Converts the business profile location ID to the format expected by the
# DynamicBusinessProfileLocationGroupFilter.listing_id_filters[] repeated field.
# The business profile location ID is an unsigned 64-bit integer, while the
# listing_id_filters[] field expects signed 64-bit integers. This means that
# for business profile location IDs that are out of range, we must perform the
# two's complement to convert it into a signed int.
sub convert_business_profile_location_id {
  my ($business_profile_location_id) = @_;

  # Check if the business profile location ID is within 64 bit range.
  # If not, throw an error.
  if ($business_profile_location_id >= 2**64) {
    die "The given business profile location id is outside of the range for a 64 bit integer";
  # Check if the business profile location ID is in signed 64 bit range.
  # If it's not, convert it to its two's complement.
  } elseif ($business_profile_location_id >= 2**63) {
    return -1 * (2**64 - $business_profile_location_id);
  } else {
    return $business_profile_location_id;
  }
}