Skip to main content

6) AI Ad Optimization Setup

Learn how to train AI on conversion data so it optimizes your ads for you.

Updated over 2 weeks ago

AI Ad Optimization Intro

Because our platform is better at tracking conversions then any Ads Manager - we have the ability to package our rich data and send it back to your Ad Accounts.

This allows your ads to leverage AI Machine Learning that optimizes your ads in real time to get cheaper cost per action (Avg 13% reduction in conversion costs).

Below are going to be training tutorials on how to do this.


πŸ“Œ AI Ad Optimization: Meta Ads

Video Transcript

Alright ladies and gentlemen, so we have officially set up our account. We're tracking page views and conversions. Now what we want to do is we want to set up AI Ad Optimization so we can train machine learning AI models on true conversion data so that way your ad account and your ads start being shown to people who are most likely to convert because we're again sending full funnel transaction analysis from lead all the way to purchase. And then Meta and all these other ad platforms can train on it. Now in this video we're going to be going over the Meta AI Ad Optimization setup. So guys without further ado let's jump into things. So the first thing in our platform you're going to do is you're going to click this and now you're going to see we have this setup, right? So next we have to fire off or fly off to the Meta ads manager or the events manager my apologies. So to do that you're going to find your uhm Meta events manager which is going to be in your ads manager then you can click on events manager here and as you see this is on a brand new ad account with literally nothing on it.

Chances are you may have already had a pixel or now it's called the dataset or you may already have a conversions API. I'm going to set this up from scratch just so you can see how we do things. First thing we're going to do is we're going to create a web data source which is going to be our pixel. Then we're going to call this test pixel. And I do not want any sort of demo and then do we have any that we have to show here? No, no financial service. Nope, nope, nope, no race, no religion, no sex, no trade. Perfect. So now we can hit create and here we now have our pixel dataset that is going to come into effect. All right. go ahead, hit next. So now you see we have our Meta our data set what they now call it. Now when you set up a data set you can see there's going to be website activity. So always, always, always guys this isn't going to be a pixel training but always install your pixel code. So this is the code that you grab you can copy it. I always recommend adding it inside of a notion doc or a Google doc or some sort of document so you don't always have to come back in here. Uh this is nice and clean. So you grab this, you'll paste it on your website and uh make sure that turning on advanced matching is there so it can match all of this stuff. And then hit done. So that's going to be setting up your pixel. So now that you have a pixel set up you also want to set up the conversions API. So as you see here there's a button to do that. You can hit this or I believe if you come down here you can uh there usually is a button up here. uh Yeah sometimes it allows you to go ahead and create a pixel in here but no worries, no stress we will go ahead and continue setting up the conversions API like this. And let's uh set up manually.

Cool. So now that we have set up manually we want to make sure that we're setting up the conversions API with the pixel because it's going to say here send data directly through an API connection which helps improve targeting blah blah blah combining conversions API with a meta pixel maximizes the effectiveness of the data that is shared with meta technologies. So basically what you're doing you're sending the website data from the meta pixel as well as the conversion data that that our system is tracking back. So we can send the conversion data from our system plus the data from the meta pixel that they add on your website and you are then going to go ahead and start tracking both of these events very very simultaneously. So we click continue. And then we hit this start cappy setup button and then we go on forward. Now this is a little bit of a pain in the ass I'm not going to lie guys. You have to basically come in, select the events that you want to be able to set up. So depends again where you're at. uh right so you might not like if you're an e-com company you might not do this. If it's other you might want um you know lead, purchase, schedule, uh submit application, you know maybe start trial, subscribe, uh All right complete registration maybe. So really depends on what it is you guys do. Uh but again Yeah I think I think for most you know if you're doing like a sales funnel it's probably going to be like leads completing registrations, purchase, scheduling an appointment, maybe starting a trial, subscribing that type of stuff. Uh Yeah I'm just kind of looking through this to see if there's anything else. Uh customize product no we don't care about that. find location no. Uh yeah it's probably primarily going to be like these form submissions things like that. If you're in the ecom obviously initiate checkout uh add to cart right yeah add to cart, initiate checkout, add payment info and then the purchase. So again really depends on your business model. I'm going to just leave it here with this and then I'm going to go ahead and click continue. Now in here guys it's a bit of a pain in the ass you're going to have to manually go through each one of these and turn it on. I wish meta just kind of made it a lot easier but I'm going to walk you through what you guys need to toggle on just a second. So guys first thing that we need uh some of these might be turned off so I'm actually going to have a little list under this video of all the different things that you need. Uh you definitely need event time, event name, event source URL, action source. We also need to add an event ID. We're going to turn on data processing options by country. We're also going to add the client IP address, the external ID, the first name, the phone, the click ID, the FBC. we also want to do the email, the browser ID and the last name. And then as you see uh meta is also going to show best practices. We send back more data than this. so that's why we added some more things in there. Uh we send back all of the data that meta requests and recommends so that you can have the highest match accuracy score but again let's come back. You'll see we're going to do event ID, data processing options by country. then we're going to add the client IP address, the external ID, first name, phone, then the click ID, the email, browser ID and last name, okay? So we're going to go through every single one. We're going to add this. You see a value and currency is there. uh data processing, event ID, client IP, external ID, first name, phone, click ID, email, browser ID and last name. And we just have to keep doing this. So I'm going to get one more with you guys so event ID, data processing, client IP address, external ID, first name, phone number, click ID, email, browser ID and last name. So I'm going to do the rest of these by myself real quick and I'll come right back. So I've now gone ahead and added all of them and I'll just walk you guys through some of this in case you're curious as to what's going on. I'm a very curious person so I always like to understand what I'm doing. So basically what we're doing is we're toggling all these on because we are sending data back to your ad account, right? So when we send data back we need to make sure that Facebook is ready for the data we're going to be sending back. So we are sending things like event ID, uh what country they live in, their IP address, an external ID is just an ID that our system generates for the contact. first name, phone number, the a Facebook cookie click ID. So this is um basically an ID that allows meta to understand who clicked from what ad and what action they took. It's a unique click ID and we can pick that up on our side. So when we send this back to meta they're like ah we have this click ID, we know who this person is. obviously the email, the browser ID so understanding who they're act like what browser they have etc. and then last name. So all of these are unique identifying parameters for the client or the lead and when we send all of this data back it just gives meta a way higher chance to match the conversion and who took this action with their internal events. So the more data points that we add the better everything becomes because they can obviously have higher matching scores and have way more data and can understand what's going on.

Um Also important to mention action source that is automatically turned on. We'll get back into our platform in just a second with the action source but once this is done guys then go ahead, hit continue. You're going to see a quick review, hit continue. Uh I don't really care about this. open implementation guide. no sorry we don't care about this either. We're going to hit continue and then it should give us our thing here. all right cool. We don't care about this. Uh generate access token. Important that we want to set up with data set quality API. Okay so this what it allows you to do is include as you see the data set quality API with your direct integration and get metrics like event match rate to help you monitor and optimize performance, generating a data set quality API token will also give permission to previously generated tokens. So this is the one that we want. It's basically a way higher quality access token. It allows us to send data and then they will match the data with the pixel. Uh it's just again choose this one, hit generate access token and then I think I had here what was the name of that? Uh

Hey you're going to give me a second. Okay so we're going to select the data set that we created up above or in previous in this video. Uh I for whatever reason do not have access to that data set here something's going on but we're just going to select that one and then hit generate access token. So again what's important to mention is it's going to use a data set which used to be called a So again we take this data set which again used to be called a pixel and then we blend that into the conversions API token. So that way the matching is a lot higher and the data is being shared from one event to another or from one uh integration to another. We're then going to copy this access token and make sure you save this because it will not be stored by Facebook. So please save this again with your pixel which is why I recommend. I'll show you guys actually what I mean. So I save this side of notion doc where I always add my pixel ID. I then add the pixel base code so I can always just copy and paste it. Uh I have some standard event codes which again this is not a training on how to set up a meta pixel but if you already have a pixel you know that there are certain codes that you can add on the actual website to track certain uh events. So we always save this in here as well. and then from there we also save our conversions API access token. So I always recommend guys just keeping nice and clean, organize yourself, put your data somewhere that way you never have to scramble for it. but now that we've copied that and pasted it we can now begin rolling out the next thing. We can test our events by clicking this button by the way here. But again you're going to go you're going to find that data set that we had created and then inside of it you're going to see this test events button. From there you can grab this test code and then you head back to our platform where you see here we set this up so we can call this I'm just going to call this test for now. We have our meta pixel ID which again we need to go and grab. we have the access token as well that we need to add. So this is the access token. We also have that test event that we can send a test event. I'm going to go back to meta and grab the test pick ID and come back here and drop that in there. Then when we hit test connection we're going to fire this off. Cool it said it sent out to meta. What's kind of annoying about meta is it doesn't always fire off immediately. Uh so we need to let's just do this again because I didn't have it open. back and add that test connection back to meta. Sometimes it takes a minute it's kind of annoying. All right now you can see that this popped up. We sent the test event, the purchase was sent right so all of this is now good to go. We sent everything that we needed to so we sent all the data, the test worked. so you should see this guys. If you're not seeing this please feel free to ask the AI agent in our corner what maybe you did wrong. Um But it should work, right? Like if you just set it up properly uh you make sure that the right access token and the right pixel ID are all in there and then you add it in here it's all good. So after you're done sending the test code by the way we recommend just deleting it and then hitting save. So now that that has been saved we can go ahead um wait we can turn on the meta versions API up here and then go ahead and hit manage. Then guys we have what are called the mapping. So here is where you're going to choose what data you would like to send. So if you take a peek this is the lead. so if we turn on lead we can then send it back to meta as the lead. So again you can literally see all the ones that we turned on, right? So in the previous step when I told you guys you need to set up the conversions inside of the uh where was it? Uh perfect right it was like trial event, subscribe all these different things that we set up. Um right we set up the different conversions that is then what our system has access to do. So literally everything that we did was in there. uh so I'm going to do lead and then action source is very important actually. This tells meta where the source of this conversion happened which actually meta uses as one of the most important things when optimizing ads based off of this data is they will match people based off of where they're most likely to make an action. So obviously the lead happened on a website. Uh then we have appointment booked for example, this can be a schedule. and then we're going to have a purchase event and this would be a purchase, right? But this one actually happened probably on a phone call. So again conversion over the phone this is very important by the way you do not want to you do not want to screw this up because meta says this is one of the most important things that they do when matching people. So when we send back the data that you know conversion happened over a phone call meta will then optimize your purchase events and everyone that came in, understand what's unique about them that makes purchases on a phone call and then it'll go back out and it will try to find more people like them. So again this is very important that we make sure the action source is correct. So once that is done we are pretty much good to go. You guys can also see the monitoring. So we'll show you all of the uh all of the events we send back but that is pretty much it guys. That is how you set up your meta conversions API in a quick 15 minutes. If you have any questions please again feel free to reach out to our AI agent support or if the AI can't help it'll pass you off to one of our human support reps to again further assist you.


This guide will walk you through setting up the Meta Conversions API (CAPI) for AI Ad Optimization. The Control Center is your central hub for sending server-side conversion data directly to Meta. This process improves ad optimization by training Meta's AI on a complete picture of your conversion funnel, from lead to final purchase, ensuring your ads are shown to the people most likely to convert.

Step 1: Create a New Dataset in Meta Events Manager

Before connecting your account, you must first set up a "Dataset" (formerly known as a Meta Pixel) and configure the Conversions API within your Meta Business Account.

  1. Navigate to your Meta Events Manager.

  2. Click the + Connect Data button and select Web as your data source.

  3. Give your dataset a recognizable name (e.g., "Test Pixel") and click Create.

  4. After creating the dataset, you will be prompted to set up the Meta Pixel and the Conversions API. It is highly recommended to install the Meta Pixel base code on your website first. Select Install code manually and copy the code. Paste this code into the <head> section of your website.

  5. Enable Automatic Advanced Matching to help improve data matching.

Step 2: Configure the Conversions API and Generate an Access Token

Next, you will configure the server-side events and generate the token needed to connect our platform.

  1. In your dataset's Overview page, locate and click Set up Conversions API.

  2. Choose the Set up manually option.

  3. For the connection method, select Conversions API and Meta Pixel.

  4. Click Start CAPI setup.

  5. Select Events: Choose the events you want to track (e.g., Lead, Purchase, Schedule).

  6. Select Event Details: For each event you selected, you must choose which parameters to send. For the highest data quality, we recommend selecting the following for every event:

    • Event ID

    • Data Processing Options

    • Client IP Address

    • External ID

    • First Name

    • Phone

    • Click ID (fbc) Cookie

    • Email

    • Browser ID (fbp) Cookie

    • Last Name

  7. After configuring all events and parameters, review your setup and continue until you see the See Instructions page.

  8. Select Open implementation guide.

  9. Inside the guide, find the section Generate an Access Token.

  10. Ensure the Set up with Dataset Quality API option is selected, choose your dataset, and click Generate access token.

  11. Important: Copy this token and save it somewhere safe. Meta will not show it to you again.

Step 3: Connect Meta CAPI to the Platform

With your credentials ready, you can now establish the connection.

  1. Return to the AI Ad Optimization tab in the platform and click + Connect Meta CAPI.

  2. In the setup window, enter the following:

    • Configuration Name: A name for this connection (e.g., "Test").

    • Meta Pixel ID: The ID of the dataset you created.

    • Access Token: The token you just generated and saved.

  3. Test the connection (optional):

    • Go to the Test Events tab in your Meta Events Manager and copy the test_event_code.

    • Paste it into the Test Event Code field in the platform and click Test Connection. A success message confirms the setup is correct.

  4. Remove the test code and click Save Configuration.

Step 4: Activate and Map Conversion Events

Finally, activate the connection and map your platform's events to Meta's standard events.

  1. Toggle the switch on your new connection to Active.

  2. Click Manage and navigate to the Mappings tab.

  3. For each event you want to track (e.g., Purchase, Lead, Appointment Booked), do the following:

    • Toggle the switch to the on position.

    • Under Meta Event Type, select the corresponding Meta event (e.g., map "Appointment Booked" to "Schedule").

    • Under Action Source, specify where the event occurred (e.g., "Website," "Phone Call," "Physical Store"). This is critical for accurate optimization.

  4. Once your events are mapped, the setup is complete. The system will now send server-side data to Meta for AI optimization.

Did this answer your question?