How do I set up Meta CAPI in Events Manager?
Choose your Meta dataset, paste an access token from Meta Events Manager and switch on Meta CAPI so TrueROAS sends your orders to Meta.
Before you start
Meta CAPI, the Conversions API, lets TrueROAS send your orders and store activity to Meta from its own servers. TrueROAS sends them to a dataset, the place in your Meta account that receives your store's events.
- Meta has to be connected in TrueROAS, with an ad account picked. If the Meta settings show Meta Conversions API with a Connect Meta Ads button and the line Sign in with Facebook to connect your ad account, click the button and sign in with Facebook. If they show a Meta ad account field instead, click it and pick your ad account. See How do I connect, refresh or disconnect my Facebook account for Meta Ads?.
- To create an access token, you need access to your dataset in Meta Events Manager.
- On some plans the Meta card only opens after you add the CAPI add-on. See Do I need the CAPI add-on to send events to ad platforms?.
Open the Meta settings
- Open Events Manager under Setup in the left menu and click the Meta Conversions API card. The page is explained in What is Events Manager and what can I do there?.
- While Meta CAPI is off, a strip under Configuration lists the quick steps. Shopify and WooCommerce stores have 3 steps, other stores 2. They are choosing your dataset, Add access token, and then turning on TrueROAS browser tracking on Shopify or Install the TrueROAS WP plugin on WooCommerce.
- Until your dataset and token are saved, the line under Configuration counts what you have done, for example Setup 1 of 3 done., and a bar in the Meta CAPI row fills up. Once both are saved, the line reads Ready to start.
Step 1: Choose your dataset
The first row of the settings has a dropdown with your datasets.
- When no dataset is saved yet, TrueROAS picks the first one Meta lists and saves it straight away. A message tells you which dataset it now uses.
- To use another dataset, pick it in the dropdown. Each entry shows the dataset's name and ID. Your choice is saved as soon as you pick it.
- The list shows the datasets of your ad account and of the Meta businesses that the connected Facebook account belongs to.
- Once a dataset is saved, the Events Manager link at the right of the row opens its settings in Meta Events Manager.
- If the dropdown is greyed out, Meta returned no datasets for the connected Facebook account. Check that the right ad account is picked, or create a dataset in Meta Events Manager.
Step 2: Add the access token
- In the Access token row, click How do I generate this? to open How to get your access token. It tells you to open Meta Events Manager, scroll to Conversions API and click Set up manually, then click Generate access token and copy the token. Once your dataset is saved, the first step links straight to its settings in Meta.
- Click Add token in the Access token row.
- Paste the token into the field that reads Paste your access token, then press Enter or click outside the field. The line under the field reads Saving… while it saves.
- You see Access token saved.
About the token:
- A token shorter than 20 characters is not saved, and the field stays open. Cancel closes the field.
- Hover over the info icon next to Access token to read A long-lived token from Meta Events Manager. We encrypt it before storing.
- A saved token shows its first 8 and last 4 characters. The eye button (tooltip Reveal, then Hide) shows the whole token.
- Replace opens the field again so you can paste a new token. Once a token is saved, the help link reads How do I get a new one?
- If saving fails, you see Could not save your access token. Try again.
Step 3: Turn on browser tracking (Shopify and WooCommerce)
On Shopify and WooCommerce stores, the third row has a switch that turns on TrueROAS browser tracking for Meta. It stays greyed out until your dataset and token are saved. Turning it on also turns on Meta CAPI, through a window like the one in step 4, so it can replace step 4. Other store types do not have this row. What the switch does is explained in What does the browser tracking switch in the Meta settings do?.
Step 4: Turn on Meta CAPI
- Once a dataset and a token are saved, a switch appears in the Meta CAPI row at the top of the settings. Its tag reads OFF.
- Turn the switch on. The window Enable Meta Conversions API opens with TrueROAS will start sending conversion events to Meta server-side.
- Follow the part for your store:
- Shopify: under Before we turn it on:, the window asks you to turn off data sharing in Shopify's Facebook & Instagram app, because otherwise Meta receives your events twice. Three pictures show how, and Previous and Next move between them. The steps are also written out in How do I stop Meta or TikTok from counting my purchases twice?. When you have done it, click the button that starts with I've done this.
- WooCommerce: under Before we turn it on:, the window asks you to install the TrueROAS WordPress plugin and paste your dataset ID into it, so events are also sent from the browser. It shows the ID with a copy button (tooltip Copy, then Copied!) and two steps. First install the TrueROAS WordPress plugin. Then, in WordPress admin, open Settings and then TrueROAS, paste the ID into the plugin's Facebook ID field and save. Click the button that starts with I'll do this.
- Other store types: the window says that TrueROAS only sends events from its servers and that nothing more is needed. Click Enable Meta CAPI.
- You see Meta CAPI is now sending events. The tag turns ON and the row reads Sending server-side conversion events to Meta.
Cancel closes the window without turning anything on. If switching on fails, you see Could not enable Meta CAPI.
After Meta CAPI is on
- The settings fold into a short summary: your dataset with its name and ID, Access token with Saved or Not added, browser tracking On or Off on Shopify and WooCommerce, Optimize for profit with On or Off, and your second dataset if you added one.
- Click Configure to open the settings again. The button then reads Done, and clicking it folds them.
- With the settings open, Watch live events in Meta opens the test events page of your dataset in Meta Events Manager.
- Optimize for profit instead of revenue sits under the settings once your dataset and token are saved. See Can I send profit instead of order value to Meta and Google?.
- Meta's numbers for your dataset are under Activity & health, which shows as soon as a dataset is saved. See What do the Meta numbers under Activity & health mean?.
Send the same events to a second dataset
Some stores want the same events in two Meta datasets.
- With a dataset and a token saved, click the small grey link at the bottom of the Meta settings that adds a second dataset. When Meta CAPI is on, click Configure first.
- A box with the word advanced next to its title opens. It explains that every event is copied to the second dataset, and that you can leave the token empty to use the token of your first dataset.
- In the ID field, pick a dataset from the list or paste its ID.
- If the second dataset needs its own token, paste it into Access token (optional).
- Click the save button. A message confirms that events now go to both datasets.
To change the second dataset later, edit the fields and click Update. Remove stops the copying. Before the first save, Cancel closes the box.
The second dataset gets the same purchases and store activity from the TrueROAS servers. On Shopify it also gets the events from TrueROAS browser tracking while that is on.
Turn Meta CAPI off
- Turn off the switch in the Meta CAPI row.
- The window Disable Meta Conversion API warns that TrueROAS will stop sending conversion events to Meta, and asks you to make sure you have other tracking in place first.
- Click Disable CAPI. You see Deactivated CAPI for facebook and the tag turns OFF.
Cancel keeps Meta CAPI on. Your dataset and token stay saved, so you can turn Meta CAPI back on with the same switch. On Shopify, turning Meta CAPI off also stops TrueROAS browser tracking for Meta.
Good to know
- These settings apply to the whole store. Anyone who can open Events Manager can change them.
- Everyone who can open Events Manager can see the saved token in full with the eye button.
- If you pick another dataset, the saved token is kept. A token you generate in Meta Events Manager is made for one dataset, so generate a new one for the new dataset and click Replace.
- Once Meta CAPI is on, the Meta CAPI bar on the Dashboard turns green. See What does the Meta CAPI bar at the top of the Dashboard mean?.
- Events Manager has no field for a Meta test event code.
- What TrueROAS sends to Meta, and how often, is explained in What does TrueROAS send to each ad platform, and how often?.
- The same Meta settings open from the Meta card under Feed Ad Platforms True Data in General Settings. See What is Feed Ad Platforms True Data in General Settings?.
- The settings work the same on a phone.