Features
Conversion Tracking
Track conversions and measure campaign performance
Conversion Tracking
Track conversions to measure the effectiveness of your ad campaigns.
Idlen ads add idlen_cid (and idlen_ad) to the landing URL. The pixel stores that click for 30 days and attaches later conversions to the campaign. You do not need to read the query string yourself.
Basic Conversion
idlen('track', 'Conversion');
Named Conversion
Add a name to categorize your conversions:
idlen('track', 'Conversion', {
eventName: 'signup'
});
Conversion with Value
Track revenue or monetary value:
idlen('track', 'Conversion', {
eventName: 'purchase',
value: 99.99
});
Common Event Names
| Event Name | Use Case |
|---|---|
signup | User registration |
trial_start | Free trial activation |
purchase | Completed purchase |
lead | Form submission |
download | App or file download |
subscribe | Newsletter signup |
Implementation Examples
Signup Form
const form = document.getElementById('signup-form');
form.addEventListener('submit', async (e) => {
e.preventDefault();
const result = await submitSignup(formData);
if (result.success) {
idlen('track', 'Conversion', { eventName: 'signup' });
// Redirect to dashboard
}
});
E-commerce Purchase
async function completePurchase(cart) {
const order = await processPayment(cart);
if (order.success) {
idlen('track', 'Conversion', {
eventName: 'purchase',
value: order.total
});
// Show confirmation
}
}
Trial Activation
async function startTrial(plan) {
const trial = await activateTrial(plan);
if (trial.active) {
idlen('track', 'Conversion', {
eventName: 'trial_start',
value: plan.monthlyPrice // Track potential value
});
}
}
Best Practice: Only fire conversion events after the action is confirmed successful (e.g., after API response), not on button click.