Track page views

📘

Legacy Tracker Documentation

For the legacy tracker doc, check our guide here.

If you wish to track which pages your contacts are visiting, you can use the Brevo.page like this:

Brevo.push([
  "page",
      page_name, /* mandatory */
      properties /* optional */ 
]);

Parameters are defined below:

AttributeDatatypeDescriptionValue
page_nameStringName of your page"About Page"
propertiesJSON objectAdditional elements to describe the page context: page title for example{ “title”: “Page title” }

📘

Reserved keywords

In addition to any key-value pair, you can pass four reserved keywords beginning with the prefix ma_ in the properties object:

  1. ma_url: the full URL of the page, including the scheme.
  2. ma_path: the path of the page, i.e. the url without the scheme, the domain, the query string or the fragments.
  3. ma_title: the title of the page.
  4. ma_referrer: the referrer of the page.

If any of this parameter is not provided then the value will be taken from the current page.

Example

var page_name = 'homepage';

var properties = {
  'ma_title' : 'My Home Page',
  'ma_url' : 'http://www.example.com/home',
  'ma_path' : '/home'
};

Brevo.push([
  "page",
      page_name, /* mandatory */
      properties /* optional */ 
]);

What’s Next