Measure
Meta Conversions API
Send conversions from Sporetag to Meta with the Conversions API. Paste a pixel id and access token, mark goals, test with a test event code.
The Meta Conversions API lets you send conversions to Meta from a server instead of only from the pixel in the browser. Blockers and short cookie lifetimes make the browser pixel miss sales. Server events fill the gap, and Meta can match them back to the ad.
Sporetag does the server part for you. You paste two values, mark which goals to send, and Sporetag sends them. It is on paid plans: Solo, Studio, Agency and Custom. Free does not include it.
What you need
- A Meta pixel for your site. Meta also calls it a dataset.
- Its pixel id, a number.
- An access token for the Conversions API.
Get the access token
- Open Meta Events Manager.
- Pick your pixel (dataset) in the list on the left.
- Open the Settings tab.
- Scroll to Conversions API and find Set up manually.
- Press Generate access token. Copy it right away. Meta shows it once.
The pixel id is at the top of the same Settings tab.
Connect a site
- Open the site in Sporetag, then the Integrations tab.
- Under Meta Conversions API, paste the pixel id and the access token.
- Press Save.
The token is encrypted before it is stored. Nobody can read it back in the dashboard, not even you. To replace it, paste a new one. Disconnect deletes it.
If the setup card says Meta sending is not switched on yet, the server is missing its encryption key. That is ours to fix, not yours.
Choose what to send
In the same card, under Goals to send, tick each goal you want and pick its Meta event:
| Meta event | Use it for |
|---|---|
Purchase | A paid order |
Lead | A form or a quote request |
CompleteRegistration | A signup |
AddToCart | An item added to the cart |
InitiateCheckout | The start of checkout |
Subscribe | A paid subscription or a newsletter |
Contact | A call, chat or email |
| Custom | Any other name, letters and digits |
Press Save goals. From then on, every match of the goal goes to Meta, from the browser and from the Events API.
What each event carries
event_name,event_timeandevent_id.action_sourceset towebsite, andevent_source_url: the page, without its query string.client_ip_addressandclient_user_agentof the visitor.fbc, from thefbclidon the landing page or Meta's_fbccookie, andfbpfrom Meta's_fbpcookie, when present.emandph: email and phone, normalized and SHA-256 hashed, when you sent them with the Events API.external_id: the SHA-256 hash of the visitor's first-party id, or of thevisitor.idyou sent.value,currencyandorder_id, when the event has them.
The raw email and phone never leave your server unhashed, and Sporetag never stores them.
Count once with the pixel
If your pages also run the Meta pixel, Meta would count the same sale twice. It counts once when both sides send the same event name and the same event id. Make the id in the page and give it to both:
const id = crypto.randomUUID();
fbq('track', 'Purchase', { value: 49, currency: 'USD' }, { eventID: id });
sporetag('Purchase', { event_id: id, value: 49, currency: 'USD' });From your server, send the same id as event_id in the Events API. An order id works well, such as order-1042, if the page uses it too.
A goal on a page visit (such as /thanks) gets an id Sporetag makes up, which the pixel cannot know. Send that conversion from one side only.
Test it
- In Events Manager, open your pixel, then the Test events tab.
- Copy the test event code, such as
TEST12345. - Paste it into Test event code in Sporetag and save.
- Trigger the goal on your site. It shows in Meta's Test events tab within a minute.
While a test code is saved, Meta treats every event as a test. Remove the code when you are done.
The delivery log
Delivery log lists the last 100 sends, newest first, with Meta's answer for each one. Failed shows only those that did not get through.
- Sends that fail for a passing reason (Meta busy, a network error) retry after 1, 2, 4, 8 minutes and so on, up to 6 hours apart, for 24 hours. Then they show as Gave up.
- Sends Meta refuses for good (a bad field) show as Failed.
- If Meta refuses the token, sends wait as Waiting until you save a new token. They then go out, if they are under 24 hours old.
The log never shows the token, the IP address or any email or phone.
Consent
Sending the visitor's IP address, browser and click ids to Meta shares personal data with Meta. In the EU and UK this usually needs consent, whatever mode the site is in. In Attribution mode with Wait for consent on, browser events go to Meta only after sporetag('consent', true). See Tracking modes.
Match quality
Meta matches better with more to go on. In Private mode, click ids live only for the visit, so a sale on a later day has no fbclid. Use Attribution mode to keep click ids for 90 days, and send email or phone from your server with the Events API.
Google Ads
Sending offline conversions to Google Ads is planned for after v1 (when shipped).
Something missing or wrong? Email hello@sporetag.com.