Idlen Logo
Api

Events Reference

Complete reference for all Idlen Pixel events and parameters

Events Reference

Complete documentation of all events, parameters, and data types supported by the Idlen Pixel.

Event Types

The Idlen Pixel supports three main event types:

Event TypeDescriptionUse Case
PageViewPage or screen viewTrack navigation and engagement
ConversionGoal completionTrack signups, purchases, trials
CustomCustom eventTrack any user interaction

PageView Event

Track when a user views a page or screen.

Syntax

idlen('track', 'PageView');

Automatic Data

The following data is automatically captured:

FieldTypeDescription
urlstringCurrent page URL path
referrerstringPrevious page URL
timestampnumberEvent timestamp (Unix ms)
visitor_idstringAnonymous visitor identifier

Example

// Basic page view
idlen('track', 'PageView');

// The pixel automatically captures:
// {
//   url: '/pricing',
//   referrer: '/features',
//   timestamp: 1706400000000,
//   visitor_id: 'abc123-def456'
// }

Conversion Event

Track when a user completes a desired action.

Syntax

idlen('track', 'Conversion', {
  eventName?: string,
  value?: number
});

Parameters

ParameterTypeRequiredDescription
eventNamestringNoConversion category name
valuenumberNoMonetary value (e.g., purchase amount)

Standard Event Names

Use these standard names for better analytics:

Event NameDescriptionExample Value
signupUser registration-
trial_startFree trial activationMonthly price
purchaseCompleted purchaseOrder total
subscriptionSubscription startedMonthly/annual price
leadLead form submission-
downloadApp/file download-
demo_requestDemo requested-
contactContact form-

Examples

// Basic conversion
idlen('track', 'Conversion');

// Named conversion
idlen('track', 'Conversion', {
  eventName: 'signup'
});

// Conversion with value
idlen('track', 'Conversion', {
  eventName: 'purchase',
  value: 99.99
});

// Trial with potential value
idlen('track', 'Conversion', {
  eventName: 'trial_start',
  value: 29  // Monthly plan price
});

Custom Events

Track any custom user interaction.

Syntax

idlen('track', 'CustomEventName', {
  // Any custom properties
});

Examples

// Feature usage
idlen('track', 'FeatureUsed', {
  feature: 'export',
  format: 'csv'
});

// Video engagement
idlen('track', 'VideoWatched', {
  videoId: 'intro-video',
  duration: 120,
  completed: true
});

// Search performed
idlen('track', 'Search', {
  query: 'pricing',
  results: 5
});

// CTA clicked
idlen('track', 'CTAClicked', {
  location: 'hero',
  variant: 'primary'
});

Initialization Options

Configure the pixel behavior at initialization.

Syntax

idlen('init', 'ADVERTISER_ID', {
  debug?: boolean,
  autoTrack?: boolean,
  trackHash?: boolean,
  excludeRoutes?: string[]
});

Options

OptionTypeDefaultDescription
debugbooleanfalseEnable console logging
autoTrackbooleantrueAuto-track URL changes
trackHashbooleanfalseTrack hash changes
excludeRoutesstring[]Routes to exclude from tracking

Examples

// Production setup
idlen('init', 'YOUR_ADVERTISER_ID');

// Development with debugging
idlen('init', 'YOUR_ADVERTISER_ID', {
  debug: true
});

// SPA with manual tracking
idlen('init', 'YOUR_ADVERTISER_ID', {
  autoTrack: false
});

// Hash-based routing
idlen('init', 'YOUR_ADVERTISER_ID', {
  trackHash: true
});

// Exclude admin routes
idlen('init', 'YOUR_ADVERTISER_ID', {
  excludeRoutes: ['/admin/*', '/internal/*']
});

Data Schema

Event Payload

All events send the following payload to the server:

interface EventPayload {
  // Required
  aid: string;      // Advertiser ID
  vid: string;      // Visitor ID
  et: string;       // Event type (pageview, conversion, custom)
  ts: number;       // Timestamp (Unix ms)
  url: string;      // Page URL

  // Optional
  ref?: string;     // Referrer URL
  en?: string;      // Event name (for conversions)
  ev?: number;      // Event value (for conversions)
  ed?: object;      // Event data (for custom events)
}

Server Response

The tracking endpoint returns a 1x1 transparent GIF image for maximum compatibility with ad blockers and tracking prevention.

Privacy & Data Collection

What We Collect

DataStoredHashedPurpose
Page URLYesNoAnalytics
ReferrerYesNoAttribution
User AgentYesNoDevice stats
IP AddressNoYesGeo (country only)
Visitor IDYesNoSession tracking

What We Don't Collect

  • Personal information (name, email)
  • Third-party cookies
  • Cross-site tracking data
  • Fingerprinting data
Privacy-First: The Idlen Pixel is designed to be GDPR and CCPA compliant by default. No consent banner is required for basic analytics.

Rate Limits

LimitValueDescription
Events per second10Per visitor
Payload size4KBMaximum event data
Custom properties20Per event

Events exceeding these limits are silently dropped.

Error Handling

The pixel handles errors gracefully without affecting your application:

// Safe to call even if pixel not loaded
if (window.idlen) {
  idlen('track', 'Conversion', { eventName: 'signup' });
}

// Or use optional chaining
window.idlen?.('track', 'PageView');

Failed events are:

  1. Logged to console (in debug mode)
  2. Silently discarded (in production)
  3. Never retried (to prevent duplicate events)
Copyright © 2026