You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beginning January 16, 2024, Google requires publishers serving ads in the EEA and UK to use a certified consent management platform (CMP). This extension integrates Google's UMP SDK to display a consent dialog during the first app launch. Ads may not function if user does not provide consent.
52
+
53
+
54
+
### Usage
47
55
48
-
3.**Initializing Admob extension**
56
+
1.**Initializing Admob extension**
49
57
If GDPR consent dialog and/or iOS 14+ tracking authorization dialog are required, they are shown automatically upon Admob initialization.
50
58
```haxe
51
59
import extension.admob.*;
@@ -58,7 +66,7 @@ To configure **extension-admob** for your project, follow these steps:
58
66
Admob.init();
59
67
```
60
68
61
-
4.**Checking GDPR Consent Requirements**
69
+
2.**Checking GDPR Consent Requirements**
62
70
After consenting (or not) to show ads, user must have an option to change his choice.
63
71
To give this choice an access to GDPR consent dialog should be provided somewhere in the app.
64
72
You can determine if the GDPR consent dialog is required (ie user is from EEA or UK):
@@ -67,13 +75,13 @@ To configure **extension-admob** for your project, follow these steps:
67
75
trace("GDPR consent dialog is required.");
68
76
```
69
77
70
-
5.**Reopen Privacy Options Dialog**
78
+
3.**Reopening Privacy Options Dialog**
71
79
If needed, allow users to manage their GDPR consent options again:
72
80
```haxe
73
81
Admob.showPrivacyOptionsForm();
74
82
```
75
83
76
-
6.**Verify User Consent**
84
+
4.**Verifing User Consent**
77
85
Check if user has consented to personalized ads:
78
86
```haxe
79
87
if (Admob.getConsent() == AdmobConsent.FULL)
@@ -82,7 +90,7 @@ To configure **extension-admob** for your project, follow these steps:
82
90
trace("User did not consent to personalized ads.");
83
91
```
84
92
85
-
7.**Check Consent for Specific Purposes**
93
+
5.**Checking Consent for Specific Purposes**
86
94
Verify if user has consented to individual purposes, such as purpose 0:
87
95
```haxe
88
96
if (Admob.hasConsentForPurpose(0) == 1)
@@ -91,7 +99,7 @@ To configure **extension-admob** for your project, follow these steps:
91
99
trace("User has not consented to purpose 0.");
92
100
```
93
101
94
-
9.**Load and Show Ads**
102
+
6.**Loading and Showing Ads**
95
103
Add the following snippets to display ads in your app:
0 commit comments