Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Flush segment events as they come in (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson committed Feb 24, 2021
1 parent fced416 commit f416f9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/audius-mobile-client/src/utils/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ export const setup = async () => {
// Record screen views automatically!
recordScreenViews: false,
// Record certain application events automatically!
trackAppLifecycleEvents: true
trackAppLifecycleEvents: true,
// Always flush events (worse for battery, but the web-view is likely even worse)
// https://segment.com/docs/connections/sources/catalog/libraries/mobile/react-native/#flush
flushAt: 1
})
analyticsSetupStatus = 'ready'
console.info('Analytics ready')
Expand Down

0 comments on commit f416f9f

Please sign in to comment.