Google Ads Links in the Management API allows you to get, list, create, update and delete links between Google Ads accounts and Google Analytics properties and manage which views (profiles) to populate with Google Ads data.
To learn more about how Google Ads linking works and the benefits see Link Google Analytics and Google Ads and Analytics and Google Ads (Help Center).
Use cases
The Google Ads Links resource API supports delete, get, list, patch, and update, but the two key uses cases are:
Create a new link
To create a link between an Analytics property and a Google Ads account:
- Use the Google Ads API or Web Interface to retrieve the Customer Id.
- Use the Google Analytics Management API or Web interface to retrieve the Id of the account and property to which you want link the Google Ads account.
- Create the link between Google Ads and Analytics by executing the
insert
method of theentityAdWordsLinks
resource.
See the API Reference" for details on the insert
method of the entityAdWordsLinks
resource.
Add a view
To enable Google Ads data in reports for a View (Profile) you will need to add the view (profile) to the Google Ads link resource:
- Use the Google Analytics Management API or Web interface to retrieve the Id of the account, property, and the View (Profile).
- Use the Management API to retrieve the Id of the Google Ads link that the View (Profile) will be linked to.
- Add the View (Profile) by executing the
patch
method of theentityAdWordsLinks
resource.
See the API reference for details on the patch
method of the entityAdWordsLinks
resource.