Getting Started
Configuration
Configure the Idlen Pixel options
Configuration
For complete initialization options (autoTrack, trackHash, excludeRoutes) see Events Reference.
Initialization Options
idlen('init', 'YOUR_ADVERTISER_ID', {
debug: false, // Enable console logging
endpoint: null, // Custom endpoint (advanced)
});
| Option | Type | Default | Description |
|---|---|---|---|
debug | boolean | false | Enable console logging for debugging |
endpoint | string | https://pixel.idlen.io | Custom API endpoint (advanced use) |
Debug Mode
Enable debug mode to see detailed logs in the browser console:
idlen('init', 'YOUR_ADVERTISER_ID', { debug: true });
You'll see logs like:
[Idlen Pixel] Initialized { advertiserId: "adv_xxx", visitorId: "abc-123" }
[Idlen Pixel] Event sent: { type: "pageview", url: "/pricing" }
Content Security Policy (CSP)
If your website uses CSP, add these directives:
script-src 'self' https://pixel.idlen.io;
connect-src 'self' https://pixel.idlen.io;
Subresource Integrity (SRI)
For additional security, you can use SRI:
<script
src="https://pixel.idlen.io/v1/pixel.js"
integrity="sha384-..."
crossorigin="anonymous">
</script>
Contact support for the current SRI hash.