How To Send Conversions To Facebook/Meta via Conversion API (CAPI)
This article explains how to send a trigger a conversion in Facebook via their Conversion API – commonly referred to “CAPI” each time a user submits a Growform form.
With browsers increasingly blocking cookies and privacy restrictions tightening, Facebook’s trusty pixel isn’t as reliable as it once was. Enter CAPI: Facebook’s server-to-server solution that lets you to track conversions even when traditional tracking methods fall short.
By securely sending server-to-server information to Facebook – like hashed email addresses and IP addresses – their platform can match form submissions to individual users without relying on cookies.
This guide doesn’t require coding experience, thanks to our integrations partner, Zapier – which has a generous free plan and affordable plans for a few thousand tasks per month.
Table of Contents
1. Capture IP address and user agent in Growform
First, you’ll need to enable IP address and user-agent collection in Growform. The “user-agent” is a standardised description of the user’s browser (eg: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36), whilst the IP address is the Internet equivalent to the user’s phone number.
Although it’s possible to enable CAPI tracking without this, it will provide a better match and is one of the most best signals available. Here’s how:
- Navigate to your form in Growform
- Hit “Edit form settings”
- Choose “Capture system details”
- Hit “Save form settings”
Please note that in some jurisdictions, you may need to seek permission of your users before capturing uniquely identifiable information such as IP address.
With this setting enabled, Growform will capture IP address and user-agent – and these will be available alongside the other fields in the next steps.
2. Run a test submission
Once you’ve enabled IP address and user-agent collection, it’s important to run a test submission, as this will allow Zapier to “see” the new data we’re capturing in the next step.
Go ahead and test out your form by hitting “View form” (or visiting its embed location) and filling it in.
Once you’ve submitted a lead, you should see the user-agent and IP address alongside the other form information on the “view leads” page:
From now on, these fields will also be selectable in Zapier, alongside all other fields.
3. Create a zap
Now, log in to Zapier (creating an account if necessary) and hit “Create” to create a new Zap. If you’re new to Zapier, we have a generic guide on using the platform here.
Set up the Growform trigger, like so:
- Set your trigger as Growform
- Set the trigger event as New form submission
- Select your Growform account and connect Growform to Zapier if necessary
- Set the Form ID to the relevant form, and hit “Test trigger” to see the last submission in Zapier
Setting up the Facebook / CAPI conversion
Now we have our data from Growform, it’s time to send a conversion event to Facebook/Meta. Here’s how:
- Hit “Action”, and search “Facebook conversions”. Choose “Facebook conversions for business admins“, assuming you have a business admin account. If not, choose “Facebook conversions”.
- For action event, choose Send other event for most use-cases (eg. “CompleteRegistration”, “AddToCart” or a custom event. If you need to fire a “Purchase” or “Lead” event, choose the relevant option – but note that this guide will continue with Send other event.
Hit “Continue”, and you’ll see a list of fields you can send to Facebook. Here are the important fields:
- Action source: Should be set to “Website”.
- Event name: Should be set to the event you wish to send (eg. AddToCart or CompleteRegistration). Do NOT choose “Purchase” or “Lead” if you chose “Send other event” on the previous step, as this will not work – instead, you should go back and alter your selection to the appropriate event.
- Event time: If your zap is running every 2 minutes, you simply can leave this value blank, as Zapier will use the time of the zap, which will be very close to the time of the event. If you’re on 15 minute polling, or aren’t sure, you should send the time of the form submission in UNIX format (see below).
- Event source URL: If possible, this should be set to the website you’ve embedded the form on. This field is required if you chose “Website” as the action source.
- Customer information: This is the customer information that will be used for matching. You should simply map as much customer information as you have available (eg. email address, phone number, name). There’s no need to “hash” this – Zapier will take care of this automatically.
We’d recommend at least sending:
- Client IP Address
- User-Agent
If you followed steps 1 and 2 correctly, you will be able to select the IP address and user-agent along with all other form data:
That’s it! Go ahead and hit “Continue”, then “Test step”. You should see a response like the following, and without any error messages:
That’s it! Our event has successfully been sent to Meta. Next, we’ll double check it’s arrived safely in the Facebook Business Manager interface. If you saw an error at this stage, no worries – just see “troubleshooting”, below.
4. Check your event in Facebook
If, while on Facebook’s “Event Manager”, you see a warning asking you to allow or block any events from Growform or a domain you recognise, you must hit allow in order for the events to be received successfully.
Facebook have an up-to 30 minute delay on event tracking – so if you successfully sent your event in the previous step but don’t yet see it, come back in half an hour. In our experience, events do take 15-20 minutes to appear!
- Navigate to business.facebook.com, and go to “Events manager”. At time of writing, this is accessed by hitting “All tools”, and then “Events manager”.
- Ensure you’re on the correct account that you sent the data to – sometimes you may need to toggle accounts in the top-right corner, and even hit “See more ad accounts”.
- Under “Data sources”, choose your pixel, and look for the event name you sent earlier. If you see the correct event name, you should see “Multiple” or “Conversions API” under the “Integration” column – this means that the event was successfully received via API.
Here’s the backend event, shown in our own account:
Optional: Sending the time of form submission in UNIX format
If you wanted to send the time of the form submission through to Zapier, you’ll also need to convert this to “X” or “Unix”, which is the format Facebook expects the data to be in.
UNIX format is a long number, which is actually the number of seconds since 1970!
Here’s how:
- Add a step above the Facebook conversion step
- Choose “Formatter”
- As the action event, choose Date/Time
- In “Transform”, choose Format
- As the input, choose Date submitted from Growform
- As “To format”, choose X (the last option at time of writing), then hit “Continue”.
- Hit continue, and you should see the output of this step in seconds
- Back in “event time” under the Facebook conversions step, you can insert use the value you just made available!
Troubleshooting
“Invalid parameter” warning seen in Zapier
This is a very common error in early setup, and just means one of the fields Facebook is expecting isn’t quite right. Unfortunately, Facebook doesn’t tell us which field is incorrect, so double check the following:
- Your “Action source” is set to Website
- Your event name is NOT set to “Purchase” or “Lead” if you’re using the “Send other event” zap as described in this tutorial. If you do wish to use these, you should select the relevant “action event” early in the Facebook conversion setup.
- The event source URL is set to a valid URL (eg. https://www.example.com), and not left blank
- Under “customer information”, email is set – this is a required field by Facebook
- Under “customer information”, the client user-agent is set – this is required by Facebook
Event not seen in Facebook
- Wait 30 minutes for the event to come through – Facebook warns that it can take 30 minutes for backend events to be processed.
- Ensure Facebook isn’t blocking events: check your Facebook dashboard in events manager for any banner that offers to “allow” or “block” events, and choose allow if given the option.
Recent Posts
- A Complete Guide to Form Validation for Better User Experience
- Mastering Lead Scoring for Better Sales
- What is Bottom of Funnel in Marketing? Here are Our Top Strategies for Success
- What Is Lead Enrichment? Our Complete Guide to Enhancing Your Lead Data
- How To Send Conversions To Facebook/Meta via Conversion API (CAPI)