Meta (Facebook) Ads API integration in CPV Lab | CPV One

Steps required in order to setup the Meta (Facebook) Ads Integration with CPV Lab (opens new window) or CPV One (opens new window) tracker:

1. Go to API integrations page

  • Go to Sources ➡️ API Integrations

2. Click New integration

  • Click to add the new integration on the Meta (Facebook) Ads image:

New Meta Ads integration

3. Meta (Facebook) Login

  • You will be redirected to the Facebook website and ask to login in order to allow the integration.
    • Enter your Meta Ads login details in the box.

 Meta (Facebook) Ads credentials

  • Continue with your user after login

 Meta (Facebook) Ads credentials

4. Verify that the integration is saved

  • Once this is complete, you will be redirected back to your CPV Lab (or CPV One) instance where you will see that the integration has been setup and you can now edit it

 Meta (Facebook) Ads API integration setup

  • Select how you get the costs from Meta Ads:

    • Exact Total Cost - you will get exact same cost per campaign as in Meta Ads.
      • this method will get the exact cost from Meta and distribute it over all the visitors clicking the ads from that campaign
      • it may happen that some visitors to get a different CPC than the one in Meta in this case.
    • Exact CPC - you will get the exact CPC for each ad as in Meta Ads
      • this will get the exact CPC value from Meta Ads
      • in case there are lost clicks (like the campaign was started in Meta before setting it up in CPV Lab), the total cost from Meta Ads will not match the total cost from CPV.
  • The Active status - shows if that API connection is active or not

  • Each Meta Ads API integration will allow syncronization for costs and to get conversions from the tracker

  • Click Save

5. Integration Status

  • By default the integration is set to “Active” and to Synchronize Costs and Pass Conversions to Meta Ads.
    • You should leave all these checked in order to take advantage of all the Facebook Ads integration features.

6. Setup Cron Job (only for CPV Lab users)

As CPV Lab is a self-hosted ad tracker, you need to do an extra step in order to start the API integration beteen CPV Lab and Meta (Facebook) Ads.

  • Setup a CRON job that will run the actual integration like this:
    • Frequency: once per hour
    • Command: cd /home/<server-name>/public_html/; php cron-api-integrations.php
  • Now the setup is complete and the CRON job will automatically synchronize CPC values for each keyword once per hour.

Tracking cost in CPV Lab | CPV One

  • After the API connection is established, you need to run your Meta campaign.
  • Cost date will get automatically updated in the cost fields for that campaign in all CPV reports.
  • There may be an initial delay (up to 24 hours) before the costs appear inside campaigns after the integration is created. But after that costs will be updated automatically without delays.

Same Campaign Name

  • Campaigns are matched between the tracker and your Meta Ads account based on their name.
  • So make sure that you set the same campaign name both in CPV Lab Pro (or CPV One) and Meta Ads in order to match the campaign.
  • If needed, you can change the campaign name in CPV Lab Pro using the campaign setup page.

WARNING

If the campaign name in CPV Lab / CPV One is different than the campaign in Meta Ads, then the cost syncronization will not happen.

Additional Notes

Number of matched campaigns

  • You can see the number of matched campaigns and imported keywords in the API integrations page by clicking on the Details button next to your already created integration:

     Meta (Facebook) Ads API matched campaigns

Pass Conversions to Meta (Facebook) Ads

You may also find useful: