Track page views

Legacy Tracker Documentation

For the legacy tracker doc, check our guide here.

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

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

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

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]);