Track custom page values with the Dotdigital Tag

Send custom data from your site to your Dotdigital account.

The best way to track custom data and interactions on your site when using the Dotdigital Tag is to set up custom events.

Learn more about the Events API.

However, there is an alternative, if less flexible, method.


Track custom key-value pairs

By default, the Dotdigital Tag sends the following information about a browsing session:

  • Session start time
  • IP address
  • Agent
  • Website
  • Number of pages viewed
  • Duration
  • Page title
  • Page URL
  • Date and time of visit

If you want to include more data than this so that, for example, you have more information available to use in segments or automations, then we provide the ability to submit custom page values with each page request.

Data that is passed as custom page values is always provided in a string/text format.

You can provide a series of key:value pairs along with the default track request:

// Tracks with custom key values (object with name/value pairs, only primitive types!)
window.dmPt('track', { 
    keyName1: 'Hello', 
    keyName2: 'World' 
});