Track page views

View as Markdown
Legacy Tracker Documentation

For the legacy tracker doc, check our guide here.

To track which pages your contacts visit, use Brevo.page:

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

Parameters:

AttributeDatatypeDescriptionValue
page_nameStringName of your page”About Page”
propertiesJSON objectAdditional elements describing the page context — e.g. page title{ "title": "Page title" }
Reserved keywords

In addition to any key-value pair, you can pass four reserved keywords prefixed with 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 (the URL without the scheme, domain, query string, or fragments).
  3. ma_title: the title of the page.
  4. ma_referrer: the referrer of the page.

If any of these parameters is not provided, the value is 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 */
]);