Google Ads API integration in CPV Lab | CPV One
- CPV Lab supports direct Google Ads API integration, allowing you to automatically sync campaign data between your Google Ads account and your CPV Lab tracker.
- This integration enables you to view costs from Google Ads alongside your tracked stats inside CPV tracker, giving you a full picture of ad spend, clicks, and conversions in one centralized dashboard.
With the API integration, you can automatically sync cost data between Google Ads and CPV Lab tracker.
To complete the integration, you’ll need:
- A Google Ads account with API access
- A valid CPV Lab (opens new window) license (or CPV One (opens new window))
1. Go to API integrations page
- Access the API Integrations page under the Sources menu from your CPV tracker.
- Sources ➡️ API Integrations
2. Click New integration
- Click to add the new integration on the Google Ads image:
3. Google Login
- You will be redirected to the Google website and ask to login in order to allow the integration. Enter your Google Advertising login details in the box below:
- the email
- and then the password
- the email
4. Confirm the integration
CPV tracker was approved by Google to use the API integration, and below are the steps you need to follow:
Select all the permissions and continue
5. Manage the integration
Once you save your Google Ads API integration in CPV Lab, you'll be redirected to the Integration Settings page, where you can configure key details for how the integration behaves.
- Integration Name- A custom name to help you easily identify this specific integration with Google Ads.
- Cost Synchronization Method- Choose how you want cost data to be imported from Google Ads:
- Exact Total Cost - This option pulls the exact total spend per campaign from Google Ads. The total cost is then distributed across all recorded clicks in CPV Lab for that campaign.
- Exact CPC - This method imports the exact Cost Per Click (CPC) from Google Ads for each individual ad.
WARNING
Note: If the campaign was running before CPV Lab tracking was added (e.g., launched on Google Ads before setup), some clicks may be missing, and total cost values may not match exactly.
- Active Status - Indicates whether this integration is currently active and connected to Google Ads
Accounts to synchronize
In this section, you will see a list of Google Ads accounts available under your organization.
How to use this section:
- Select the accounts for which you want to synchronize campaign costs 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.
6. Match campaigns
To synchronize cost data accurately, CPV Lab needs to know which campaigns from Google 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 Google 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 theActions
column. - After completing all desired matchings, click Save Matchings to confirm and activate the associations.
TIP
Once saved, CPV Lab | CPV ONE will begin pulling cost data for each matched campaign via the Google Ads API.
7. Integration Status
- By default the integration is set to “Active” and to Synchronize Costs from Google Ads.
- You should leave all these checked in order to take advantage of all the Google Ads integration features.
8. Setup Cron Job (only for CPV Lab)
WARNING
This step is required if you are using the self-hosted tracker, CPV Lab.
If you are using CPV One, then skip this step.
- 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.
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:
Pass Conversions to Google Ads
- In CPV tracker there are 2 methods to pass conversions from the tracker to Google Ads
- By using the API integration described above
- By using the passing conversion to Google Ads method described here
- Please note that this mehod is not using your API credentials.
Possible errors
Here are some possible errors that may appear when tracking Google Ads cost with CPV Lab | CPV One ad tracker and also how you can solve them.
Fail to push limit (for CPV Lab users!)
- If you see the error with "Fail to push limit", then it means that some files from the Google Ads API integration weren't uploaded correctly.
- You should reupload all files and folders from the "vendor" directory in the CPV Lab upgrade package (only the "vendor" directory!).
You may also find useful: