Conversions API (Facebook/Meta CAPI) Quick-Start Guide
Start sending Confection data to the Facebook/Meta Conversions API (CAPI) with a few simple steps.
Click “My Account” (or “Set Up My Account” if you’re accessing your account for the first time). Enter your contact information, the domain(s) on which you want to use Confection, and select one of our two data storage options. Then, click “Save Changes.”
Click "Install Confection" (If you're accessing your account for the first time, this will be the default screen.) Select your preferred langauge, CMS, platform, or framework to download the relevant scripts.
At this point, use the relevant language, framework, CMS, or platform quick start guide to get Confection up and running on your site or app. Then, continue with step four.
Help customers gain data independence by giving them control over their atomic-level digital marketing data – this is Confection’s mission. By generating their own pageview data, acquisition intel, and session intelligence, Confection customers operate independently of other tools and systems. These routinely fail because of browser and device disruptions involving cookies, cross-domain scripts, and device IDs.
As one of our customers recently asked, "Why would I use app scripts, pixels, or tags to generate my digital marketing data? I can't necessarily trust or audit them. Why wouldn't I just write my data to my own systems myself?"
Thanks to Confection, our customers can do exactly that: write high-fidelity data to CRMs, analytics tools, ad campaigns, and other meaningful endpoints. They're no longer dependent on scripts, pixels, or tags to generate their digital marketing data.
While our account API and lowcode/nocode connectors at Zapier, Pipedream, Make (Integromat), and Tray.io allow customers to write data just about anywhere, the majority of our customers do two things with Confection:
In effect, Confection enables customers to operate as their own analytics script and ad pixel. We have native integrations for UA, GA4, and Matomo. This guide focuses on the ways customers can use Confection and the Conversions API (CAPI) to amplify the performance and quality of their Facebook/Meta ads and audiences.
By ingesting high-quality, browser-based session intelligence and sending it to the CAPI, Confection customers can improve the precision of Meta reporting dashboards, enhance the learning experience of the Meta algorithm, and, ultimately, boost ROAS by improving ad performance, retargeting outcomes, and custom audience quality.
Confection automatically tracks the following kinds of events:
With a few lines of code, customers can also track eCommerce purchase events and send them directly to GA and Matomo. See this documentation for more information.
As we outline in our dashboard documentation, Confection also supports generic custom events. To submit a custom Confection event, use this syntax:
Add that above your site’s
</head> tag and below your Confection header code. For example, if you wanted to submit a custom event named click with a value of
1, you’d add this to your site:
As Meta documents here, events you submit to the CAPI must have a unique name. To ensure event data isn't duplicated or cross-pollinated, each event should also have a unique ID. With unique IDs in place, the CAPI can distinguish between similar – but distinct – events like purchases, downloads, and button clicks. Order numbers can serve as event IDs, but so can random alphanumeric strings (eg.,
Customers can easily modify generic Confection custom events so they contain unique IDs. For example, to modify the previous custom event example so it has a unique ID for the CAPI, we'd structure it as follows:
In this case,
click would be the CAPI event name, and
alphanumericIDhere would be the unique ID.
Sending eCommerce purchase events to the CAPI is even easier. These events already contain unique IDs that correspond with your system's order ID. You can see this in line three below:
If, for some reason, you want or need to use a different or additional event ID for the CAPI, you can send an additional event after the main
purchasedEvent. See line 27 below as an example where
purchasedCAPI is the event name and
alphanumericIDhere is the event ID.
Confection custom event values support JSON-encoded strings. This would allow you to send even more kinds of information to the CAPI. For convenience’s sake, here’s a template with common CAPI parameters that you can use to prepare your event submission. Find the complete list here.
Once you've prepared your events for the CAPI, you can send data into Meta from your Confection account API or your BigQuery dataset. (If you need to connect your Confection account to BigQuery, see our quick-start guide here.)
Questions or comments about using Confection with Conversions API (Facebook/Meta CAPI)? Leave them below.
You can also use the chat app in the lower right corner.