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
During `pod install`, using that variable adds the `GoogleAdsOnDeviceConversion` Pod.
183
+
184
+
If you use Expo, including EAS Build, add the Analytics config plugin to your `app.json` / `app.config.js` instead of editing the generated Podfile manually:
185
+
186
+
```json
187
+
[
188
+
"@react-native-firebase/analytics",
189
+
{
190
+
"ios": {
191
+
"googleAppMeasurementOnDeviceConversion": true
192
+
}
193
+
}
194
+
]
195
+
```
196
+
197
+
This adds `$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true` to the generated iOS `Podfile` during prebuild.
198
+
174
199
# Device Identification
175
200
176
201
If you would like to enable Firebase Analytics to generate automatic audience metrics for iOS (as it does by default in Android), you must link additional iOS libraries, [as documented by the Google Firebase team](https://support.google.com/firebase/answer/6318039). Specifically you need to link in `AdSupport.framework`.
Copy file name to clipboardExpand all lines: docs/index.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,20 +78,21 @@ The following is an example `app.json` to enable the React Native Firebase modul
78
78
79
79
> Listing a module in the Config Plugins (the `"plugins"` array in the JSON above) is only required for React Native Firebase modules that involve _native installation steps_ - e.g. modifying the Xcode project, `Podfile`, `build.gradle`, `AndroidManifest.xml` etc. React Native Firebase modules without native steps will work out of the box; no `"plugins"` entry is required. Not all modules have Expo Config Plugins provided yet. A React Native Firebase module has Config Plugin support if it contains an `app.plugin.js` file in its package directory (e.g.`node_modules/@react-native-firebase/app/app.plugin.js`).
80
80
81
-
If you use `@react-native-firebase/analytics` with Expo, including EAS Build, and want to opt out of iOS Ad ID support, add the Analytics config plugin with the `withoutAdIdSupport` iOS option:
81
+
If you use `@react-native-firebase/analytics` with Expo, including EAS Build, and want to configure iOS Analytics Podfile flags, add the Analytics config plugin with the relevant iOS options:
82
82
83
83
```json
84
84
[
85
85
"@react-native-firebase/analytics",
86
86
{
87
87
"ios": {
88
-
"withoutAdIdSupport": true
88
+
"withoutAdIdSupport": true,
89
+
"googleAppMeasurementOnDeviceConversion": true
89
90
}
90
91
}
91
92
]
92
93
```
93
94
94
-
This adds `$RNFirebaseAnalyticsWithoutAdIdSupport = true` to the generated iOS `Podfile` during prebuild.
95
+
The `withoutAdIdSupport` option adds `$RNFirebaseAnalyticsWithoutAdIdSupport = true` to opt out of iOS Ad ID support. The `googleAppMeasurementOnDeviceConversion` option adds `$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true` to include Google Analytics on-device conversion measurement support. You may omit either option if it is not needed.
If you use Expo, including EAS Build, and want to build iOS Analytics without Ad ID support, add the Analytics config plugin to your `app.json` / `app.config.js`:
43
+
If you use Expo, including EAS Build, and want to configure iOS Analytics Podfile flags, add the Analytics config plugin to your `app.json` / `app.config.js`:
44
44
45
45
```json
46
46
{
@@ -50,7 +50,8 @@ If you use Expo, including EAS Build, and want to build iOS Analytics without Ad
50
50
"@react-native-firebase/analytics",
51
51
{
52
52
"ios": {
53
-
"withoutAdIdSupport": true
53
+
"withoutAdIdSupport": true,
54
+
"googleAppMeasurementOnDeviceConversion": true
54
55
}
55
56
}
56
57
]
@@ -59,7 +60,7 @@ If you use Expo, including EAS Build, and want to build iOS Analytics without Ad
59
60
}
60
61
```
61
62
62
-
This adds `$RNFirebaseAnalyticsWithoutAdIdSupport = true`to the generated iOS `Podfile`during prebuild, which excludes `FirebaseAnalytics/IdentitySupport`.
63
+
The `withoutAdIdSupport` option adds `$RNFirebaseAnalyticsWithoutAdIdSupport = true` during prebuild, which excludes `FirebaseAnalytics/IdentitySupport`. The `googleAppMeasurementOnDeviceConversion` option adds `$RNFirebaseAnalyticsGoogleAppMeasurementOnDeviceConversion = true`, which includes Google Analytics on-device conversion measurement support. You may omit either option if it is not needed.
Copy file name to clipboardExpand all lines: packages/analytics/plugin/__tests__/__snapshots__/iosPlugin.test.ts.snap
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,34 @@
1
1
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
3
+
exports[`Analytics Config Plugin iOS Tests adds both iOS Podfile flags when both analytics options are enabled 1`] =`
4
+
"platform :ios, '15.0'
5
+
6
+
prepare_react_native_project!
7
+
# @generated begin @react-native-firebase/analytics-googleAppMeasurementOnDeviceConversion - expo prebuild (DO NOT MODIFY) sync-6d1952a1f7b9ccb2d313cbd66659db4cdeae591f
# @generated end @react-native-firebase/analytics-googleAppMeasurementOnDeviceConversion
10
+
# @generated begin @react-native-firebase/analytics-withoutAdIdSupport - expo prebuild (DO NOT MODIFY) sync-06c0e725ab83bc834a9294f76fea47cf14bb6ac3
11
+
$RNFirebaseAnalyticsWithoutAdIdSupport = true
12
+
# @generated end @react-native-firebase/analytics-withoutAdIdSupport
13
+
14
+
target 'ReactNativeFirebaseDemo' do
15
+
end
16
+
"
17
+
`;
18
+
19
+
exports[`Analytics Config Plugin iOS Tests adds the Podfile flag when googleAppMeasurementOnDeviceConversion is enabled 1`] =`
20
+
"platform :ios, '15.0'
21
+
22
+
prepare_react_native_project!
23
+
# @generated begin @react-native-firebase/analytics-googleAppMeasurementOnDeviceConversion - expo prebuild (DO NOT MODIFY) sync-6d1952a1f7b9ccb2d313cbd66659db4cdeae591f
0 commit comments