একটি কাস্টম বিডিং অ্যালগরিদম ব্যবহারকারীর সংজ্ঞায়িত বিডিং লজিক থেকে তৈরি করা হয়। তাদের বিড স্ট্র্যাটেজির মাধ্যমে এটিকে একটি লাইন আইটেমে নির্ধারণ করুন। অ্যাড ইনভেন্টরিতে বিড করার সময়, লাইন আইটেমটি তখন সেই কাস্টম লজিকটি ব্যবহার করবে।
প্রথমে, একটি অ্যালগরিদম প্রকার নির্বাচন করুন এবং অ্যালগরিদম রিসোর্সটি তৈরি করুন।
একটি কাস্টম বিডিং অ্যালগরিদম প্রকার নির্বাচন করুন
অ্যালগরিদমের ধরণ নির্ধারণ করে দেয় যে অ্যালগরিদমের মধ্যে বিডিং লজিক কীভাবে সংজ্ঞায়িত করা হবে।
Display & Video 360 API-এর মাধ্যমে তৈরি করা যায় এমন নিম্নলিখিত প্রকারগুলির মধ্যে একটি বেছে নিন:
-
SCRIPT_BASED: আপলোড করা স্ক্রিপ্ট দ্বারা নির্ধারিত লজিক। স্ক্রিপ্টটি একটি টেক্সট ফাইল যা বেসিক পাইথন সিনট্যাক্স ব্যবহার করে। -
RULE_BASED: আপলোড করা নিয়মাবলী দ্বারা নির্ধারিত যুক্তি। নিয়মাবলীটি হলো একটি আপলোড করাAlgorithmRulesJSON ফাইল।
CustomBiddingAlgorithm রিসোর্স তৈরি করুন
একটি কাস্টম বিডিং অ্যালগরিদম তৈরি করতে একটি create রিকোয়েস্ট ব্যবহার করুন।
একটি অ্যালগরিদমের owner একজন বিজ্ঞাপনদাতা বা অংশীদার উভয়ই হতে পারে। যদি এটি কোনো বিজ্ঞাপনদাতার মালিকানাধীন হয়, তবে এটি শুধুমাত্র সেই বিজ্ঞাপনদাতার অধীনে থাকা বিজ্ঞাপন প্রচারাভিযানেই ব্যবহার করা যাবে। যদি এটি কোনো অংশীদারের মালিকানাধীন হয়, তবে এটি শুধুমাত্র সেইসব বিজ্ঞাপনদাতারাই ব্যবহার করতে পারবে যাদের সাথে এটি ইচ্ছাকৃতভাবে শেয়ার করা হয়েছে ।
কাস্টম বিডিং অ্যালগরিদম তৈরি করার পদ্ধতি নিচে দেওয়া হলো:
জাভা
// Provide the ID of the advertiser that will own the algorithm. long advertiserId = advertiser-id; // Provide the display name of the algorithm. String displayName = display-name; // Provide the type of custom bidding algorithm. String customBiddingAlgorithmType = custom-bidding-algorithm-type; // Create the custom bidding algorithm structure. CustomBiddingAlgorithm algorithm = new CustomBiddingAlgorithm() .setAdvertiserId(advertiserId) .setDisplayName(displayName) .setEntityStatus("ENTITY_STATUS_ACTIVE") .setCustomBiddingAlgorithmType(customBiddingAlgorithmType); // Create the algorithm. CustomBiddingAlgorithm response = service.customBiddingAlgorithms().create(algorithm).execute(); // Display the new custom bidding algorithm ID. System.out.printf( "Custom Bidding Algorithm was created with the ID %s.", response.getCustomBiddingAlgorithmId());
পাইথন
# Provide the ID of the advertiser that will own the algorithm. advertiser_id = advertiser-id # Provide the display name of the algorithm. display_name = display-name # Provide the type of custom bidding algorithm. custom_bidding_algo_type = custom-bidding-algorithm-type # Build CustomBiddingAlgorithm object. custom_bidding_algorithm_obj = { "advertiserId": advertiser_id, "displayName": display_name, "entityStatus": "ENTITY_STATUS_ACTIVE", "customBiddingAlgorithmType": custom_bidding_algo_type, } # Build and execute request. algorithm_response = ( service.customBiddingAlgorithms() .create(body=custom_bidding_algorithm_obj) .execute() ) # Print ID of new custom bidding algorithm. print( "Custom bidding algorithm was created with ID " f'{algorithm_response["customBiddingAlgorithmId"]}.' )
পিএইচপি
// Provide the ID of the advertiser that will own the algorithm. $advertiserId = advertiser-id; // Provide the display name of the algorithm. $displayName = display-name; // Provide the type of custom bidding algorithm. $customBiddingAlgorithmType = custom-bidding-algorithm-type; // Create the custom bidding algorithm structure. $algorithm = new Google_Service_DisplayVideo_CustomBiddingAlgorithm(); $algorithm->setAdvertiserId($advertiserId); $algorithm->setDisplayName($displayName); $algorithm->setEntityStatus('ENTITY_STATUS_ACTIVE'); $algorithm->setCustomBiddingAlgorithmType($customBiddingAlgorithmType); // Call the API, creating the advertiser. try { $result = $this->service->customBiddingAlgorithms->create($algorithm); } catch (\Exception $e) { $this->renderError($e); return; } // Print ID of new custom bidding algorithm. printf('<p>Custom Bidding Algorithm was created with the ID %s.</p>', $result['customBiddingAlgorithmId']);