Skip to content

Commit

Permalink
refactor: rename initial referrer keys
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Jul 28, 2023
1 parent 1be846f commit 8563557
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/utils/storage/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const defaults = {
anonymousId: 'anonymousId',
groupId: 'groupId',
groupTraits: 'groupTraits',
pageInitialReferrer: 'pageInitialReferrer',
pageInitialReferringDomain: 'pageInitialReferringDomain',
initialReferrer: 'initialReferrer',
initialReferringDomain: 'initialReferringDomain',
sessionInfo: 'sessionInfo',
authToken: 'authToken',

Expand Down Expand Up @@ -118,11 +118,11 @@ class Storage {
key: defaults.group_storage_trait,
storage: defaultInMemoryStorage,
},
[defaults.pageInitialReferrer]: {
[defaults.initialReferrer]: {
key: defaults.page_storage_init_referrer,
storage: defaultInMemoryStorage,
},
[defaults.pageInitialReferringDomain]: {
[defaults.initialReferringDomain]: {
key: defaults.page_storage_init_referring_domain,
storage: defaultInMemoryStorage,
},
Expand Down Expand Up @@ -264,14 +264,14 @@ class Storage {
* @param {*} value
*/
setInitialReferrer(value) {
this.setItem(defaults.pageInitialReferrer, value);
this.setItem(defaults.initialReferrer, value);
}

/**
* @param {*} value
*/
setInitialReferringDomain(value) {
this.setItem(defaults.pageInitialReferringDomain, value);
this.setItem(defaults.initialReferringDomain, value);
}

/**
Expand Down Expand Up @@ -421,14 +421,14 @@ class Storage {
* get stored initial referrer
*/
getInitialReferrer() {
return this.getItem(defaults.pageInitialReferrer);
return this.getItem(defaults.initialReferrer);
}

/**
* get stored initial referring domain
*/
getInitialReferringDomain() {
return this.getItem(defaults.pageInitialReferringDomain);
return this.getItem(defaults.initialReferringDomain);
}

/**
Expand Down

0 comments on commit 8563557

Please sign in to comment.