Copy this snippet into your website’s <head> tag. Replace YOUR_PROJECT_ID with your ID from the Fidero dashboard.
Quick copy
What's happening?
Copy
<!-- Paste in your <head> tag --><!-- Replace YOUR_PROJECT_ID with your actual ID --><script> // prettier-ignore !function(){let e=window.fidero=window.fidero??{};if(e.initialised)return;if(e.invoked)return console.error("[Fidero] Snippet included multiple times");e.invoked=!0;let t={};e.ready=new Promise((e,r)=>{t.resolve=e,t.reject=r}),e.ready.resolve=t.resolve,e.ready.reject=t.reject,e.buffered=[],e.initArgs=null,e.init=function(){return e.initArgs=Array.prototype.slice.call(arguments),e.ready},["updateConsent","updateIdentity","page","track","reset"].forEach(t=>{e[t]=function(){let r=Array.prototype.slice.call(arguments);r.unshift(t),e.buffered.push(r)}}),e.load=t=>{let r=(t=t||"https://cdn.datahappy.co/sdk/v0.9/fidero.js").match(/.+sdk\/v?(.+)\/fidero.js/);null!==r&&r.length>=2&&(e.version=r[1]);let i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=t,(document.head||document.body).appendChild(i)}}() fidero.load() fidero.init("YOUR_PROJECT_ID") // 👈 Add your Project ID here fidero.page() // Tracks first page view, captures click IDs immediately</script>
This tiny snippet (< 1KB) automatically:
Loads asynchronously - Zero performance impact
Captures first page view - Attribution data immediately
Queues early events - Nothing lost whilst SDK loads
It’s smaller than most analytics pixels and loads without blocking your page.
Place the pixel in the <head>, not the <body>. We capture attribution data in the first milliseconds – including click IDs that disappear after redirects. Missing this first-page data means lost conversions.
Done! The pixel is now capturing page views, click IDs and attribution
context automatically. Check your Fidero dashboard – you should see page views
arriving in real-time.
Now track something that matters for your business:
Copy
// Signup event - creates unified user profilefidero.track({ event: "signup_completed", userId: "user_abc123", // Links all previous anonymous browsing to this user traits: { email: "alex@example.com", plan: "free_trial", },})
Copy
// Subscription event - the conversion you want to attributefidero.track({ event: "subscription_started", userId: "user_abc123", properties: { transaction_id: "sub_xyz789", // CRITICAL: Enables 98% deduplication value: 29.99, currency: "GBP", },})
Correctly implementing transaction_id is the key to achieving a
Duplicate-Block Rate of ≥98%. Use your unique subscription ID or payment
transaction ID.
That’s it. Within 24 hours, click IDs are preserved through redirects and campaign context flows to all your destinations.
Choose the implementation pattern that matches your architecture:
Stripe Hosted Checkout
Preserve attribution across checkout redirects
Web-to-app flows
Unify web signup with in-app engagement
Offline conversions
Track webhook events with full attribution
Pixel API reference
Complete SDK method reference
Want to understand how the architecture works? See Server-first
architecture for technical
details on Browser State Capture, identity resolution and consent enforcement.