Big Crunch

Search Documentation

Search across all documentation pages

Key-Values

Configure custom key-value pairs to pass additional data to Big Crunch for targeting and reporting purposes.

The install snippet from Installation already initializes window.BCLighthouseTag and its cmd queue — you don't need to re-declare them. Drop your customizations in a <script> above the install snippet so they queue before the Big Crunch bundles evaluate. Anything you push into cmd executes as soon as the bundle is ready.

Set Account Type

Set acct_type to be passed into Big Crunch reporting:

<script>
  window.BCLighthouseTag = window.BCLighthouseTag || { cmd: [] };
  window.BCLighthouseTag.metadata = window.BCLighthouseTag.metadata || {};
  window.BCLighthouseTag.metadata.acct_type = "subscriber";
</script>

Use property-assignment (metadata.acct_type = ...) rather than replacing the whole metadata object — otherwise you'll overwrite the property_id the install snippet sets.

Available Account Type Values

  • guest - Non-authenticated visitor
  • logged_in - Authenticated user
  • paid - User with paid subscription
  • subscriber - Newsletter or content subscriber
  • free - Free account holder

Use Cases

Account type tracking enables:

  • Audience Segmentation - Analyze behavior by user type
  • Revenue Analysis - Compare monetization across user segments
  • Content Strategy - Understand which content resonates with each audience
  • Subscription Optimization - Track conversion funnels from guest to paid

Set key-values for GAM key-value reporting and targeting.

Key-values must also be created within Google Ad Manager for reporting and targeting to work properly.
<script>
  window.BCLighthouseTag = window.BCLighthouseTag || { cmd: [] };
  window.BCLighthouseTag.cmd.push(function () {
    BCLighthouseTag.setTargeting("website", "bigcrunch.com");
    BCLighthouseTag.setTargeting("acct_type", "subscriber");
  });
</script>

The cmd.push pattern works whether this runs before or after the install snippet: if the bundle hasn't loaded yet, your function queues up; if it's already loaded, it runs immediately.

Common Google Ad Manager Key-Value Examples

<script>
  window.BCLighthouseTag = window.BCLighthouseTag || { cmd: [] };
  window.BCLighthouseTag.cmd.push(function () {
    // Website identifier
    BCLighthouseTag.setTargeting("website", "bigcrunch.com");

    // User account type
    BCLighthouseTag.setTargeting("acct_type", "subscriber");

    // Content category
    BCLighthouseTag.setTargeting("category", "sports");

    // Page type
    BCLighthouseTag.setTargeting("page_type", "article");

    // Author
    BCLighthouseTag.setTargeting("author", "john-smith");
  });
</script>

Complete Example

<head>
  <!-- 1. Customizations (before the install snippet) -->
  <script>
    window.BCLighthouseTag = window.BCLighthouseTag || { cmd: [] };
    window.BCLighthouseTag.metadata = window.BCLighthouseTag.metadata || {};
    window.BCLighthouseTag.metadata.acct_type = "subscriber";

    window.BCLighthouseTag.cmd.push(function () {
      BCLighthouseTag.setTargeting("website", "bigcrunch.com");
      BCLighthouseTag.setTargeting("acct_type", "subscriber");
      BCLighthouseTag.setTargeting("category", "sports");
    });
  </script>

  <!-- 2. Big Crunch install snippet (see Installation) -->
</head>