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

33across ID System: Include hashed email from storage #12529

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions modules/33acrossIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const GVLID = 58;

const STORAGE_FPID_KEY = '33acrossIdFp';
const STORAGE_TPID_KEY = '33acrossIdTp';
const STORAGE_HEM_KEY = '33acrossIdHm'
const DEFAULT_1PID_SUPPORT = true;
const DEFAULT_TPID_SUPPORT = true;

Expand Down Expand Up @@ -97,6 +98,11 @@ function calculateQueryStringParams(pid, gdprConsentData, enabledStorageTypes) {
params.tp = encodeURIComponent(tp);
}

const hem = getStoredValue(STORAGE_HEM_KEY, enabledStorageTypes);
if (hem) {
params.sha256 = encodeURIComponent(hem);
}

return params;
}

Expand Down Expand Up @@ -146,7 +152,7 @@ function handleSupplementalId(key, id, storageConfig) {
}

/** @type {Submodule} */
export const thirthyThreeAcrossIdSubmodule = {
export const thirtyThreeAcrossIdSubmodule = {
/**
* used to link submodule with config
* @type {string}
Expand Down Expand Up @@ -203,7 +209,9 @@ export const thirthyThreeAcrossIdSubmodule = {
}

if (!responseObj.envelope) {
deleteFromStorage(MODULE_NAME);
['', '_last', '_exp', '_cst'].forEach(suffix => {
deleteFromStorage(`${MODULE_NAME}${suffix}`);
});
}

if (storeFpid) {
Expand Down Expand Up @@ -246,4 +254,4 @@ export const thirthyThreeAcrossIdSubmodule = {
}
};

submodule('userId', thirthyThreeAcrossIdSubmodule);
submodule('userId', thirtyThreeAcrossIdSubmodule);
4 changes: 4 additions & 0 deletions modules/33acrossIdSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ The following settings are available in the `params` property in `userSync.userI
| pid | Required | String | Partner ID provided by 33Across | `"0010b00002GYU4eBAH"` |
| storeFpid | Optional | Boolean | Indicates whether a supplemental first-party ID may be stored to improve addressability, this feature is enabled by default | `true` (default) or `false` |
| storeTpid | Optional | Boolean | Indicates whether a supplemental third-party ID may be stored to improve addressability, this feature is enabled by default | `true` (default) or `false` |

### HEM Collection

33Across ID System supports user's hashed email, if available in storage.
Loading
Loading