Track page views
When you install Brevo Tracker on your website using, by default we already take care of tracking the page views. However, sometimes it can be useful to track virtual page views if the page doesn't really change (multi-steps form completion, modals etc.). For such cases, you can always fire the page view events yourself.
Brevo.page(
page_name, /*mandatory*/
properties /*optional*/
)
The attributes for tracking page views are below:
Attribute | Datatype | Description | Value |
---|---|---|---|
page_name | String | Name of your page | About Page |
properties | JSON object | JSON Object that describes the page context like page title or the visitors state like the visitors first and last name | 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.page(page_name, properties)
Updated about 2 months ago