Big Crunch

Search Documentation

Search across all documentation pages

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.

The install snippet from Installation already initializes window.BCLighthouseTag and its cmd queue — you don't need to re-declare them. Drop your hashed-email push in a <script> above the install snippet so it runs before the first ad auction fires.

Step 1: Prepare Hash Data

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 subscription
  • guest - Guest user email
  • member - Registered member email
  • logged_in - Email from logged-in user

Supported Hash Types

  • SHA256 - 256-bit SHA-2 hash (recommended)
  • SHA1 - SHA-1 hash
  • MD5 - MD5 hash

Step 2: Set Hashed Email

Push a setHashedEmail call into BCLighthouseTag.cmd. It runs as soon as the bundle is ready, whether your <script> runs before or after the install snippet.

<script>
  window.BCLighthouseTag = window.BCLighthouseTag || { cmd: [] };
  window.BCLighthouseTag.cmd.push(function () {
    BCLighthouseTag.setHashedEmail(source, hashedEmailObject);
  });
</script>

Examples

Newsletter with SHA256 Hash

Example with a SHA256 email hash from an email newsletter:

<script>
  window.BCLighthouseTag = window.BCLighthouseTag || { cmd: [] };
  window.BCLighthouseTag.cmd.push(function () {
    BCLighthouseTag.setHashedEmail("newsletter", {
      SHA256: "c8923d25d12a2781f0efec7ca4f0319aa36ffa257d4f726c5c7fc7476e7975a7",
    });
  });
</script>

Logged-in User with MD5 Hash

Example with a MD5 email hash from a logged-in user:

<script>
  window.BCLighthouseTag = window.BCLighthouseTag || { cmd: [] };
  window.BCLighthouseTag.cmd.push(function () {
    BCLighthouseTag.setHashedEmail("logged_in", {
      MD5: "77f62e3d370151237a2b0dc593ca8e02",
    });
  });
</script>