Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure storage type from options #336

Merged
merged 3 commits into from
Oct 11, 2021
Merged

Conversation

saikumarrs
Copy link
Member

@saikumarrs saikumarrs commented Sep 20, 2021

Description of the change

Added a new parameter (defaultStorage) in 'option' parameter of 'load' API to configure the preferred storage type (COOKIES or LOCAL_STORAGE).

  • New parameter added to load options.
  • If no option provided, defaults to Cookies.
  • If the support for provided storage preference doesn't exist, switches to the next type.
  • Migrates any valid data from previous storage type to current.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • [*] New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

N/A

Checklists

Development

  • [*] Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

This change is Reviewable

MoumitaM
MoumitaM previously approved these changes Sep 28, 2021
@saikumarrs saikumarrs changed the base branch from production-staging to production October 11, 2021 09:03
@saikumarrs saikumarrs dismissed MoumitaM’s stale review October 11, 2021 09:03

The base branch was changed.

@saikumarrs saikumarrs changed the base branch from production to production-staging October 11, 2021 09:04
@saikumarrs saikumarrs merged commit 3de3fde into production-staging Oct 11, 2021
saikumarrs added a commit that referenced this pull request Oct 11, 2021
* add dist files

* Snap Pixel Initial Commit

* add cookie data check and reformat code

Signed-off-by: Akash Gupta <[email protected]>

* add cases for empty payload

Signed-off-by: Akash Gupta <[email protected]>

* modified payload mapping

Signed-off-by: Akash Gupta <[email protected]>

* add edge cases and refactor code

Signed-off-by: Akash Gupta <[email protected]>

* trim the event value

Signed-off-by: Akash Gupta <[email protected]>

* add log and change event name

Signed-off-by: Akash Gupta <[email protected]>

* minor update

* remove page_view event from the list

Signed-off-by: Akash Gupta <[email protected]>

* update custom event list

* refactor event names in object

* refactor event names

* ProfitWell Initial Commit

* refactor code

* refactor code

* remove cookieData

* remove throw error message

* correct payload key

* update profitwell identify

* remove unused import

* Delete test-tool.yaml

* move marketing tracking to identify

* add isLoaded and isReady check

* change log level to debug

* initial commit without rewrite frames

* review comment addressed for initial commit

* commit without rewrite frames

* initial commit for rewriteFrames

* logger addition, object to array conversion and formatting

* event not dropped if username, email or id is not present

* adding set release by property

* refactored code

* include paths handling edited

* mandatory field checks reverted and scriploader edit

* edits after end to end test

* edit in traits and object to array function

* minor update

* edit in config

* init code transferred to isReady for loading issue

* code refactored and ready is modified

* minor update

* update identify

* update scriptloader id

* edit in rewriteFrames for ForEach

* Enhancement: Updated dist for npm

- .Updated gitignore to exclude npm package dir
- npm version updated to 1.0.19
- README.md updated to latest

* resolved conflicts, added Quatum metric integration

* changed config setting to siteID

* QuatumMetric-int:Addressed Review comments

* QuatumMetric-int:Removed siteID

* Feature: Allow Pinterest top-level property mapping i.e. revenue -> value (#322)

* removed checkout_id support and replaced it with order_id to align better with ecomm spec

* added feature to allow for toplevel property mapping

* removed bug that strips property key value pairs

* Feature: Configure storage type from options (#336)

* Initial cut to configure storage type from options

* Update option parameter name

* Code-refactored and minor bug fixed

Co-authored-by: sayan-mitra <[email protected]>
Co-authored-by: Akash Gupta <[email protected]>
Co-authored-by: anuraj <[email protected]>
Co-authored-by: Utsab Chowdhury <[email protected]>
Co-authored-by: shrouti <[email protected]>
Co-authored-by: saikumarrs <[email protected]>
Co-authored-by: dalyd14 <[email protected]>
Co-authored-by: dalyd14 <[email protected]>
Co-authored-by: Ruchira <[email protected]>
Co-authored-by: saikumarrs <[email protected]>
saikumarrs added a commit that referenced this pull request Oct 12, 2021
@saikumarrs saikumarrs mentioned this pull request Oct 12, 2021
10 tasks
arnab-p added a commit that referenced this pull request Oct 12, 2021
saikumarrs added a commit that referenced this pull request Oct 13, 2021
saikumarrs added a commit that referenced this pull request Dec 7, 2021
* add dist files

* Snap Pixel Initial Commit

* add cookie data check and reformat code

Signed-off-by: Akash Gupta <[email protected]>

* add cases for empty payload

Signed-off-by: Akash Gupta <[email protected]>

* modified payload mapping

Signed-off-by: Akash Gupta <[email protected]>

* add edge cases and refactor code

Signed-off-by: Akash Gupta <[email protected]>

* trim the event value

Signed-off-by: Akash Gupta <[email protected]>

* add log and change event name

Signed-off-by: Akash Gupta <[email protected]>

* minor update

* remove page_view event from the list

Signed-off-by: Akash Gupta <[email protected]>

* update custom event list

* refactor event names in object

* refactor event names

* ProfitWell Initial Commit

* refactor code

* refactor code

* remove cookieData

* remove throw error message

* correct payload key

* update profitwell identify

* remove unused import

* Delete test-tool.yaml

* move marketing tracking to identify

* add isLoaded and isReady check

* change log level to debug

* initial commit without rewrite frames

* review comment addressed for initial commit

* commit without rewrite frames

* initial commit for rewriteFrames

* logger addition, object to array conversion and formatting

* event not dropped if username, email or id is not present

* adding set release by property

* refactored code

* include paths handling edited

* mandatory field checks reverted and scriploader edit

* edits after end to end test

* edit in traits and object to array function

* minor update

* edit in config

* init code transferred to isReady for loading issue

* code refactored and ready is modified

* minor update

* update identify

* update scriptloader id

* edit in rewriteFrames for ForEach

* Enhancement: Updated dist for npm

- .Updated gitignore to exclude npm package dir
- npm version updated to 1.0.19
- README.md updated to latest

* resolved conflicts, added Quatum metric integration

* changed config setting to siteID

* QuatumMetric-int:Addressed Review comments

* QuatumMetric-int:Removed siteID

* Feature: Allow Pinterest top-level property mapping i.e. revenue -> value (#322)

* removed checkout_id support and replaced it with order_id to align better with ecomm spec

* added feature to allow for toplevel property mapping

* removed bug that strips property key value pairs

* Feature: Configure storage type from options (#336)

* Initial cut to configure storage type from options

* Update option parameter name

* Code-refactored and minor bug fixed

* Merge remote-tracking branch 'origin/production' into production-staging

* Update .gitignore to exlude index.js (npm package)

* Deleted index.js (npm package) file

* Updated npm package version to match the SDK

* Deleted index.js (npm package) file

* Bug Fix: Prevent rudder element mutation by deep copying (#362)

* deep cloning rudderElement

* renaming the cloned rudderElement

* Bumped version

* PostAffiliatePro Integration (#378)

* Initial commit for PostAffiliatePro

* Commit for PostAffiliatePro

* Commit for PostAffiliatePro

* Commit for PostAffiliatePro

* Adding comments.

Co-authored-by: sayan-mitra <[email protected]>
Co-authored-by: Akash Gupta <[email protected]>
Co-authored-by: anuraj <[email protected]>
Co-authored-by: Utsab Chowdhury <[email protected]>
Co-authored-by: shrouti <[email protected]>
Co-authored-by: dalyd14 <[email protected]>
Co-authored-by: dalyd14 <[email protected]>
Co-authored-by: Ruchira <[email protected]>
Co-authored-by: Arnab Pal <[email protected]>
Co-authored-by: shrouti1507 <[email protected]>
Co-authored-by: Moumita Mandal <[email protected]>
Co-authored-by: Sudip Paul <[email protected]>
@akashrpo akashrpo deleted the cookies-opt branch March 5, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants