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:
Attribute | Datatype | Description | Value |
---|---|---|---|
page_name | String | Name of your page | "About Page" |
properties | JSON object | Additional 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 theproperties
object:
ma_url:
the full URL of the page, including the scheme.ma_path:
the path of the page, i.e. the url without the scheme, the domain, the query string or the fragments.ma_title:
the title of the page.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 */
]);
Updated about 1 month ago
What’s Next