Track page views
When you install Sendinblue 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.
sendinblue.page(
page_name, /*mandatory*/
properties /*optional*/
)
page_name
: the name of your pageproperties
: is a JSON object where you can pass any properties that describe the context of the page (ex. page title) or your visitor's state (ex. first name, last name, age, etc.)
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 schemema_path
: the path of the page, i.e. the url without the scheme, the domain, the query string or the fragmentsma_title
: the title of the pagema_referrer
: the referrer of the pageIf 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'
}
sendinblue.page(page_name, properties)
Updated over 3 years ago