Skip to main content

Meta Ads Conversion Upload (CAPI)

How to send adtribute data back to Meta to optimize your campaigns with.

Daniel Busch avatar
Written by Daniel Busch
Updated over 2 weeks ago

Follow the instructions in this article to send one or multiple adtribute tracked events back to Meta to optimize your campaigns with better data.

Step 1: Shopify Pixel Setup Modification

When you are running on Shopify, you have to complete one more step before creating the CAPI Setup. Follow the instruction below:

  1. Log into your Shopify Account

  2. Navigate to "Settings" > "Customer Events"

  3. Click on the already installed adtribute pixel

  4. Move the existing pixel code down and add the following at the top:

    !function(f,b,e,v,n,t,s)
    {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
    n.callMethod.apply(n,arguments):n.queue.push(arguments)};
    if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
    n.queue=[];t=b.createElement(e);t.async=!0;
    t.src=v;s=b.getElementsByTagName(e)[0];
    s.parentNode.insertBefore(t,s)}(window, document,'script',
    'https://connect.facebook.net/en_US/fbevents.js');
    fbq('init', 'INSERT YOUR PIXEL ID HERE');

  5. Replace the placeholder INSERT YOUR PIXEL ID HERE and insert your Meta pixel id. You can find your pixel in the "Events Manager" within your Ad Account / Business Manager.

    1. If you have multiple pixels in one store, then you need to duplicate the last line for every pixel:

      fbq('init', 'INSERT YOUR 1st PIXEL ID HERE');
      fbq('init', 'INSERT YOUR 2nd PIXEL ID HERE');
      fbq('init', 'INSERT YOUR 3rd PIXEL ID HERE');

  6. Click "Save" to update the pixel (top middle).

Step 2: Set up Destination with Meta Pixel ID and Access Token

  1. Navigate to Activation

  2. Click "Add Action"

  3. Click "Create New Destination"

  4. To fill out the Destination Info, you need your Meta Pixel ID and Access Token.

  5. You can find your Pixel ID and Access Token in your Event Manager in your Meta Ad Account. Navigate to Event Manager > Data Sets > Your Pixel > Settings and copy and paste the Pixel ID that is shown under "Dataset ID".

  6. Scroll Down to until you reach the point where you can click the button "Generate access token". Copy the access token.

  7. Fill out the Destination Information as shown below and click "Next". Note that the setting for the Meta Consent is your choice - select if you want to only send data after consent.

Step 3: Create Conversion & Attribute for Meta CAPI

Note: We can handle this step for you - just contact us!

First you have to create the Conversion you want to send to Meta.

  1. Go to Conversions under Definitions.

  2. Click "Create Conversion" top right.

  3. Choose the Trigger, e.g. Shopify Order (not Line Item!)

Example:

Note: If you only want to send NC Orders, you have to select "Once per Identity" under Deduplication.

Now, you have to create the according attribute that holds it value, e.g. Gross Revenue:

  1. Go to Conversions > Attributes.

  2. Click "Create Attribute" top right.

  3. Select Metric.

  4. Create the Formula that defines the attribute.

Example:

Step 4: Create Action to send Event Data to Meta

Note: We can handle this step for you - just contact us!

By creating the action, you define which event should be send to Meta. This is the next step after the destination or the first step if you create a new action for an existing destination.

Fill out the Information as follows (example screenshot below):

  1. Choose the Name and Description freely but make sure they are descriptive.

  2. For the Conversion choose the CAPI Conversion you have created before.

  3. The Event Name is the actual name that will appear in Meta.
    ​WE HIGHLY ADVISE TO NOT NAME IT THE SAME AS AN EXISTING META EVENT!
    And this is for two reasons:

    1. Mitigating the risk of worse performance with new data.

    2. Having the opportunity to test the new event against the existing, to actually see what works better based on the current benchmark.

  4. For Currency, you can select Constant and then either EUR or USD.

  5. For Value you need to select Attribute and the Value Metric that is linked to the event. In this case it is the "NC Gross Revenue (CAPI)" Metric you have created for the "NC Shopify Order (CAPI)" Conversion.

  6. All done, you can click create or save at the bottom right.

Note: After this setup is done, it will take up to 24 hours, before you can see the data and new events in your Ad Account.

Important: Optimize Ads with adtribute data

To make sure the adtribute data is actually better for optimization, we advise to follow these two steps:

  1. Matching Quality: Before you start optimizing for the new "adtribute - Shopify Order" event, wait until the Matching Quality in the "Events Manager" is better than your "normal/previous order" event.
    ​

  2. Split Test: Setup or duplicate identical Ad Sets where only the event you optimize for is different - your "normal/previous order" event vs the "adtribute - Shopify Order" event.


    Set this up for multiple Ad Sets and test it for a good amount of time to achieve a statistically significant comparison and conclusion.

Did this answer your question?