Skip to content

Commit c1238c8

Browse files
committed
Update README section on setup options
We need to explain this part a bit more, because it is not entirely clear how to use the options.
1 parent e0fccdc commit c1238c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,14 @@ import Analytics, { AnalyticsConstants } from 'react-native-analytics-segment-io
211211
## setup: function (key, options = {})
212212
*Initial framework setup*
213213
```js
214-
Analytics.setup('segment_write_key', { [AnalyticsConstants.enableAdvertisingTracking]: true })
214+
const options = { option: value, option: value }
215+
Analytics.setup('segment_write_key', options)
215216
```
216217

218+
Where `options` is an object that contains the options mentioned in the table below.
219+
There are constants available for all the options, using `[AnalyticsConstants.optionName]`, e.g. `[AnalyticsConstants.trackApplicationLifecycleEvents]: true`.
220+
If an option is not set in the `options` object, its default value is used (see table below).
221+
217222
*`setup()` returns a promise to indicate whether the initialization was successful or not.*
218223

219224
Supported options:

0 commit comments

Comments
 (0)