Page
The Page Tracking feature enables you to monitor user interactions with your website by recording page views and associated properties
The page call records when a user views a specific page on your website,
along with optional properties that provide additional context about the page.
Example JavaScript Page
Call
lmSMTObj.page("contactUs", { "path": "/contact/", "title": "Contact Us", "url": "https://example.com/contact" }, { "trackerId": "1234abcd-5678-efgh-9101-ijklmnopqrst" }, function() {})
Sample Page Event
Payload
{
"id": "unique_event_id",
"userId": "1234abcd-5678-efgh-9101-ijklmnopqrst",
"otherIds": {
"_fbp": "facebook_pixel_id",
"_fbc": "facebook_click_id",
"_ga": "google_analytics_id",
"trackerId": "1234abcd-5678-efgh-9101-ijklmnopqrst"
},
"context": {
"library": {
"name": "javascript",
"version": "0.01"
},
"userAgent": {
"deviceType": "DESKTOP",
"osType": "Linux",
"osVersion": "Linux",
"browser": "Chrome",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
},
"ip": "108.0.78.21",
"utm": {
"campaign": "Communication",
"source": "Website",
"medium": "email",
"term": "Campaign Term",
"content": "Campaign Content"
}
},
"name": "contactUs",
"messageId": "unique_message_id",
"properties": {
"path": "/contact/",
"referrer": "",
"search": "",
"title": "Contact Us",
"url": "https://example.com/contact"
},
"receivedAt": "2024-12-16T19:11:01.266Z",
"sentAt": "2024-12-16T19:11:01.169Z",
"timestamp": "2024-12-16T19:11:01.249Z",
"type": "page",
"originalTimestamp": "2024-12-16T19:11:01.152Z",
"writeKey": "your_write_key"
}
This payload includes the user's unique identifier, additional identifiers (such as tracker ID), context information (like user agent and IP address), UTM parameters for campaign tracking, and page properties.
By utilizing the page call, you can gain deeper insights into user behavior
and interactions on your website, enabling more effective analysis and optimization of the
user experience.