Google EU ব্যবহারকারীর সম্মতি নীতির অধীনে, আপনাকে অবশ্যই ইউকে সহ ইউরোপীয় অর্থনৈতিক অঞ্চলে (EEA) আপনার ব্যবহারকারীদের কাছে নির্দিষ্ট কিছু প্রকাশ করতে হবে এবং কুকিজ বা অন্যান্য স্থানীয় স্টোরেজ ব্যবহার করার জন্য তাদের সম্মতি নিতে হবে, যেখানে আইনত প্রয়োজন, এবং ব্যক্তিগত ডেটা ব্যবহার করতে ( যেমন AdID) বিজ্ঞাপন পরিবেশন করতে। এই নীতি EU ই-প্রাইভেসি নির্দেশিকা এবং সাধারণ ডেটা সুরক্ষা নিয়ন্ত্রণের (GDPR)-এর প্রয়োজনীয়তাগুলিকে প্রতিফলিত করে৷
এই নীতির অধীনে প্রকাশকদের দায়িত্ব পালনে সহায়তা করার জন্য, Google ব্যবহারকারী মেসেজিং প্ল্যাটফর্ম (UMP) SDK অফার করে। UMP SDK সর্বশেষ IAB মানগুলিকে সমর্থন করার জন্য আপডেট করা হয়েছে৷ এই সমস্ত কনফিগারেশনগুলি এখন AdMob গোপনীয়তা এবং বার্তাপ্রেরণে সুবিধাজনকভাবে পরিচালনা করা যেতে পারে।
পূর্বশর্ত
- শুরু করুন গাইডটি সম্পূর্ণ করুন।
- আপনারAdMob অ্যাকাউন্টের গোপনীয়তা এবং মেসেজিং ট্যাবের অধীনে আপনার বার্তাগুলি কনফিগার করুন৷ আরও বিশদ বিবরণের জন্য, দেখুনগোপনীয়তা এবং বার্তাপ্রেরণ সম্পর্কে ,
- আপনি যদি জিডিপিআর-সম্পর্কিত প্রয়োজনীয়তা নিয়ে কাজ করেন, তাহলে পড়ুনকীভাবে IAB প্রয়োজনীয়তা EU সম্মতি বার্তাগুলিকে প্রভাবিত করে ।
ব্যবহারকারীর বার্তার ধরন
সমর্থিত বার্তাগুলির সম্পূর্ণ তালিকার জন্যব্যবহারকারীর বার্তার ধরনদেখুন৷ প্রতিটি বার্তার ধরন বাস্তবায়নের জন্য নির্দিষ্ট নির্দেশাবলীর জন্য, বাম নেভিগেশন বার দেখুন।
SDK আমদানি করুন
কোকোপডস (পছন্দের)
UMP SDK Google Mobile Ads SDK 7.64.0 থেকে শুরু করে Google Mobile Ads SDK Pod-এর নির্ভরতা হিসাবে অন্তর্ভুক্ত করা হয়েছে৷
একটি iOS প্রকল্পে SDK আমদানি করার সবচেয়ে সহজ উপায় হল CocoaPods ব্যবহার করা। আপনার প্রকল্পের Podfile খুলুন এবং আপনার অ্যাপের লক্ষ্যে এই লাইন যোগ করুন:
pod 'Google-Mobile-Ads-SDK'
তারপর, নিম্নলিখিত কমান্ড চালান:
pod install --repo-update
আপনি যদি CocoaPods-এ নতুন হয়ে থাকেন, কিভাবে Podfiles তৈরি এবং ব্যবহার করতে হয় তার বিস্তারিত জানার জন্য CocoaPods ব্যবহার করা দেখুন।
ম্যানুয়াল ডাউনলোড
SDK আমদানি করার অন্য উপায় হল এটি ম্যানুয়ালি করা।
তারপরে, আপনার Xcode প্রকল্পে ফ্রেমওয়ার্কটি টেনে আনুন, প্রয়োজনে আপনি আইটেমগুলি অনুলিপি করুন নির্বাচন করুন তা নিশ্চিত করে৷
তারপরে আপনি ব্যবহার করে আপনার প্রয়োজনীয় যেকোন ফাইলে ফ্রেমওয়ার্ক অন্তর্ভুক্ত করতে পারেন:
সুইফট
import UserMessagingPlatform
উদ্দেশ্য গ
#include <UserMessagingPlatform/UserMessagingPlatform.h>
আপনার Info.plist আপডেট করুন
আপনার অ্যাপ আইডি খুঁজুনএবং আপনারInfo.plist
এ যোগ করুন:<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
একটি বার্তা প্রদর্শন করা প্রয়োজন কিনা তা নির্ধারণ করুন
একটি ফর্ম লোড করার আগে requestConsentInfoUpdateWithParameters:completionHandler:
ব্যবহার করে প্রতিটি অ্যাপ লঞ্চের সময় ব্যবহারকারীর সম্মতির তথ্য আপডেট করার জন্য আপনাকে অনুরোধ করা উচিত। এটি নির্ধারণ করতে পারে যে আপনার ব্যবহারকারীর সম্মতি প্রদান করতে হবে কিনা যদি তারা ইতিমধ্যে এটি না করে থাকে বা তাদের সম্মতির মেয়াদ শেষ হয়ে গেছে।
অ্যাপ স্টার্টে কীভাবে স্থিতি পরীক্ষা করবেন তার একটি উদাহরণ এখানে দেওয়া হল:
সুইফট
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Create a UMPRequestParameters object. let parameters = UMPRequestParameters() // Set tag for under age of consent. Here false means users are not under age. parameters.tagForUnderAgeOfConsent = false // Request an update to the consent information. UMPConsentInformation.sharedInstance.requestConsentInfoUpdate( with: parameters, completionHandler: { error in if error != nil { // Handle the error. } else { // The consent information state was updated. // You are now ready to check if a form is // available. } }) }
উদ্দেশ্য গ
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Create a UMPRequestParameters object. UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init]; // Set tag for under age of consent. Here NO means users are not under age. parameters.tagForUnderAgeOfConsent = NO; // Request an update to the consent information. [UMPConsentInformation.sharedInstance requestConsentInfoUpdateWithParameters:parameters completionHandler:^(NSError *_Nullable error) { if (error) { // Handle the error. } else { // The consent information state was updated. // You are now ready to check if a form is // available. } }]; }
পাওয়া গেলে একটি ফর্ম লোড করুন
একটি ফর্ম প্রদর্শন করার আগে, আপনাকে প্রথমে একটি উপলব্ধ কিনা তা নির্ধারণ করতে হবে। অনুপলব্ধ ফর্মগুলি ব্যবহারকারীর সীমিত বিজ্ঞাপন ট্র্যাকিং সক্ষম করার কারণে বা আপনি সম্মতির বয়সের কম হিসাবে ট্যাগ করে থাকলে হতে পারে৷
একটি ফর্মের উপলব্ধতা পরীক্ষা করতে, আপনি আগে তৈরি করাthe formStatus
property on the UMPConsentInformation
instance ব্যবহার করুন৷
তারপরে, ফর্মটি লোড করার জন্য একটি মোড়ক পদ্ধতি যোগ করুন:
সুইফট
// Request an update to the consent information. UMPConsentInformation.sharedInstance.requestConsentInfoUpdate( withParameters: parameters, completionHandler: { [self] error in // The consent information has updated. if error != nil { // Handle the error. } else { // The consent information state was updated. // You are now ready to see if a form is available. let formStatus = UMPConsentInformation.sharedInstance.formStatus if formStatus == UMPFormStatus.available { loadForm() } } }) ... func loadForm() { }
উদ্দেশ্য গ
// Request an update to the consent information. [UMPConsentInformation.sharedInstance requestConsentInfoUpdateWithParameters:parameters completionHandler:^(NSError* _Nullable error) { // The consent information has updated. if (error) { // Handle the error. } else { // The consent information state was updated. // You are now ready to see if a form is available. UMPFormStatus formStatus = UMPConsentInformation.sharedInstance .formStatus; if (formStatus == UMPFormStatusAvailable) { [self loadForm]; } } }]; ... - (void) loadForm { }
ফর্মটি লোড করতে, the static loadWithCompletionHandler:
method on the UMPConsentForm
classব্যবহার করুন।
সুইফট
func loadForm() { // Loads a consent form. Must be called on the main thread. UMPConsentForm.load( withCompletionHandler: { form, loadError in if loadError != nil { // Handle the error } else { // Present the form } }) }
উদ্দেশ্য গ
- (void)loadForm { [UMPConsentForm loadWithCompletionHandler:^(UMPConsentForm *form, NSError *loadError) { if (loadError) { // Handle the error } else { // Present the form } }]; }
প্রয়োজনে ফর্মটি উপস্থাপন করুন
আপনি ফর্মের প্রাপ্যতা নির্ধারণ করার পরে এবং এটি লোড করার পরে, ফর্মটি উপস্থাপন করতেUMPConsentForm
উদাহরণে l10npresentFromViewController:completionHandler:
পদ্ধতিটি ব্যবহার করুন৷
l10n-placeholder97 চেক করতে আগে থেকেconsent statusUMPConsentInformation
অবজেক্ট ব্যবহার করুন এবং আপনারloadForm
পদ্ধতি আপডেট করুন:
সুইফট
func loadForm() { UMPConsentForm.load(withCompletionHandler: { form, loadError in if loadError != nil { // Handle the error. } else { // Present the form. You can also hold on to the reference to present // later. if UMPConsentInformation.sharedInstance.consentStatus == UMPConsentStatus.required { form?.present( from: self, completionHandler: { dismissError in if UMPConsentInformation.sharedInstance.consentStatus == UMPConsentStatus.obtained { // App can start requesting ads. } // Handle dismissal by reloading form. loadForm(); }) } else { // Keep the form available for changes to user consent. } } }) }
উদ্দেশ্য গ
- (void)loadForm { [UMPConsentForm loadWithCompletionHandler:^(UMPConsentForm *form, NSError *loadError) { if (loadError) { // Handle the error. } else { // Present the form. You can also hold on to the reference to present // later. if (UMPConsentInformation.sharedInstance.consentStatus == UMPConsentStatusRequired) { [form presentFromViewController:self completionHandler:^(NSError *_Nullable dismissError) { if (UMPConsentInformation.sharedInstance.consentStatus == UMPConsentStatusObtained) { // App can start requesting ads. } // Handle dismissal by reloading form. [self loadForm]; }]; } else { // Keep the form available for changes to user consent. } } }]; }
ব্যবহারকারীর পছন্দ বা ফর্মটি খারিজ করার পরে যদি আপনার কোনো কাজ সম্পাদন করার প্রয়োজন হয়, তাহলে সেই যুক্তিটি আপনার ফর্মের জন্য সমাপ্তি হ্যান্ডলারে বা কলব্যাক করুন৷
পরীক্ষামূলক
একটি ভূগোল জোর করে
UMP SDK আপনার অ্যাপের আচরণ পরীক্ষা করার একটি উপায় প্রদান করে যেন ডিভাইসটি the debugGeography
property of type UMPDebugGeography
on UMPDebugSettings
ব্যবহার করে EEA বা UK-তে অবস্থিত।
ডিবাগ কার্যকারিতা ব্যবহার করতে আপনাকে অবশ্যই আপনার অ্যাপের ডিবাগ সেটিংসে আপনার পরীক্ষার ডিভাইসের হ্যাশড আইডি প্রদান করতে হবে। আপনি যদি এই মানটি সেট না করেrequestConsentInfoUpdateWithParameters:completionHandler:
কল করেন, আপনার অ্যাপটি চালানোর সময় প্রয়োজনীয় ID হ্যাশ লগ করে।
সুইফট
let parameters = UMPRequestParameters() let debugSettings = UMPDebugSettings() debugSettings.testDeviceIdentifiers = ["TEST-DEVICE-HASHED-ID"] debugSettings.geography = UMPDebugGeography.EEA parameters.debugSettings = debugSettings UMPConsentInformation.sharedInstance.requestConsentInfoUpdate( with: parameters, completionHandler: { error in ... })
উদ্দেশ্য গ
UMPRequestParameters *parameters = [[UMPRequestParameters alloc] init]; UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init]; debugSettings.testDeviceIdentifiers = @[ @"TEST-DEVICE-HASHED-ID" ]; debugSettings.geography = UMPDebugGeographyEEA; parameters.debugSettings = debugSettings; [UMPConsentInformation.sharedInstance requestConsentInfoUpdateWithParameters:parameters completionHandler:^(NSError *_Nullable error){ ... }];
UMPDebugGeography
এর সাথে, আপনার কাছে এই বিকল্পগুলির মধ্যে একটিতে ভূগোলকে বাধ্য করার বিকল্প রয়েছে:
ডিবাগ ভূগোল | বর্ণনা |
---|---|
UMPDebugGeographyDisabled | ডিবাগ ভূগোল অক্ষম করা হয়েছে৷ |
UMPDebugGeographyEEA | ডিবাগ ডিভাইসের জন্য ভূগোল EEA-তে প্রদর্শিত হয়। |
UMPDebugGeographyNotEEA | ডিবাগ ডিভাইসের জন্য ভূগোল EEA-তে নেই বলে মনে হচ্ছে। |
মনে রাখবেন যে ডিবাগ সেটিংস শুধুমাত্র পরীক্ষা ডিভাইসে কাজ করে। এমুলেটরদের আপনার ডিভাইস আইডি তালিকায় যোগ করার দরকার নেই কারণ তারা ইতিমধ্যেই ডিফল্টরূপে পরীক্ষা সক্ষম করেছে৷
সম্মতির অবস্থা রিসেট করুন
UMP SDK-এর সাথে আপনার অ্যাপ পরীক্ষা করার সময়, আপনি SDK-এর অবস্থা রিসেট করা সহায়ক বলে মনে করতে পারেন যাতে আপনি একজন ব্যবহারকারীর প্রথম ইনস্টল অভিজ্ঞতা অনুকরণ করতে পারেন। এটি করার জন্য SDK reset
পদ্ধতি প্রদান করে।
সুইফট
UMPConsentInformation.sharedInstance.reset()
উদ্দেশ্য গ
[UMPConsentInformation.sharedInstance reset];
আপনি যদি আপনার প্রকল্প থেকে UMP SDK সম্পূর্ণরূপে সরানোর সিদ্ধান্ত নেন তাহলে আপনার reset
এ কল করা উচিত।