Identity
If user identity information is available in the form of a hashed email, you can pass the hash along with the source of the hash for reporting to Big Crunch.
It is recommended that the following code be placed before the general Big Crunch script to ensure that when a hashed email is available, it is set before ad unit auctions begin.
Step 1: Initialize BCLighthouseTag
First, if not already defined, define the following variables:
window.BCLighthouseTag = window.BCLighthouseTag || {};
window.BCLighthouseTag.cmd = window.BCLighthouseTag.cmd || [];
Step 2: Prepare Hash Data
After defining the BCLighthouseTag variables, if a hashed email is available (for example, from a newsletter or if the user is a member and logged-in), set a value for the source of the hashed email and provide the hashed email.
source = ENUM("newsletter", "guest", "member", "logged_in");
hashedEmailObject = {
SHA256: "hash",
SHA1: "hash",
MD5: "hash",
};
Available Source Values
newsletter- Email collected from newsletter subscriptionguest- Guest user emailmember- Registered member emaillogged_in- Email from logged-in user
Supported Hash Types
SHA256- 256-bit SHA-2 hash (recommended)SHA1- SHA-1 hashMD5- MD5 hash
Step 3: Set Hashed Email
The variables are then provided in the setHashedEmail function:
window.BCLighthouseTag.cmd.push(function () {
BCLighthouseTag.setHashedEmail(source, hashedEmailObject);
});
Examples
Newsletter with SHA256 Hash
Example with a SHA256 email hash from an email newsletter:
window.BCLighthouseTag.cmd.push(function () {
BCLighthouseTag.setHashedEmail("newsletter", {
SHA256: "c8923d25d12a2781f0efec7ca4f0319aa36ffa257d4f726c5c7fc7476e7975a7",
});
});
Logged-in User with MD5 Hash
Example with a MD5 email hash from a logged-in user:
window.BCLighthouseTag.cmd.push(function () {
BCLighthouseTag.setHashedEmail("logged_in", {
MD5: "77f62e3d370151237a2b0dc593ca8e02",
});
});