Wenn Sie sich mit anderen Nutzern über unsere Produkte austauschen und Feedback geben möchten, treten Sie dem offiziellen Ad Manager-Discord-Kanal auf dem Server der Google Advertising and Measurement Community bei.
Durch die jüngsten Aktualisierungen der Google-Richtlinien für Publisher wurden neue Anforderungen an die Benachrichtigung und Einwilligung für Publisher eingeführt, die genaue Standortdaten von Nutzern zu Werbezwecken an Google weitergeben.
Wenn diese Richtlinie auf Sie zutrifft, können Sie Ihre Nutzer mit dem folgenden Snippet über die Datenweitergabe informieren:
Kotlin
protectedfunpresentConsentOverlay(context:Context){AlertDialog.Builder(context).setTitle("Location data").setMessage("We may use your location, "+"and share it with third parties, "+"for the purposes of personalized advertising, "+"analytics, and attribution. "+"To learn more, visit our privacy policy "+"at https://myapp.com/privacy.").setNeutralButton("OK"){dialog,which->dialog.cancel()// TODO: replace the below log statement with code that specifies how// you want to handle the user's acknowledgement.Log.d("MyApp","Got consent.")}.show()}// To use the above function:presentConsentOverlay(this)
Java
protectedvoidpresentConsentOverlay(Contextcontext){newAlertDialog.Builder(context).setTitle("Location data").setMessage("We may use your location, "+"and share it with third parties, "+"for the purposes of personalized advertising, "+"analytics, and attribution. "+"To learn more, visit our privacy policy "+"at https://myapp.com/privacy.").setNeutralButton("OK",newDialogInterface.OnClickListener(){@OverridepublicvoidonClick(DialogInterfacedialog,intwhich){dialog.cancel();// TODO: replace the below log statement with code that specifies how// you want to handle the user's acknowledgement.Log.d("MyApp","Got consent.");}}).show();}// To use the above method:presentConsentOverlay(this);
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[[["\u003cp\u003eGoogle Publisher Policies now require publishers to obtain user consent before sharing precise location data for ads.\u003c/p\u003e\n"],["\u003cp\u003ePublishers need to clearly inform users about how their location data will be used, including personalized advertising, analytics, and attribution.\u003c/p\u003e\n"],["\u003cp\u003eSample code snippets in Kotlin and Java demonstrate how to create a consent overlay to inform users and obtain their acknowledgement.\u003c/p\u003e\n"],["\u003cp\u003ePublishers must customize the provided snippets to accurately reflect their specific data sharing practices for compliance.\u003c/p\u003e\n"]]],[],null,["Select platform: [Android](/ad-manager/mobile-ads-sdk/android/privacy/precise-location \"View this page for the Android platform docs.\") [iOS](/ad-manager/mobile-ads-sdk/ios/privacy/precise-location \"View this page for the iOS platform docs.\")\n\n\u003cbr /\u003e\n\nRecent updates to the [Google Publisher\nPolicies](//support.google.com/adsense/answer/9335564#use_of_device_and_location_data)\nhave introduced new notice and consent requirements for publishers who pass\nprecise location data of users to Google, for ads-related purposes.\n\nIf this policy applies to you, the following snippet shows one way you could\ninform your users of this data sharing: \n\nKotlin \n\n```kotlin\nprotected fun presentConsentOverlay(context: Context) {\n AlertDialog.Builder(context)\n .setTitle(\"Location data\")\n .setMessage(\"We may use your location, \" +\n \"and share it with third parties, \" +\n \"for the purposes of personalized advertising, \" +\n \"analytics, and attribution. \" +\n \"To learn more, visit our privacy policy \" +\n \"at https://myapp.com/privacy.\")\n .setNeutralButton(\"OK\") { dialog, which -\u003e\n dialog.cancel()\n // TODO: replace the below log statement with code that specifies how\n // you want to handle the user's acknowledgement.\n Log.d(\"MyApp\", \"Got consent.\")\n }\n .show()\n}\n\n// To use the above function:\npresentConsentOverlay(this)\n```\n\nJava \n\n```java\nprotected void presentConsentOverlay(Context context) {\n new AlertDialog.Builder(context)\n .setTitle(\"Location data\")\n .setMessage(\"We may use your location, \" +\n \"and share it with third parties, \" +\n \"for the purposes of personalized advertising, \" +\n \"analytics, and attribution. \" +\n \"To learn more, visit our privacy policy \" +\n \"at https://myapp.com/privacy.\")\n .setNeutralButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n // TODO: replace the below log statement with code that specifies how\n // you want to handle the user's acknowledgement.\n Log.d(\"MyApp\", \"Got consent.\");\n }\n })\n .show();\n}\n\n// To use the above method:\npresentConsentOverlay(this);\n```\n| **Key Point:** This snippet is only an example. Make sure to customize the snippet to accurately reflect your data sharing practices, so users are informed of all the relevant purposes for which you share their precise location data."]]