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

  • CPV Lab has direct Meta Ads API integration to allow getting accurate information about campaign costs.
  • Together with the data tracked by CPV tracker, you can see all your performance metrics in one dashboard.

To complete the integration, you’ll need:

Steps required in order to setup the Meta (Facebook) Ads Integration with CPV tracker:

1. Go to API integrations page

  • Go to Sources ➡️ API Integrations from your CPV tracker

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. Manage the integration

Once you save your Meta Ads API integration in CPV Lab | CPV One, you'll be redirected to the Integration Settings page, where you can configure key details for how the integration behaves.

 Meta (Facebook) Ads API integration setup

  • Integration Name- A custom name to help you easily identify this specific integration with Google Ads Ads.

  • Cost Synchronization Method - 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

Accounts to synchronize

  • On the Integration page you will see a list with all the Accounts available under the current integration (under the account connected before).
  • You can choose the accounts you want to get campaigns syncronized for

How to use this section:

  • Select the accounts for which you want to synchronize campaign costs from Meta Ads with CPV Lab or CPV One.
  • Click Save to apply your selections and finish later.
  • Or click Save & Match to immediately proceed to the Campaign Matching screen, where you can link your Google Ads campaigns with the corresponding campaigns in CPV Lab | CPV One.

5. Match Campaigns

To synchronize cost data accurately, CPV Lab needs to know which campaigns from Meta (Facebook) Ads should be linked to the corresponding campaigns in your CPV Lab tracker.

This is done on the Match screen, where you manually associate campaigns from each platform.

How to Match Campaigns:

  • Select a campaign from Meta Ads using the dropdown menu.
  • Select the corresponding campaign in CPV Lab that you want to associate with it.
  • Click the Match button to create the link.
  • A new matching record will appear in the table below.
  • Repeat the steps for each campaign you want to match.

Managing Your Matches

  • To remove a match, click the Delete icon in the Actions column.
  • After completing all desired matchings, click Save Matchings to confirm and activate the associations.

 Meta (Facebook) Ads API Match campaigns in CPV Lab

6. 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.

7. 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.

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:

Last Updated: 8/22/2025, 4:12:54 PM