যখন কোনো বিজ্ঞাপন নিলাম জেতা হয়, তখন একটি ডিমান্ড জেন বিজ্ঞাপন ব্যবহারকারীকে দেখানো ক্রিয়েটিভটি তৈরি করে। AdGroupAd রিসোর্সগুলো ad_details ইউনিয়ন ফিল্ডের অধীনে প্রাসঙ্গিক ক্রিয়েটিভ অপশনগুলো কনফিগার করে।
বিজ্ঞাপনের বিবরণ কনফিগার করুন
চার ধরনের ডিমান্ড জেন অ্যাড রয়েছে। প্রতিটি AdGroupAd রিসোর্স শুধুমাত্র একটি একক ধরনের হতে পারে। প্রতিটি ধরন ad_details ইউনিয়ন ফিল্ডের অধীনে স্বতন্ত্র ফিল্ডে কনফিগার করা হয়।
প্রতিটি ফিল্ডের বিবরণে প্রাসঙ্গিক বিজ্ঞাপনের ধরনের প্রয়োজনীয়তার একটি লিঙ্ক দেওয়া আছে। একটি AdGroupAd রিসোর্স তৈরি করার সময় এই ফিল্ডগুলোর মধ্যে শুধুমাত্র একটির তথ্য পূরণ করা যাবে।
প্রকারভেদে ছবির মাত্রা এবং রেজোলিউশনের প্রয়োজনীয়তা
প্রতিটি বিজ্ঞাপনের ধরনের জন্য বিভিন্ন আকারের ছবির প্রয়োজন হয়।
নিম্নলিখিত সারণিতে ছবির প্রকারভেদ এবং প্রাসঙ্গিক ফাইলের সীমাবদ্ধতাগুলো তালিকাভুক্ত করা হলো:
| ছবির ধরন | |
|---|---|
| সহযোগী ব্যানার | ফাইলের সর্বোচ্চ আকার : ১৫০ কেবি মাত্রা : ৩০০x৬০ |
| ভূদৃশ্য চিত্র | ফাইলের সর্বোচ্চ আকার : ৫১২০ কেবি প্রস্তাবিত মাপ : ১২০০x৬২৮, সর্বনিম্ন : ৬০০x৩১৪ |
| লোগো ছবি | ফাইলের সর্বোচ্চ আকার : ৫১২০ কেবি প্রস্তাবিত মাপ : ১২০০x১২০০, সর্বনিম্ন : ১২৮x১২৮ |
| প্রতিকৃতি চিত্র | ফাইলের সর্বোচ্চ আকার : ৫১২০ কেবি প্রস্তাবিত মাপ : ৯৬০x১২০০, সর্বনিম্ন : ৪৮০x৬০০ |
| বর্গাকার ছবি | ফাইলের সর্বোচ্চ আকার : ৫১২০ কেবি প্রস্তাবিত মাপ : ১২০০x১২০০, সর্বনিম্ন : ৩০০x৩০০ |
একটি বিজ্ঞাপন তৈরি করুন
যেভাবে একটি ডিমান্ড জেন ভিডিও বিজ্ঞাপন তৈরি করবেন:
জাভা
// Provide the ID of the parent advertiser. long advertiserId = advertiser-id; // Provide the ID of the parent ad group. long adGroupId = ad-group-id; // Provide the display name of the ad. String displayName = display-name; // Provide the information for the ad creative. String finalAdUrl = final-ad-url; String callToAction = call-to-action; String headline = headline; String longHeadline = long-headline; String description = description; String businessName = business-name; long youtubeAssetId = youtube-video-asset-id; long logoAssetId = logo-asset-id; // Create the ad structure. AdGroupAd ad = new AdGroupAd() .setAdGroupId(adGroupId) .setDisplayName(displayName) .setEntityStatus("ENTITY_STATUS_PAUSED") .setDemandGenVideoAd( new DemandGenVideoAd() .setFinalUrl(finalAdUrl) .setCallToAction(callToAction) .setHeadlines(Arrays.asList(headline)) .setLongHeadlines(Arrays.asList(longHeadline)) .setDescriptions(Arrays.asList(description)) .setBusinessName(businessName) .setVideos( Arrays.asList( new YoutubeVideoDetails() .setVideoAssetId(youtubeAssetId))) .setLogo(new ImageAsset().setAssetId(logoAssetId))); // Configure the create request. AdGroupAds.Create request = service.advertisers().adGroupAds().create(advertiserId, ad); // Create the ad group. AdGroupAd response = request.execute(); // Display the new ad. System.out.printf("Demand Gen ad %s was created.", response.getName());
পাইথন
# Provide the ID of the parent advertiser. advertiser_id = advertiser-id # Provide the ID of the parent ad group. ad_group_id = ad-group-id # Provide the display name of the ad. display_name = display-name # Provide the information for the ad creative. final_ad_url = final-ad-url call_to_action = call-to-action headline = headline long_headline = long-headline description = description business_name = business-name youtube_asset_id = youtube-video-asset-id logo_asset_id = logo-asset-id # Create the ad object. ad_obj = { "adGroupId": ad_group_id, "displayName": display_name, "entityStatus": "ENTITY_STATUS_PAUSED", "demandGenVideoAd": { "finalUrl": final_ad_url, "callToAction": call_to_action, "headlines": [headline], "longHeadlines": [long_headline], "descriptions": [description], "businessName": business_name, "videos": [{"videoAssetId": youtube_asset_id}], "logo": {"assetId": logo_asset_id} } } # Build and execute request. response = ( service.advertisers() .adGroupAds() .create(advertiserId=advertiser_id, body=ad_obj) .execute() ) # Display the new ad. print(f"Demand Gen ad {response['name']} was created.")
পিএইচপি
// Provide the ID of the parent advertiser. $advertiserId = advertiser-id; // Provide the ID of the parent ad group. $adGroupId = ad-group-id; // Provide the display name of the ad. $displayName = display-name; // Provide the information for the ad creative. $finalAdUrl = final-ad-url; $callToAction = call-to-action; $headline = headline; $longHeadline = long-headline; $description = description; $businessName = business-name; $youtubeAssetId = youtube-video-asset-id; $logoAssetId = logo-asset-id; // Create the ad structure. $ad = new Google_Service_DisplayVideo_AdGroupAd(); $ad->setAdGroupId($adGroupId); $ad->setDisplayName($displayName); $ad->setEntityStatus('ENTITY_STATUS_PAUSED'); // Create the Demand Gen video ad creative. $demandGenVideoAd = new Google_Service_DisplayVideo_DemandGenVideoAd(); $demandGenVideoAd->setFinalUrl($finalAdUrl); $demandGenVideoAd->setCallToAction($callToAction); $demandGenVideoAd->setHeadlines(array($headline)); $demandGenVideoAd->setLongHeadlines(array($longHeadline)); $demandGenVideoAd->setDescriptions(array($description)); $demandGenVideoAd->setBusinessName($businessName); // Assign the video asset to the ad creative. $youtubeVideoAsset = new Google_Service_DisplayVideo_YoutubeVideoDetails(); $youtubeVideoAsset->setVideoAssetId($youtubeAssetId); $demandGenVideoAd->setVideos(array($youtubeVideoAsset)); // Assign the logo asset to the ad creative. $imageAsset = new Google_Service_DisplayVideo_ImageAsset(); $imageAsset->setAssetId($logoAssetId); $demandGenVideoAd->setLogo($imageAsset); // Assign the Demand Gen video ad to the ad. $ad->setDemandGenVideoAd($demandGenVideoAd); // Call the API, creating the ad under the advertiser and ad group given. try { $result = $this->service->advertisers_adGroupAds->create( $advertiserId, $ad ); } catch (\Exception $e) { $this->renderError($e); return; } // Display the new ad. printf('<p>Ad %s was created.</p>', $result['name']);