Intempt
  1. Data Ingestion & Tracking
Intempt
  • Installation
    • Basic Intempt Installation
    • Create source
    • Web Snippet
    • Google Tag Manager
    • Autocapture setup
    • SPA tracking
    • Environment Setup
    • Validating Installation
  • SDK
    • JS SDK
    • Android SDK
    • iOS SDK
    • Node.js SDK
  • API Reference
    • Track data
      POST
    • Consent
      POST
    • Choose API
      POST
    • Recommendations Feed API
      POST
  • Data Ingestion & Tracking
    • identify()
    • track()
    • record()
    • alias()
    • group()
    • consent()
    • intempt:html / intempt:page / intempt:session
    • Product Catalog Ingestion via API
  • Data Models & Event Schema
    • Event Schema Overview
    • Required Fields
    • Attribute Schema
    • Product Catalog Schema
  • Webhooks
    • Webhook Configuration
  • Server Side Experiments
    • Overview
    • Choose API endpoint
    • Handling Experiment Response
  1. Data Ingestion & Tracking

track()

track()#

Purpose#

The track() method is used to log user actions and custom events inside your application.
It records event details based on the parameters you provide and stores them for:
analytics,
segmentation,
journeys,
personalization,
recommendation logic.
The event is stored only if:
The user has opted-in
The event data passes schema validation
Use track() for actions such as product views, button clicks, form interactions, or any measurable behavior.

Usage Example#

This example records a Product View event with additional metadata (ID, name, price).

Declaration#


Parameters#

Parameter Notes#

eventTitle — Required for all events.
data — Optional object with event metadata.
productId — Special optional field used for product ingestion.

Product Ingestion Support#

track() can also be used to push product catalog items into Intempt.
This method is useful when:
ingesting products from custom backends (e.g. WooCommerce, ERP, Headless CMS)
syncing product catalogs that do not use the “Catalog Source” UI
migrating data into the Recommendations engine

Important Validation Rules#

CaseRequirements
Normal user eventsproductId is not required
Product ingestion eventsproductId is required
If productId is provideduserId and profileId are not required
This allows you to ingest product catalog items without generating unnecessary user profiles.

Example — Product Ingestion via track()#

{
  "eventTitle": "ProductSync",
  "productId": "123",
  "data": {
    "name": "Red Wine",
    "price": 150,
    "categories": [
      { "id": 2300, "name": "Closed Reflex", "slug": "closed-reflex" }
    ],
    "images": [
      {
        "id": 11688,
        "src": "https://fieldsamerica.com/wp-content/uploads/2025/10/254418269.jpg"
      }
    ]
  }
}
This will ingest product data into Intempt without requiring user context.

Forbidden Event Titles#

The following event titles must NOT be used with track():
auto-track
view page
leave page
change on
click on
submit on
identify
consent
These are internal system event names used by Intempt’s auto-tracking engine.
Using them in custom tracking will cause conflicts and ingestion errors.

Summary#

track() is a flexible event ingestion method used for:
standard user events
behavioral tracking
UX interaction measurement
product catalog ingestion (using productId)
It supports both user-based analytics and catalog-based personalization.
Modified at 2025-12-03 15:05:21
Previous
identify()
Next
record()
Built with