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:

1Brevo.push([
2 "page",
3 page_name, /* mandatory */
4 properties /* optional */
5]);

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

1var page_name = 'homepage';
2
3var properties = {
4 'ma_title' : 'My Home Page',
5 'ma_url' : 'http://www.example.com/home',
6 'ma_path' : '/home'
7};
8
9Brevo.push([
10 "page",
11 page_name, /* mandatory */
12 properties /* optional */
13]);