Programmatic API
Send events directly via JavaScript using
window.pixelFlow.trackEvent(). Check the console output
to verify events are sent.
Quick Event Tracking
trackEvent()
// Example: Track a purchase event programmatically
await
window.pixelFlow.trackEvent('Purchase', { value:
299.00,
currency:
'USD',
contents: [ {
id:
'SKU-001',
quantity:
1,
item_price:
299.00 } ] });
Custom Event Builder
Event Configuration
Console Output
[--:--:--]
Ready to send events. Click "Send Event" or use quick buttons
above.
User Data Normalization
normalizeCustomerData()
Input User Data
Normalized Output
[--:--:--]
Click "Normalize Data" to see the result.
API Reference
| Method | Parameters | Description |
|---|---|---|
trackEvent() |
eventName, eventData?, userData? |
Send a tracking event with optional data and user info |
utils.normalizeCustomerData() |
userData |
Normalize and prepare customer data for Meta format |
Event Data Properties
| Property | Type | Description |
|---|---|---|
value |
number | Monetary value of the event |
currency |
string | ISO 4217 currency code (e.g., "USD") |
contents |
array |
Array of products: [{id, quantity, item_price}]
|
content_name |
string | Name of the content/page/product |
content_type |
string | Type of content (e.g., "product") |
search_string |
string | Search query for Search events |
User Data Properties
| Property | Type | Description |
|---|---|---|
em |
string | Email address (will be hashed) |
fn |
string | First name (will be hashed) |
ln |
string | Last name (will be hashed) |
ph |
string | Phone number (will be hashed) |
external_id |
string | Your internal customer ID |