Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

feat(ids): add localStorageFallbackDisabled flag #109

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

f2prateek
Copy link
Contributor

This adds a flag localStorageFallbackDisabled to disable the localStorage fallback code.

localStorageFallbackDisabled is falsy by default, hence the fallback code is opt in by default, and requires opt out.

Since the configuration for users and groups are supplied seperately, to use this you need to pass in:

analytics.initialize(settings, {
  user: {
    localStorageFallbackDisabled: true,
  },
  group: {
   localStorageFallbackDisabled: true
  }
})

This adds a flag `localStorageFallbackDisabled` to disable the localStorage fallback code.

`localStorageFallbackDisabled` is falsy by default, hence the fallback code is opt in by default, and requires opt out.

Since the configuration for users and groups are supplied seperately, to use this you need to pass in:

```
analytics.initialize(settings, {
  user: {
    localStorageFallbackDisabled: true,
  },
  group: {
   localStorageFallbackDisabled: true
  }
})
```
@f2prateek f2prateek requested review from nhi-nguyen and fathyb March 13, 2019 23:24
@nhi-nguyen
Copy link

analytics.initialize(settings, {
  user: {
    localStorageFallbackDisabled: true,
  },
  group: {
   localStorageFallbackDisabled: true
  }
})

Two questions:

  • Is there a situation where users may want to call do this outside/after initialize?
  • related to the above, is there any value in writing this in a helper function?

@f2prateek f2prateek merged commit 622b893 into master Mar 15, 2019
@f2prateek f2prateek deleted the gate-localStorage branch March 15, 2019 23:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants