Track page views

The REST endpoint used to track page views is https://in-automate.brevo.com/api/v2/trackPage and you can use the POST method to call this endpoint. You can use the cURL request mentioned below to send a request.

curl --request POST \
     --url https://in-automate.brevo.com/api/v2/trackPage \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'ma-key: ' \
     --data '
{
  "properties": {
    "Currency": "Euro"
  },
  "email": "[email protected]",
  "page": "Checkout"
}
'

The attributes for this endpoint are defined below in the table.

AttributeDatatypeDescriptionValue
emailStringEmail to identify the user[email protected]
pageStringPage nameCheckout page
propertiesObjectThis object will content all your custom fields. Add as many as needed. Keep in mind that those user properties will populate your database on the Marketing Automation platform to create rich scenarios(Currency, Euro)

Response

A sample successful response would be with no content and with a 204 response code. The details for response codes is mentioned below in a table.

Response codeMessageDescription
204Page has been tracked successfullyPage has been tracked but no JSON response with the 204 response code
400Bad requestBad request due to incorrect or missing parameters in the request.