intempt:html, intempt:page, intempt:session
Intempt automatically emits three browser-level DOM events for debugging, customization, enrichment, and advanced tracking logic.
intempt:html, intempt:page, intempt:session
Intempt automatically emits three types of browser-level events as native DOM events accessible via document.addEventListener(). These are designed for debugging, customization, enrichment, and advanced tracking logic — no additional setup required.
intempt:html — HTML Interactions
Captures DOM-level user interactions: clicks, input changes, and form submissions.
Use this event to:
- Inspect raw DOM interactions
- Add custom logic to clicks or input changes
- Debug auto-tracked behavior
- Trigger custom events based on user actions
document.addEventListener('intempt:html', (event) => {
const { detail } = event;
const { eventName, target } = detail;
if (eventName === 'click' && target.id === 'signup-btn') {
// Custom logic on signup button click
console.log('Signup button clicked');
}
});Available Properties
| Property | Type | Description |
|---|---|---|
eventName | string | DOM event type: "click", "change", or "submit" |
target | HTMLElement | The element involved in the interaction |
intempt:page — Page View Events
Tracks page-level activity including views, exits, and navigation context. Works in Single Page Applications (SPAs).
Use this event to:
- Track page views and exits manually
- Access page metadata (URL, title, time spent)
- Implement navigation-based custom logic
- Monitor SPA route changes
document.addEventListener('intempt:page', (event) => {
const { detail } = event;
const {
eventName,
fullUrl,
title,
windowWidth,
pageId,
duration,
previousPage
} = detail;
if (eventName === 'Leave page') {
console.log(`User spent ${duration}ms on ${title}`);
}
});Available Properties
| Property | Type | Description |
|---|---|---|
eventName | string | "View page" or "Leave page" |
fullUrl | string | Complete URL of the current page |
title | string | Page or document title |
windowWidth | number | Browser window width in pixels |
pageId | string | Unique identifier for this page view |
duration | number | Time spent on page in milliseconds (undefined for view events) |
previousPage | string | URL of the previously visited page |
intempt:session — Session Lifecycle Events
Emits events at session start and end with session-level metadata including location and activity volume.
Use this event to:
- Understand session boundaries
- Conduct session-level analytics
- Trigger logic at session start or end
- Analyze session duration and event counts
document.addEventListener('intempt:session', (event) => {
const { detail } = event;
const {
eventName,
region,
city,
country,
ip,
eventCounter,
duration,
type
} = detail;
if (type === 'sessionEnd') {
console.log(`Session ended after ${duration}ms with ${eventCounter} events`);
}
});Available Properties
| Property | Type | Description |
|---|---|---|
eventName | string | Event name within the session |
region | string | User's region (empty string if geo-blocked) |
city | string | User's city (empty string if geo-blocked) |
country | string | User's country (empty string if geo-blocked) |
ip | string | User IP address (empty string if blocked) |
eventCounter | number | Total events recorded in this session |
duration | number | Session duration in milliseconds (undefined for start events) |
type | string | "sessionStart" or "sessionEnd" |
Combining All Three Events
// Log all Intempt DOM events for debugging
['intempt:html', 'intempt:page', 'intempt:session'].forEach((eventType) => {
document.addEventListener(eventType, (event) => {
console.log(`[${eventType}]`, event.detail);
});
});How Intempt Works: A One-Page Mental Model
Understand Intempt's behavioral tracking framework — how automatic signals and manual API calls combine into a unified user behavior dataset.
Product Catalog Ingestion via API
Two methods for importing your product catalog into Intempt's Recommendations engine — catalog source feeds and direct API ingestion.
