react-native-google-analytics-bridge
Advanced tools
Comparing version 1.1.0 to 1.2.0
23
index.js
@@ -88,6 +88,6 @@ "use strict"; | ||
} | ||
/** | ||
* Sets the trackers dispatch interval | ||
* This will influence how often batches of events, screen views, etc | ||
* This will influence how often batches of events, screen views, etc | ||
* are sent to your tracker. | ||
@@ -107,4 +107,23 @@ * @param {Number} intervalInSeconds | ||
} | ||
/** | ||
* Sets if AnonymizeIp is enabled | ||
* If enabled the last octet of the IP address will be removed | ||
* @param {Boolean} enabled | ||
*/ | ||
static setAnonymizeIp(enabled) { | ||
GoogleAnalyticsBridge.setAnonymizeIp(enabled); | ||
} | ||
/** | ||
* Sets if OptOut is active and disables Google Analytics | ||
* This has to be set each time the App starts | ||
* @param {Boolean} enabled | ||
*/ | ||
static setOptOut(enabled) { | ||
GoogleAnalyticsBridge.setOptOut(enabled); | ||
} | ||
} | ||
module.exports = GoogleAnalytics; |
{ | ||
"name": "react-native-google-analytics-bridge", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "React Native bridge for using native Google Analytics libraries on iOS and Android", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -270,2 +270,24 @@ GoogleAnalyticsBridge ![npm version](https://img.shields.io/npm/v/react-native-google-analytics-bridge.svg) | ||
### setAnonymizeIp(enabled) | ||
* **enabled (required):** Boolean | ||
Sets if AnonymizeIp is enabled. This is disabled by default. | ||
If enabled the last octet of the IP address will be removed. | ||
```javascript | ||
GoogleAnalytics.setAnonymizeIp(true); | ||
``` | ||
### setOptOut(enabled) | ||
* **enabled (required):** Boolean | ||
Sets if OptOut is active and disables Google Analytics. This is disabled by default. | ||
Note: This has to be set each time the App starts. | ||
```javascript | ||
GoogleAnalytics.setOptOut(true); | ||
``` | ||
## Logging | ||
@@ -272,0 +294,0 @@ There is a divergence in how the iOS and Android versions of the native library handles logging. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
34399095
338
319