Installing and tracking
Tracking overview
Understand the single PageDuel snippet that powers analytics, experiments, goals, and revenue.
The lightweight pd.js script identifies the site from its data-key, records pageviews and events, and batches delivery. It loads the experiment bundle only when the site has active experiment configuration.
PageDuel recognizes traditional page loads and SPA route changes. A first-party visitor ID connects visits, experiment assignments, conversions, and revenue. First-touch referrer and UTM values are retained for acquisition reporting.
Use browser tracking for client-visible actions and the write-key API for authoritative server events. Do not report the same conversion through both methods.