Wexlyn
Back to the docs

Ad platforms

Connecting Meta Ads

Campaigns, ad sets, ads, daily spend, impressions, clicks, reported conversions. Where the credentials live, the connect steps, what becomes what in Wexlyn and how to check it.

Meta Ads is listed under Settings → Integrations → Meta Ads in Wexlyn. Campaigns, ad sets, ads, daily spend, impressions, clicks, reported conversions.

What Wexlyn reads

  • Campaigns, ad sets and ads with their names, status and thumbnails
  • Daily spend, impressions, clicks and the platform's own reported conversions, per ad account
  • Custom Audiences you choose to sync, and the Conversions API for the events you switch on

Before you start, in Meta Ads

  1. Sign in to the Facebook account that has admin or advertiser access to the ad accounts, through the Business Manager that owns them.
  2. Until Meta's App Review finishes, Wexlyn's app is in development mode: ask your Wexlyn contact to add your Facebook user as a tester before connecting.

Connect in Wexlyn

  1. Open Settings → Integrations → Meta Ads.
  2. Press Connect with Meta Ads and approve the access it asks for. The token refreshes itself; nothing to copy.

In Meta Ads, after connecting

  • Pick the ad accounts to track and set each account's currency on the Meta page in Wexlyn; spend for the last 90 days is imported and refreshed hourly.
  • Under the Conversions tab map Wexlyn events (lead, call booked, sale and so on) to your pixel's events and switch on the ones Meta should optimise on; the Match quality card shows how well they match.

Tag your ads

So every click carries the campaign, ad set and ad ids, every ad needs this line in its URL parameters field in Meta (Facebook / Instagram):

fbc_id={{adset.id}}&h_ad_id={{ad.id}}&h_campaign_id={{campaign.id}}
  1. In Ads Manager, open the ad for editing. The field is on the ad, not on the campaign or the ad set.
  2. Scroll down to the Tracking section.
  3. Paste the line into URL parameters (1) and publish the ad.

The app shows the same template with a copy button under Tracking → URL parameters. See URL parameters for the full list.

See which ads are tagged

Ads Manager can show each ad's URL parameters as a column, so a missing or wrong tag stands out without opening the ads one by one. Set it up once and save it.

  1. Go to the Ads tab (1), open Columns (2) and choose Customize columns (3). The column only exists for ads, not for campaigns or ad sets.

  1. Search for URL parameters (1) and tick it (2). It is added at the bottom of the list on the right (3).

  1. Drag URL parameters by its handle to the top of the list (1), so it sits right beside the ad's name.

  1. Open the arrow beside Save (1) and choose Save as new preset (2).

  1. Give the preset a name (1) and press Save (2).

Every ad now shows its tag beside its name (1). The preset stays under Columns (2), so you can switch back to it at any time.

A preview link shows one ad the way people see it, to someone who has no access to your ad account: a teammate, a client, or Wexlyn support when you want an ad checked.

  1. Open the ad for editing. Above the ad preview, open the share menu (1) and choose Share a link (2).

  1. Switch Link sharing on (1), pick how long the link stays active under Days Active (2), 30 or 60 days, then copy the link (3).

Anyone who has the link can see the preview until it expires. Switch link sharing off in the same window to end it sooner.

What becomes what

  • Every click on your ads carries fbclid and the URL parameters above, so visits, people, calls and sales are credited to the ad, ad set and campaign.
  • Spend and attributed revenue meet in every report: cost per lead, cost per call, ROAS per ad.
  • Conversions go back to Meta within seconds with the click id and hashed email, so campaigns optimise on real revenue.

Lead form ads

Leads from Meta's Instant Forms never land on a page, so the tracking script cannot see them. On the Meta page in Wexlyn, switch on Lead form ads: from that moment every lead a form collects becomes a person with the email and phone they typed, credited to the ad that produced them, tagged !meta-lead-form and !meta-lead-form-<form name>, and sent to your conversion events and audiences like any other lead. Choose every page the login manages or only some. New leads arrive within the hour; they arrive instantly once Meta's webhook is set up for the app. Nothing older than the moment you switched on is imported.

If Wexlyn says Meta did not grant the page permissions, press Reconnect at the top of the page: connections made before lead form tracking existed need to approve the page permissions once.

Sending leads from Wexlyn as well as the pixel

Most sites already send Lead from the browser pixel. Wexlyn can send the same lead from the server (richer match keys: hashed email and phone, click id, browser id, IP, browser, name, country) without Meta counting it twice: on any page that runs the Wexlyn script, the script gives the pixel's Lead call the event id wx_lead_<visitor>_<session> when the page has not set one, and the Lead Wexlyn sends for the opt-in it saw on that page carries the same id. Meta keeps one of the pair. Pages that already pass their own eventID keep it, and Wexlyn then sends its own id, so turn the browser Lead off or hand Wexlyn's id to it in that case. Leads that reach Wexlyn another way (a CRM webhook, an import) have no browser twin to dedupe against.

The script has to be on the page before the pixel sends its Lead, and a pixel that fires Lead as the page loads is quick. Two things make sure the script is there first:

  • Use the current script tag (Tracking → Universal Script, see Installing the script). It has one address for your whole site, so the browser keeps the script after the visitor's first page and runs it at once on every page after that, which is where a Lead normally fires (the page after the opt-in). A tag installed before 10 November 2026 ends in &ref_url= and loads from the network on every page; with it the pixel's Lead usually leaves first and Meta counts the lead twice.
  • Keep the same tag on every page of the funnel. A page with a different tag= value, or on a different domain, is a first load again.

A Lead that fires on the very first page a visitor ever loads (no earlier page with the script) can still leave before the script arrives. A Lead that fires on a form submit or a button is always in time. To check a page, open the browser's network tab, filter for facebook.com/tr and look for eid=wx_lead_ on the request with ev=Lead.

Check it works

After connecting, the Meta page lists the ad accounts with yesterday's spend. Open Reporting → Performance and pick Meta; campaigns appear with spend within a few minutes.

If something is off

  • No spend for a day: the hourly sync re-reads the last days each run; a gap closes on its own within the hour. A red banner on the integration page means the token could not be renewed: press Reconnect.
  • Wrong account or currency: pick the ad accounts to track and their currency on the integration page; reports convert everything to your reporting currency under Settings → Data.
  • Clicks not credited to ads: the URL parameters above are missing on some ads. Tracking → URL parameters shows which recent clicks arrived without ids.