Adwix AtlasPlatform

Ad attribution

Forward Meta's click ids with your website leads and the whole funnel connects: the enquiry, the booking and the payment all tie back to the exact ad that produced them.

Why bother#

When a visitor clicks a Meta ad to reach your site, Meta appends a click id (fbclid) to the URL and — when the Pixel runs — sets the _fbc and _fbp cookies. If your form forwards those with the lead, Atlas sends a server-side Lead conversion event immediately, and when that lead later pays, the Purchase event carries the same identity. Your ad account stops optimising for clicks and starts optimising for people who actually book trips.

The attribution fields#

FieldAccepted keysNotes
fbclidfbclidThe click id from the landing-page URL. Atlas builds the fbc value Meta expects from it automatically.
fbcfbc · _fbcThe Meta click cookie — send it as-is if the Pixel set it. Takes precedence over fbclid.
fbpfbp · _fbpThe Meta browser id cookie.
source_urlsource_url · page_url · url · referrer · landing_urlThe page the lead came from — included in the conversion event.

Drop-in snippet#

Collect attribution before posting the lead
// On your landing page, alongside the form fields:
function readCookie(name) {
  const m = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'))
  return m ? decodeURIComponent(m[1]) : ''
}

const data = Object.fromEntries(new FormData(form))
data.source = 'website'
data.source_url = location.href

// Meta click id from the ad URL (?fbclid=…)
const fbclid = new URLSearchParams(location.search).get('fbclid')
if (fbclid) data.fbclid = fbclid

// Meta browser cookies, if the Meta Pixel runs on your page
const fbc = readCookie('_fbc'); if (fbc) data.fbc = fbc
const fbp = readCookie('_fbp'); if (fbp) data.fbp = fbp

// …then POST data to your webhook as usual
All of this is optional — leads without attribution work perfectly. And leads from the native Meta Lead Ads integration carry attribution automatically; this page is for website forms reached from ads. One prerequisite for the full loop: your Meta integration must be connected in Settings, since that's where conversion events get their credentials.