קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במדריך הזה מפורטים השלבים שנדרשים כדי לתמוך בהודעה בנושא תקנות של מדינות בארה"ב כחלק מ-UMP SDK. כדאי לקרוא את ההוראות האלה יחד עם המאמר תחילת העבודה, שבו מוסבר איך להפעיל את האפליקציה עם UMP SDK ואיך להגדיר את ההודעה. ההנחיות הבאות מתייחסות ספציפית להודעה בנושא תקנות במדינות בארה"ב.
דרישות מוקדמות
לפני שממשיכים, חשוב לוודא שביצעתם את הפעולות הבאות:
מעדכנים לגרסה האחרונה של UMP SDK.
כדי לקבל תמיכה בהודעות על תקנות למשתמשים במדינות בארה"ב, מומלץ להשתמש בגרסה
2.1.0
ומעלה.
משלימים את השלבים במאמר תחילת העבודה.
חשוב להטמיע נקודת כניסה לאפשרויות הפרטיות ולהציג אותה אם נדרש. אחרי שתשלימו את המדריך הזה, יהיה לכם נקודת כניסה להצגת ההודעה לגבי תקנות במדינות בארה"ב למשתמשים שלכם.
אם אתם משתמשים בהודעה לבקשת הסכמה בהתאם לתקנות במדינות בארה"ב לצד הודעות אחרות, כדאי לעיין במאמר סוגים של הודעות משתמשים שזמינים כדי להבין מתי מוצגות למשתמשים הודעות שונות.
הגדרת התג 'מתחת לגיל ההסכמה'
כדי לציין אם משתמש מסוים הוא מתחת לגיל ההסכמה, צריך להגדיר את התג
setTagForUnderAgeOfConsent (TFUA). כשמגדירים את TFUA לערך true, UMP SDK לא מבקש הסכמה מהמשתמש. אם לאפליקציה שלכם יש קהל בגילאים שונים, צריך להגדיר את הפרמטר הזה למשתמשים שהם ילדים כדי לוודא שלא תתבקש מהם הסכמה.
אתם אחראים להגדיר את הפרמטר הזה במקומות שבהם הדבר נדרש כדי לעמוד בדרישות של חוק COPPA ושל תקנות רלוונטיות אחרות.
בדוגמה הבאה, הערך של TFUA מוגדר כ-true בבקשת הסכמה ב-UMP:
Swift
// Create a UMPRequestParameters object.letparameters=RequestParameters()// Indicate the user is under age of consent.parameters.isTaggedForUnderAgeOfConsent=true// Request an update for the consent information.ConsentInformation.shared.requestConsentInfoUpdate(with:parameters){[weakself]requestConsentErroringuardletselfelse{return}// ...}
Objective-C
// Create a UMPRequestParameters object.UMPRequestParameters*parameters=[[UMPRequestParametersalloc]init];// Indicate the user is under age of consent.parameters.tagForUnderAgeOfConsent=YES;// Request an update for the consent information.[UMPConsentInformation.sharedInstancerequestConsentInfoUpdateWithParameters:parameterscompletionHandler:^(NSError*_NullablerequestConsentError){// ...}];
קריאת הבחירות בנושא פרטיות
אחרי שהמשתמש מקבל החלטה בנושא תקנות במדינות בארה"ב, אפשר לקרוא את הבחירה שלו מהאחסון המקומי בהתאם למפרט של Global Privacy Platform (הפלטפורמה הגלובלית להעדפות פרטיות, GPP). לפרטים נוספים אפשר לעיין בקטע פרטים באפליקציה.
שימו לב: UMP SDK מאכלס רק את המפתחות IABGPP_GppSID ו-IABGPP_HDR_GppString.
בדיקת ההודעות לבקשת הסכמה בהתאם לתקנות במדינות בארה"ב
כדי לבדוק את ההודעות בנושא תקנות במדינות בארה"ב, צריך להשתמש ב-UMPDebugGeographyRegulatedUSStatedebugGeography כדי לחייב את UMP SDK להתייחס למכשיר הבדיקה כאילו הוא נמצא במדינה בארה"ב שחלות עליה תקנות. אפשר גם להשתמש בUMPDebugGeographyOther כדי להשבית את ההצגה של הודעות לבקשת הסכמה בהתאם לתקנות במדינות בארה"ב. פרטים נוספים על debugGeography זמינים במאמר הגדרת מיקום גיאוגרפי.
[null,null,["עדכון אחרון: 2025-08-31 (שעון UTC)."],[[["\u003cp\u003eThis guide explains how to integrate the US state regulations message into your iOS app using the User Messaging Platform (UMP) SDK.\u003c/p\u003e\n"],["\u003cp\u003eBefore you begin, update to the latest UMP SDK, complete the Get Started guide for the UMP SDK, create a US state regulations message in Ad Manager, and review the available user message types.\u003c/p\u003e\n"],["\u003cp\u003eYou can set a tag to indicate if a user is under the age of consent, preventing consent requests for children and ensuring compliance with COPPA.\u003c/p\u003e\n"],["\u003cp\u003eAfter users interact with the message, you can access their choices by reading from local storage following the Global Privacy Platform (GPP) specification.\u003c/p\u003e\n"],["\u003cp\u003eFor testing, use the \u003ccode\u003edebugGeography\u003c/code\u003e setting to simulate your device's location and trigger or suppress US state regulations messages.\u003c/p\u003e\n"]]],[],null,["This guide outlines the steps required to support the US states regulations\nmessage as part of the UMP SDK. Pair these instructions with\n[Get started](/interactive-media-ads/docs/sdks/ios/client-side/privacy), which details how to get your app running\nwith the UMP SDK and set up your message. The following guidance is specific to\nthe US states regulations message.\n\nPrerequisites\n\nBefore continuing, ensure you do the following:\n\n- Update to the latest version of the UMP SDK. For US states regulations messaging support, we recommend you to use version 2.1.0 or higher.\n- Complete [Get started](/interactive-media-ads/docs/sdks/ios/client-side/privacy). Be sure to implement a privacy options entrypoint and render it if required. By completing this guide, you have an entrypoint to serve your US states regulations message to your users.\n- [Create a US state regulations message](//support.google.com/admanager/answer/10115735) for apps.\n- If you're using the US states regulations message alongside other messages, consult [Available user message types](//support.google.com/admanager/answer/10075998) to understand when different messages are displayed to your users.\n\nSet the tag for under age of consent\n\nTo indicate whether a user is under the age of consent, set\n`\n`[setTagForUnderAgeOfConsent](/admob/android/privacy/api/reference/com/google/android/ump/ConsentRequestParameters.Builder#public-consentrequestparameters.builder-settagforunderageofconsent-boolean-tagforunderageofconsent) (TFUA). When you set TFUA to `true`, the UMP SDK\ndoesn't request consent from the user. If your app has a mixed audience, set\nthis parameter for child users to ensure consent is not requested.\nIt is your\nresponsibility for setting this parameter where necessary to comply with COPPA\nand other relevant regulations.\n| **Important:** The UMP SDK does not forward the TFUA tag set on consent requests to the Google Mobile Ads SDK. You must explicitly set the `tagForUnderAgeOfConsent` or `tagForChildDirectectedTreatment` on ad requests. If you don't set the `tagForUnderAgeOfConsent` or `tagForChildDirectectedTreatment` on ad requests, the UMP SDK does not collect any information that allows Google to determine whether or not users under the age of consent use your app. For more information about data processing restrictions for these users, see\n\nThe following example sets TFUA to true on a UMP consent request: \n\nSwift \n\n // Create a UMPRequestParameters object.\n let parameters = RequestParameters()\n // Indicate the user is under age of consent.\n parameters.isTaggedForUnderAgeOfConsent = true\n\n // Request an update for the consent information.\n ConsentInformation.shared.requestConsentInfoUpdate(with: parameters) {\n [weak self] requestConsentError in\n guard let self else { return }\n\n // ...\n }\n\nObjective-C \n\n // Create a UMPRequestParameters object.\n UMPRequestParameters \\*parameters = \\[\\[UMPRequestParameters alloc\\] init\\];\n // Indicate the user is under age of consent.\n parameters.tagForUnderAgeOfConsent = YES;\n\n // Request an update for the consent information.\n [UMPConsentInformation.sharedInstance\n requestConsentInfoUpdateWithParameters:parameters\n completionHandler:^(NSError *_Nullable requestConsentError) {\n // ...\n }];\n\nRead consent choices\n\nAfter the user has made a US states regulations decision, you can read\ntheir choice from local storage following the Global Privacy Platform (GPP)\nspec. For more details see,\n[In-App Details](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/CMP%20API%20Specification.md#in-app-details).\nNote that the UMP SDK only populates the `IABGPP_GppSID` and\n`IABGPP_HDR_GppString` keys.\n\nTest your US states regulations messaging\n\nTo test your US states regulations messaging, use the\n`UMPDebugGeographyRegulatedUSState` `debugGeography` to force the UMP\nSDK to treat your test device as if the device were located in a regulated US\nstate. You can also use `UMPDebugGeographyOther` to force suppression of US\nstates regulations messages. For more details on `debugGeography`, see\n[Force a geography](/interactive-media-ads/docs/sdks/ios/client-side/privacy#force_a_geography).\n| **Note:** `UMPDebugGeographyRegulatedUSState` is only available in UMP version 2.7.0 or higher."]]