This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
forked from segmentio/analytics-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): use object-based configuration (segmentio#7)
BREAKING CHANGE: We've dropped the chained configuration for an object one instead. This will make Analytics blend even better with tools like Prettier. Before: ```js analytics .configure() .using(Mixpanel, GoogleAnalytics) .recordScreenViews() .trackAppLifecycleEvents() .trackAttributionData() .android() .flushInterval(60) .disableDevicedId() .ios() .trackAdvertising() .trackDeepLinks() .setup("writeKey") .then(() => console.log('Analytics is ready') ) .catch(err => console.error('Something went wrong', err) ) ``` Now: ```js analytics .setup('writeKey', { using: [Mixpanel, GoogleAnalytics], recordScreenViews: true, trackAppLifecycleEvents: true, trackAttributionData: true, android: { flushInterval: 60, collectDeviceId: false }, ios: { trackAdvertising: true, trackDeepLinks: true } }) .then(() => console.log('Analytics is ready') ) .catch(err => console.error('Something went wrong', err) ) ```
- Loading branch information
Showing
20 changed files
with
394 additions
and
827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
packages/core/docs | ||
packages/core/docs/ | ||
build/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.