Skip to content

Commit b39aa3e

Browse files
PhaenSalakar
authored andcommitted
[v6] Misc doc fixes (invertase#2515)
* Typo * Admob doc link fixes * Removed Brittish slang 🙄 * Wording, typos * Extra admob examples * Analytics doc changes * User properties details * Auth stuff * More auth changes
1 parent f34979d commit b39aa3e

File tree

10 files changed

+137
-113
lines changed

10 files changed

+137
-113
lines changed

Diff for: docs/admob/european-user-consent.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: European User Consent
3-
description: Understand how the EU User Consent Policy can be managed within AdMob and how it effects your application.
3+
description: Understand how the EU User Consent Policy can be managed within AdMob and how it affects your application.
44
---
55

66
# European User Consent
77

88
Under the Google [EU User Consent Policy](https://www.google.com/about/company/consentstaging.html), you must make
9-
certain disclosures to your users in the European Economic Area (EEA) and obtain their consent to use cookies or
10-
other local storage, where legally required, and to use personal data (such as AdID) to serve ads. This policy
9+
certain disclosures to your users in the European Economic Area (EEA) and obtain their consent to use cookies or
10+
other local storage, where legally required, and to use personal data (such as AdID) to serve ads. This policy
1111
reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR).
1212

1313
The React Native Firebase AdMob module provides out of the box support for helping to manage your users consent
@@ -22,7 +22,7 @@ The `AdsConsent` helper & AdMob module provides out of the box support for:
2222

2323
## Understanding AdMob Ads
2424

25-
Ads served by Google can be categorized as personalized or non-personalized, both requiring consent from users in the EEA. By default,
25+
Ads served by Google can be categorized as personalized or non-personalized, both requiring consent from users in the EEA. By default,
2626
ad requests to Google serve personalized ads, with ad selection based on the user's previously collected data. Users outside of the EEA do not require consent.
2727

2828
> The `AdsConsent` helper only provides you with the tools for requesting consent, it is up to the developer to ensure the consent status is reflected throughout the app.
@@ -93,22 +93,22 @@ Now we understand the consent status of the user, we can gather their consent (i
9393

9494
If you are aware that users are under the age of consent in Europe, it is possible to set this using the `setTagForUnderAgeOfConsent`
9595
method (TFUA). Once the setting is enabled, the Google-rendered consent form will fail to load. All ad requests that include
96-
TFUA will be made ineligible for personalized advertising and remarketing. TFUA disables requests to third-party ad technology
96+
TFUA will be made ineligible for personalized advertising and remarketing. TFUA disables requests to third-party ad technology
9797
providers, such as ad measurement pixels and third-party ad servers.
98-
98+
9999
To remove this setting, pass `false` to the method.
100100

101101
#### 1. Google-rendered consent form
102102

103-
The Google-rendered consent form is a full-screen configurable form that displays over your app content.
103+
The Google-rendered consent form is a full-screen configurable form that displays over your app content.
104104
You can configure the form to present the user with combinations of the following options:
105105

106106
- Consent to view personalized ads
107107
- Consent to view non-personalized ads
108108
- Use a paid version of the app instead of viewing ads
109109

110-
You should review the consent text carefully: what appears by default is a message that might be appropriate if you use
111-
Google to monetize your app; but Google cannot provide legal advice on the consent text that is appropriate for you.
110+
You should review the consent text carefully: what appears by default is a message that might be appropriate if you use
111+
Google to monetize your app; but Google cannot provide legal advice on the consent text that is appropriate for you.
112112
To update consent text of the Google-rendered consent form, modify the `consentform.htm`l file included in the Consent SDK as required.
113113

114114
> An [example of a Google-rendered](https://developers.google.com/admob/images/android_eu_consent_form.png) consent form.
@@ -122,7 +122,7 @@ import { AdsConsent, AdsConsentStatus } from '@react-native-firebase/admob';
122122
const consentInfo = await AdsConsent.requestInfoUpdate(['pub-6189033257628123']);
123123

124124
if (
125-
consentInfo.isRequestLocationInEeaOrUnknown &&
125+
consentInfo.isRequestLocationInEeaOrUnknown &&
126126
consentInfo.status === AdsConsentStatus.UNKNOWN
127127
) {
128128
const formResult = await AdsConsent.showForm({
@@ -134,7 +134,7 @@ if (
134134
}
135135
```
136136

137-
Once the user has selected their preference, the `formResult` contains their status and whether or not they prefer an
137+
Once the user has selected their preference, the `formResult` contains their status and whether or not they prefer an
138138
ad-free option of your application (if enabled):
139139

140140
```js
@@ -183,16 +183,16 @@ import { AdsConsent, AdsConsentStatus } from '@react-native-firebase/admob';
183183
await AdsConsent.setStatus(AdsConsentStatus.PERSONALIZED);
184184
```
185185

186-
To invalidate the users consent status (e.g. if the providers list changes since their last consent), set the status back to
186+
To invalidate the users consent status (e.g. if the providers list changes since their last consent), set the status back to
187187
`UNKNOWN`. When your application next boots, you can get the users previous consent status using the `getStatus` method.
188188

189-
### Testing
189+
### Testing
190190

191-
When developing the consent flow, the behaviour of the `AdsConsent` responses may not be reliable due to the environment
192-
(e.g. using an emulator vs real device). It is possible to set a debug location to test the various responses from the
191+
When developing the consent flow, the behaviour of the `AdsConsent` responses may not be reliable due to the environment
192+
(e.g. using an emulator vs real device). It is possible to set a debug location to test the various responses from the
193193
Consent SDK.
194194

195-
If using a real device, ensure you whitelist it using the device ID, which can be obtained from native logs or using a library
195+
If using a real device, ensure you whitelist it using the device ID, which can be obtained from native logs or using a library
196196
such as [react-native-device-info](https://github.com/react-native-community/react-native-device-info). Once found,
197197
call the `addTestDevice(deviceId)` method.
198198

@@ -215,7 +215,7 @@ await AdsConsent.setDebugGeography(AdsConsentDebugGeography.EEA);
215215
216216
### Forwarding the consent status to ads
217217

218-
Assuming the user is within the EEA and has provided consent, their status needs to be forwarded to every ad request we
218+
Assuming the user is within the EEA and has provided consent, their status needs to be forwarded to every ad request we
219219
make in our application.
220220

221221
> If the user is within the EEA and has not given consent, do not display AdMob ads (even non-personalized).
@@ -232,7 +232,7 @@ const rewardedAd = RewardedAd.createForAdRequest('AD_UNIT_ID', {
232232
});
233233
```
234234

235-
The requested ad URL via the SDK will send a request with an additional parameter `&npa=1`, which will return a
235+
The requested ad URL via the SDK will send a request with an additional parameter `&npa=1`, which will return a
236236
non-personalized ad.
237237

238238
> The requestNonPersonalizedAdsOnly option can be applied to every supported ad format.
@@ -241,14 +241,14 @@ non-personalized ad.
241241

242242
#### "Could not parse Event FE preflight response."
243243

244-
This is a common error which occurrs on both Android & iOS when making a request to display a Google-rendered consent form. Unfortunatly the reasoning for this error is generic, making it hard to debug. There are a number of steps to check which are usually the cause for this error:
244+
This is a common error which occurs on both Android & iOS when making a request to display a Google-rendered consent form. Unfortunately the reasoning for this error is generic, making it hard to debug. There are a number of steps to check which are usually the cause for this error:
245245

246-
- The AdMob App ID is incorrect: Ensure you have entered the correct ID into the `firebase.json` file under the React Native config, called `occurs`.
246+
- The AdMob App ID is incorrect: Ensure you have entered the correct ID into the `firebase.json` file under the `admob_app_id` key in the `react-native` config.
247247
- A publisher ID is incorrect: Ensure your entered publisher IDs are correct.
248248
- The publisher ID needs to be available on the same account as your AdMob App ID.
249249
- The user is outside of the EEA: If a user does not need to provide consent, the form request will error. Ensure you have checked the users status via `requestInfoUpdate`. If using an emulator, ensure you set a debug location via `setDebugGeography`.
250250
- Your AdMob account is not valid:
251-
- Your account is not disabled: This can occur if Google notices you have duplicate accounts. They will email you about this, and block you from entering the dashboard.
252-
- You have setup valid payment information: If your account has no payment information setup, this seems to cause this error to trigger.
251+
- Your account is disabled: This can occur if Google notices you have duplicate accounts. They will email you about this, and block you from entering the dashboard.
252+
- You have provided invalid payment information: If your account has no payment information set up, this seems to cause this error to trigger.
253253

254254
If you are still struggling to present the consent form, reach out to AdMob support to investigate your account status.

Diff for: docs/admob/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ _We are currently investigating how to integrate with [Native Ads](https://devel
2222
icon="attach_money"
2323
color="#2196f3"
2424
title="Quick Start"
25-
to="quick-start"
25+
to="admob/quick-start"
2626
>
2727
Install & start monetizing your React Native application with AdMob.
2828
</Block>
29-
<Block
29+
<Block
3030
icon="pan_tool"
3131
color="#f44336"
3232
title="European User Consent"
33-
to="european-user-consent"
33+
to="admob/european-user-consent"
3434
>
3535
Learn how to request consent from users within the EEA. The AdMob library comes with built in support to help you handle GDPR regulations in your application.
3636
</Block>

Diff for: docs/admob/quick-start.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ yarn add @react-native-firebase/admob
1818
## Module usage
1919

2020
The AdMob package provides a JavaScript API for integrating event based adverts such as Interstitial Ads and
21-
React component view adverts such as Banner Ads. It also provides functionality for requesting consent from those users within the EEA, specified by EU ePrivacy Directive & GDPR.
21+
React component view adverts such as Banner Ads. It also provides functionality for requesting consent from those users within the EEA, specified by EU ePrivacy Directive & GDPR.
2222

2323
Import the Cloud Functions package into your project:
2424

@@ -34,7 +34,7 @@ import { firebase } from '@react-native-firebase/admob';
3434

3535
### Important: Adding your AdMob App ID
3636

37-
The AdMob module needs hooking up to your own Google AdMob account. On [the dashboard](https://apps.admob.com/v2/home), you can add an application via the "Apps" menu item. Once created, under the "App settings" section you will find a custom "App ID". This ID is needed in order for the module to be used.
37+
The AdMob module needs to be hooked up to your own Google AdMob account. On [the dashboard](https://apps.admob.com/v2/home), you can add an application via the "Apps" menu item. Once created, under the "App settings" section you will find a custom "App ID". This ID is needed in order for the module to be used.
3838

3939
![App ID](https://prismic-io.s3.amazonaws.com/invertase%2F52dd6900-108c-47a6-accb-699fde963b99_new+project+%2813%29.jpg)
4040

@@ -56,12 +56,11 @@ Ensure you **rebuild** your application for the changes to take effect.
5656

5757
Out of the box, AdMob does not handle any related regulations which you may need to enforce on your application. It is up to the developer to implement and handle this on a user-by-user basis. For example, you must consent to EEA users being served both personalized and non-personalized adverts before showing them. For more information, see [Requesting Consent from European Users](https://developers.google.com/admob/android/eu-consent).
5858

59-
The AdMob module provides a `AdConsent` helper to help developers quickly implement consent flows within their application. See the
60-
<Anchor version group href="/european-user-consent">European User Consent</Anchor> page.
59+
The AdMob module provides a `AdConsent` helper to help developers quickly implement consent flows within their application. See the <Anchor version group href="/european-user-consent">European User Consent</Anchor> page.
6160

6261
### Example: Displaying an Interstitial
6362

64-
An interstitial is a full screen advert which is overlaid on-top of your currently application. They are perfect for showing periodically between game levels or after the user completes an action.
63+
An interstitial is a full screen advert which is overlaid on-top of your currently application. They are perfect to show periodically between game levels or after the user completes an action.
6564

6665
#### Testing
6766

@@ -111,11 +110,11 @@ Once created, you will be provided with a new Ad Unit ID which can be passed ove
111110

112111
### Configuring Ad Requests
113112

114-
The AdMob module provides two ways of filtering and handling ad content within your app.
113+
The AdMob module provides two ways of filtering and handling ad content within your app.
115114

116115
### Global Configuration
117116

118-
To comply with various online acts, such as [Children's Online Privacy Protection Act (COPPA)](http://business.ftc.gov/privacy-and-security/children%27s-privacy) and [General Data Protection Regulation (GDPR)](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32016R0679), it is possible to set targetting preferences across every ad request in your aplication.
117+
To comply with various online acts, such as [Children's Online Privacy Protection Act (COPPA)](http://business.ftc.gov/privacy-and-security/children%27s-privacy) and [General Data Protection Regulation (GDPR)](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32016R0679), it is possible to set targetting preferences across every ad request in your application.
119118

120119
Using the `setRequestConfiguration` method, all future ad requests will comply with the `RequestConfiguration` set:
121120

@@ -129,7 +128,7 @@ await admob().setRequestConfiguration({
129128
});
130129
```
131130

132-
For more information on the options available, see the `RequestConfiguration` documentation.
131+
For more information on the options available, see the [`RequestConfiguration` documentation](https://firebase.google.com/docs/reference/android/com/google/android/gms/ads/RequestConfiguration).
133132

134133
### Ad Specific Configuration
135134

@@ -144,3 +143,4 @@ const interstitialAd = InterstitialAd.createForAdRequest('AD_UNIT_ID', {
144143
keywords: ['fashion', 'clothing']
145144
});
146145
```
146+
``

Diff for: docs/analytics/quick-start.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ yarn add @react-native-firebase/analytics
1818
## Module usage
1919

2020
The Analytics package will automatically start tracking events such as when users clear app data, dismiss notifications and more.
21-
To view the full list of automatic events, see <Anchor version group href="/reserved-events">Reserved Events</Anchor>.
21+
To view the full list of automatic events, see [this page](https://support.google.com/firebase/answer/6317485) of the official Firebase documentation.
2222

2323
The package also provides a JavaScript API to allow for logging custom events and metrics throughout your application.
2424

@@ -52,7 +52,7 @@ async function onProductView() {
5252

5353
### Attaching user data
5454

55-
User data can be attached to analytical events via the `setUser*` methods:
55+
User data can be attached to analytical events via the [***`setUserId`](reference/module#setUserId), [***`setUserProperties`](reference/module#setUserProperties) and [***`setUserProperty`](reference/module#setUserProperty) methods. Each Firebase project can have up to 25 uniquely named (case-sensitive) user properties.
5656

5757
```js
5858
import analytics from '@react-native-firebase/analytics';
@@ -65,9 +65,11 @@ async function onSignIn(user) {
6565
}
6666
```
6767

68+
> When you set user properties, be sure to never include personally identifiable information such as names, social security numbers, or email addresses, even in hashed form.
69+
6870
### Tracking screen names
6971

70-
Similar to Analytics on the web, it's important to understand the user journey within your application, for example
72+
Similar to Analytics on the web, it's important to understand the user's journey within your application, for example
7173
tracking drop off points during a e-commerce transaction flow. The Analytics package provides a method called
7274
`setCurrentScreen` to help track this.
7375

Diff for: docs/auth/phone-auth.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Phone authentication allows users to sign in to Firebase using their phone as th
99
to the user via their phone number containing a unique code. Once the code has been authorized, the user is able to
1010
sign in to Firebase.
1111

12+
Phone numbers that end users provide for authentication will be sent and stored by Google to improve our spam and abuse prevention across Google services, including but not limited to Firebase. **Developers should ensure they have appropriate end-user consent prior to using the Firebase Authentication phone number sign-in service.**
13+
1214
> Firebase Phone Auth is not supported in all countries. Please see their [FAQs](https://firebase.google.com/support/faq/#develop) for more information.
1315
1416
React Native Firebase provides two separate integration flows:
@@ -23,10 +25,10 @@ The `signInWithPhoneNumber` method handles the entire authentication flow, howev
2325
error handling. Some Android devices may also automatically handle the incoming SMS code and authenticate the user
2426
automatically.
2527

26-
**Step 1**: Trigger phone auth
27-
2828
> Whilst testing, make sure you have [whitelisted your device](https://firebase.google.com/docs/auth/ios/phone-auth#test-with-whitelisted-phone-numbers).
2929
30+
**Step 1**: Trigger phone auth
31+
3032
```js
3133
import auth from '@react-native-firebase/auth';
3234

Diff for: docs/auth/quick-start.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { firebase } from '@react-native-firebase/auth';
3434
### Subscribe to auth state changes
3535

3636
Whenever a user performs an actions with your application, such as sign-in or signs-out, it is possible to subscribe
37-
to the events in realtime using the `onAuthStateChanged` method.
37+
to the events in real time using the `onAuthStateChanged` method.
3838

3939
```jsx
4040
import React, { useState, useEffect } from 'react';
@@ -88,14 +88,14 @@ The user is able to clear their state by deleting the apps data/cache from the d
8888
React Native Firebase provides access to the majority of authentication providers available, including social providers
8989
including Facebook, Google, Twitter and Github, along with phone/SMS authentication.
9090

91-
_Our [guides](/guides?tags=auth) provide more in-depth explanations on provides and how to integrate them into your application._
91+
_Our [guides](../guides?tags=auth) provide more in-depth explanations on provides and how to integrate them into your application._
9292

9393
#### Anonymous Sign In
9494

9595
Some applications don't require authentication, which make it tricky to identify what users are doing throughout your app.
9696
If connecting with external APIs, it is also useful to add an extra layer of security by ensuring the users request is
9797
from the app. This can be achieved with the `signInAnonymously` method, which creates a new anonymous user which is
98-
persisted, allowing you to integrate with other services such as Analytics by providing a user id.
98+
persisted, allowing you to integrate with other services such as Analytics by providing a user ID.
9999

100100
```js
101101
import auth from '@react-native-firebase/auth';
@@ -118,8 +118,8 @@ async function bootstrap() {
118118

119119
#### Email/Password Sign In
120120

121-
Email/Password sign in is a common method for user sign in on applications. This requires the user to provide
122-
an email address and secure password. Users can both register and sign in in one method called
121+
Email/password sign in is a common method for user sign in on applications. This requires the user to provide
122+
an email address and secure password. Users can both register and sign in using a method called
123123
`createUserWithEmailAndPassword`, or sign in to an existing account with `signInWithEmailAndPassword`.
124124

125125
Users must first register using the `createUserWithEmailAndPassword` method

Diff for: docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ React Native Firebase requires the following platform versions:
1717

1818
## Firebase Modules
1919

20-
Each Firebase module is published as it's own package on [NPM](https://www.npmjs.com/) can be
20+
Each Firebase module is published as its own package on [NPM](https://www.npmjs.com/) can be
2121
individually installed using [`Yarn`](https://yarnpkg.com/lang/en/). Please refer to the quick start guide
2222
for installation instructions on each individual module page.
2323

0 commit comments

Comments
 (0)