Skip to content

Events & Parameters

usertrax.push({
event: "purchase",
total: 99.99,
currency: "EUR",
});
usertrax.push({
event: "purchase",
event_id: "purchase_10001",
currency: "EUR",
value: 99.99, // alias for total
total: 99.99, // contract field
transaction_id: "10001", // order number
tax: 15.96,
shipping: 5.9,
items: [
{
item_id: "SKU-123",
item_name: "iPhone 15 Pro",
item_brand: "Apple",
item_category: "smartphones",
price: 47.05,
quantity: 2,
},
],
user_data: {
email: "user@example.com",
customer_id: "cust_12345",
},
});
usertrax.push({
// Required parameters
event: "purchase",
total: 99.99,
currency: "EUR",
// Optional parameters
id: "purchase_order_12345", // dedupe / CAPI event_id (alias: event_id)
event_id: "purchase_order_12345",
transaction_id: "order_12345",
label: "iPhone 15 Pro",
tax: 15.96,
shipping: 5.9,
// Attribution parameters (auto-captured)
gclid: "abc123def456",
fbclid: "fb.123.456.789",
msclkid: "ms123456789",
ttclid: "tt123456789",
// UTM parameters
utm: {
utm_source: "google",
utm_medium: "cpc",
utm_campaign: "summer_sale",
utm_term: "iphone",
utm_content: "banner_ad",
},
// GA4 items[]
items: [
{
item_id: "iphone_15_pro",
item_name: "iPhone 15 Pro",
item_brand: "Apple",
item_category: "smartphones",
price: 99.99,
quantity: 1,
},
],
// Custom metadata
metadata: {
plan: "pro",
},
// User data
user_data: {
email: "user@example.com",
name: "John Doe",
phone: "+1234567890",
customer_id: "cust_12345",
},
});
ParameterTypeRequiredDescription
eventstringYesEvent name (e.g. "purchase", "add_to_cart", "view_item")
totalnumberNoConversion value/amount (primary contract)
valuenumberNoAlias for total (GA4-style; normalized to total)
currencystringNoCurrency code (default: "EUR")
idstringNoDedupe ID (server/event_id, Meta eventID)
event_idstringNoPreferred dedupe ID (event_id ?? id)
transaction_idstringNoOrder number (ads transaction_id, Meta/CAPI order_id)
labelstringNoHuman-readable label
taxnumberNoTax portion
shippingnumberNoShipping cost
shipping_tierstringNoShipping method
payment_typestringNoPayment method
couponstringNoCoupon code
itemsarrayNoGA4 ecommerce items (item_id, item_name, price, quantity, …)
ParameterTypeDescription
gclidstringGoogle Ads Click ID
gclsrcstringGoogle Ads Click Source
dclidstringDisplay & Video 360 Click ID
fbclidstringFacebook Ads Click ID
fbcstringFacebook Browser Cookie
fbpstringFacebook Browser Parameter
msclkidstringMicrosoft Ads Click ID
ttclidstringTikTok Ads Click ID
adcellstringAdcell Tracker ID
ParameterTypeDescription
utm_sourcestringTraffic source (e.g., “google”, “facebook”)
utm_mediumstringMarketing medium (e.g., “cpc”, “email”)
utm_campaignstringCampaign name
utm_termstringKeywords for paid search
utm_contentstringContent variation for A/B testing
ParameterTypeDescription
metadataobjectCustom JSON data for the conversion
user_dataobjectUser information (email, name, etc.)
<button
data-usertrax="purchase"
data-usertrax-total="99.99"
data-usertrax-currency="EUR"
data-usertrax-id="order_12345"
data-usertrax-label="iPhone 15 Pro"
>
Buy Now
</button>
<button
data-usertrax="signup"
data-usertrax-total="0"
data-usertrax-currency="EUR"
data-usertrax-meta-data='{"plan": "premium", "source": "landing_page"}'
data-usertrax-user-data='{"email": "user@example.com"}'
>
Start Free Trial
</button>
AttributeDescription
data-usertraxEvent name
data-usertrax-totalConversion value
data-usertrax-valueAlias for data-usertrax-total
data-usertrax-currencyCurrency code
data-usertrax-idEvent identifier
data-usertrax-labelEvent label
data-usertrax-meta-dataJSON string with custom data
data-usertrax-user-dataJSON string with user information