Skip to content

Create, Track and Manage Custom Dimensions

There are two steps to tracking custom dimensions in FirstHive CDP.

  1. Create and define the dimension – Plan ahead when creating custom dimensions, as each scope can have a limited number (depending on your FirstHive CDP version). Typically, you cannot delete a dimension—only deactivate it.
  2. Start collecting tracking data – This stage may require custom configuration depending on the data you want to capture.

Creating a Custom Dimension: Two Types

To access the Manage Custom Dimensions screen:

  1. Log in to FirstHive CDP as an admin.
  2. Go to Administration by clicking the cog icon in the top right.
  3. In the left menu, select Measurables > Custom Dimensions.

Custom dimensions can be edited by anyone with at least Write or Admin access for a specific website or app. Each site or app can have different custom dimensions.

Before creating a new custom dimension, choose the scope: Visit or Action.

Visit-Scoped Custom Dimensions

Visit-scoped dimensions are tied to a visitor’s session and can be sent with any tracking request. If a value changes during a visit, the last value set is recorded.

Example: Device type or app version a visitor is using.

Steps to Configure Visit Dimensions:

  • Define the dimension name and scope.
  • Ensure the Active checkbox is selected.
  • Click Create to enable the dimension.

Action-Scoped Custom Dimensions

Action-scoped dimensions are associated with specific actions, such as pageviews, downloads, or events.

Example: Track the language of a pageview or download.

Additional Option: Set up URL Extractions to automatically trigger dimension tracking based on page URLs. If not needed, this can be ignored.

Steps to Configure Action Dimensions:

  • Define the dimension name and scope.
  • Enable the Active checkbox.
  • Click Create to enable the dimension.

Tracking a Custom Dimension

Custom dimensions can be tracked via the JavaScript Tracker, PHP Tracker, or HTTP Tracker API. Other trackers may also support custom dimension tracking.

To find specific instructions:

  1. Go to Manage Custom Dimensions.
  2. Click the Edit button next to the dimension to see the tracking instructions.

Example (hard-coding a page author in JavaScript):

_paq.push([‘setCustomDimension’, 2, ‘Matthieu’]);

You can also dynamically set the value using a variable.

Note: Review developer documentation for your chosen tracker:

  • JavaScript Tracker – Custom Dimensions
  • PHP Tracker – Custom Dimensions
  • HTTP Tracker API – Custom Dimension Parameters

Using Extractions to Set Custom Dimension Values

For Action-scoped dimensions, you can automatically extract values from the Page URL, Page Title, or query parameters instead of setting them manually.

Example: A dimension named Language could automatically extract en from page_en.html using the regex:

page_(.{2}).html

Multiple extraction rules can be defined for one dimension. If the first rule doesn’t match, the system checks the next rule.

Deactivating a Dimension

If you no longer need a dimension, you can deactivate it.

  • Deactivated dimensions stop tracking data and generating reports, but previous data remains intact.
  • To reactivate, simply check the Active box again.

Steps to Deactivate a Dimension in FirstHive CDP:

  1. Log in as an admin.
  2. Click the cog icon to visit Settings.
  3. Click Custom Dimensions in the left menu.
  4. Click the Edit icon next to the dimension you want to deactivate.
  5. Uncheck the Active checkbox.
  6. Click Update to save your changes.