Measure the real impact of your ad campaigns by tracking conversion events. Attribute purchases, signups, and custom goals back to the campaigns and creatives that drove them.
Conversion tracking connects user actions (purchases, signups, page views) back to the ad campaigns that influenced them. This allows you to calculate Return on Ad Spend (ROAS), optimize bidding strategies, and allocate budget to the highest-performing campaigns.
EventZR supports four built-in conversion types and unlimited custom conversions. Each type has specific parameters that enrich attribution reporting.
| Type | Description | Key Parameters |
|---|---|---|
| purchase | Completed transaction with monetary value | value, currency, orderId, items |
| signup | User registration or account creation | method, userId |
| pageview | High-value page view (e.g., pricing page) | url, contentId, contentType |
| custom | Any custom goal (form submit, download, etc.) | eventName, metadata (key-value pairs) |
If you have the EventZR retargeting pixel installed, you can fire conversion events directly from the browser. This is the simplest setup and works well for most use cases.
// Fire a purchase conversion after checkout
ezrp('track', 'purchase', {
value: 149.99,
currency: 'USD',
orderId: 'order_98765',
campaignId: 'cmp_xyz789', // Optional: override auto-attribution
items: [
{ id: 'ticket_vip', name: 'VIP Pass', price: 149.99, quantity: 1 }
]
});
// Fire a signup conversion
ezrp('track', 'signup', {
method: 'google_oauth',
});
// Fire a custom conversion
ezrp('track', 'custom', {
eventName: 'brochure_download',
metadata: { fileId: 'doc_abc', format: 'pdf' },
});The pixel automatically includes the visitor ID and session context for attribution. See the Retargeting Guide for pixel installation instructions.
For higher accuracy and fraud prevention, send conversion events from your backend using the Ads API or SDK. Server-side events are not affected by ad blockers and provide stronger data integrity.
import { AdsClient } from '@eventzr/ads-client';
const client = new AdsClient({
baseUrl: 'https://api.eventzr.com/ads/v1',
tenantId: '<your-tenant-id>',
accessToken: '<jwt>',
});
// Track a purchase conversion server-side
const conversion = await client.conversions.create({
type: 'purchase',
value: 149.99,
currency: 'USD',
orderId: 'order_98765',
userId: 'usr_abc123', // Your internal user ID
visitorId: 'ezr_v_xyz789', // From pixel cookie (optional)
campaignId: 'cmp_xyz789', // Optional: explicit attribution
timestamp: new Date().toISOString(),
metadata: {
plan: 'pro',
source: 'checkout',
},
});
console.log('Conversion ID:', conversion.data.id);
// => conv_def456// Track multiple conversions in a single API call
const batch = await client.conversions.createBatch({
conversions: [
{
type: 'purchase',
value: 49.99,
currency: 'USD',
orderId: 'order_111',
userId: 'usr_aaa',
timestamp: '2026-03-09T10:00:00Z',
},
{
type: 'signup',
userId: 'usr_bbb',
metadata: { method: 'email' },
timestamp: '2026-03-09T10:05:00Z',
},
{
type: 'custom',
eventName: 'form_submit',
userId: 'usr_ccc',
metadata: { formId: 'contact_us' },
timestamp: '2026-03-09T10:10:00Z',
},
],
});
console.log('Tracked:', batch.data.count, 'conversions');All conversion tracking endpoints. Requires JWT authentication and x-tenant-id header.
| Method | Path | Description | Auth |
|---|---|---|---|
| POST | /ads/v1/conversions | Track a conversion event | Yes |
| GET | /ads/v1/conversions | List conversion events with filters and pagination | Yes |
| GET | /ads/v1/conversions/:id | Get conversion event details by ID | Yes |
| POST | /ads/v1/conversions/batch | Track multiple conversions in a single request | Yes |
| GET | /ads/v1/conversions/:id/report | Get attribution report for a conversion event | Yes |
| GET | /ads/v1/reports/conversions | Aggregated conversion report across campaigns | Yes |
{
"type": "purchase",
"value": 149.99,
"currency": "USD",
"orderId": "order_98765",
"userId": "usr_abc123",
"visitorId": "ezr_v_xyz789",
"timestamp": "2026-03-09T14:30:00Z",
"metadata": {
"plan": "pro",
"source": "checkout"
}
}{
"data": {
"id": "conv_def456",
"type": "purchase",
"value": 149.99,
"currency": "USD",
"orderId": "order_98765",
"attributedCampaignId": "cmp_xyz789",
"attributedCreativeId": "cre_pqr321",
"attributionModel": "last_click",
"attributionWindow": "7d",
"timestamp": "2026-03-09T14:30:00Z",
"createdAt": "2026-03-09T14:30:01Z"
},
"meta": { "request_id": "req_ghi789" }
}// Get detailed attribution report for a specific conversion
const report = await client.conversions.getReport('conv_def456');
console.log(report.data);
// {
// conversionId: 'conv_def456',
// touchpoints: [
// { type: 'impression', campaignId: 'cmp_xyz789', creativeId: 'cre_pqr321',
// timestamp: '2026-03-07T09:00:00Z', channel: 'display' },
// { type: 'click', campaignId: 'cmp_xyz789', creativeId: 'cre_pqr321',
// timestamp: '2026-03-08T15:30:00Z', channel: 'display' },
// { type: 'conversion', timestamp: '2026-03-09T14:30:00Z',
// value: 149.99, currency: 'USD' },
// ],
// attribution: {
// model: 'last_click',
// campaignId: 'cmp_xyz789',
// creativeId: 'cre_pqr321',
// confidence: 0.95,
// },
// timeToConvert: '2d 5h 30m',
// }The attribution window defines how far back EventZR looks to find ad interactions (impressions and clicks) that may have led to a conversion. Configure windows per campaign or use the account-level defaults.
| Window | Click Attribution | View-Through Attribution | Best For |
|---|---|---|---|
| 1 day | 24 hours | 24 hours | Impulse purchases, flash sales |
| 7 days (default) | 7 days | 1 day | Most e-commerce and ticketing |
| 14 days | 14 days | 1 day | Higher-value purchases |
| 28 days | 28 days | 7 days | Long consideration cycles, B2B |
| 90 days | 90 days | 7 days | Enterprise, high-ticket events |
Attribution models determine how credit for a conversion is distributed across the ad touchpoints that led to it. Choose a model that aligns with your measurement goals.
100% credit goes to the last ad click before the conversion. Best for direct-response campaigns where you want to identify the final trigger.
100% credit goes to the first ad click in the conversion path. Best for measuring which campaigns are most effective at introducing new users.
Credit is distributed equally across all touchpoints. Best for understanding the full customer journey when all interactions contribute equally.
More credit is given to touchpoints closer to the conversion. Uses a 7-day half-life. Best for campaigns where recent interactions are more influential.
40% credit to the first touchpoint, 40% to the last, and 20% distributed across the middle. Best for valuing both discovery and closing interactions.
// Set attribution model when creating or updating a campaign
await client.campaigns.update('cmp_xyz789', {
attributionModel: 'time_decay',
attributionWindow: '14d',
viewThroughWindow: '1d',
});Client-side pixels can be blocked by ad blockers. For revenue-critical conversions like purchases, always send a server-side event as the source of truth.
Always include an orderId or unique transaction identifier. EventZR automatically deduplicates conversions with the same orderId within a 24-hour window.
Attach value and currency to every conversion where applicable. This enables accurate ROAS calculation and bid optimization.
Fire conversion events as close to the actual conversion time as possible. Delayed events may fall outside the attribution window.
After setup, use GET /ads/v1/conversions to verify events are being recorded correctly before relying on attribution reports.
When migrating from another platform, use POST /ads/v1/conversions/batch to import historical conversion data with accurate timestamps.