Google Ads Component
Manage Google Ad and Local Ad campaigns
Component key: google-ads
Description
Google Ads (formerly Google AdWords and Google AdWords Express) is an online advertising solution that businesses use to promote their products and services on Google Search, YouTube, and other sites across the web. Google Ads also allows advertisers to choose specific goals for their ads, like driving phone calls or website visits. With a Google Ads account, advertisers can customize their budgets and targeting, and start or stop their ads at any time.
This component allows you to add external conversions to Ads campaigns.
Google documents many common errors that will aid in troubleshooting.
Connections
OAuth 2.0
This component uses OAuth 2.0 to connect to the Google Ads API. To begin working with Google Ads you will need a Developer Token. You will also need to make note of the Customer ID of the Ads Manager account (the hyphenated number in the top-left corner of the Ads app).
Next, you will need to create a GCP OAuth 2.0 app. To create one you will need to ensure you have a Google Developer account. Then:
- Access the project selector in the top-left and select an existing project or create a new one.
- Select APIs & Services -> Enabled APIs & services from the left hand menu
- Click Enable APIs and Services towards the top of the screen
- Search for "google ads api" and select Google Ads API in the results (avoid selecting AdWords as that is deprecated)
- Click the Enable button to add the API to your project
- On the sidebar, select Credentials.
- An OAuth 2.0 app includes a "Consent Screen" (the page that asks "Do you want to allow (Your Company) to access Google Drive on your behalf?"). Click CONFIGURE CONSENT SCREEN.
- Your app will be externally available to your customers, so choose a User Type of External.
- Fill out the OAuth consent screen with an app name (your company or product's name), support email, app logo, domain, etc.
- You can ignore domains for now.
- On the next page, add the
https://www.googleapis.com/auth/adwords
scope to your app. - Enter some test users for your testing purposes. Your app will only work for those testing users until it is "verified" by Google. When you are ready for verification (they verify your privacy policy statement, etc), click PUBLISH APP on the OAuth consent screen. That'll allow your customers to authorize your integration to access their Google Drive.
- Once your "Consent Screen" is configured open the Credentials page from the sidebar again.
- Click +CREATE CREDENTIALS and select OAuth client ID.
- Under Application type select Web application.
- Under Authorized redirect URIs enter Prismatic's OAuth 2.0 callback URL:
https://oauth2.prismatic.io/callback
- Click CREATE.
- Take note of the Client ID and Client Secret that are generated.
Make sure to publish your OAuth 2.0 app after you've tested it so users outside of your test users can authorize your integration to interact with Google Drive on their behalf.
Now that you have a Client ID and Client Secret, add Google Ads step to your integration in Prismatic. Open the Configuration Wizard Designer by clicking Configuration Wizard, select your Google Ads Connection and enter your client ID and secret.
Input | Default | Notes |
---|---|---|
Authorize URL string / Required Hidden Field authorizeUrl | https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent | The OAuth 2.0 Authorization URL for the API |
Client ID string / Required clientId | Client Identifier of your app for the API | |
Client Secret password / Required clientSecret | Client Secret of your app for the API | |
Developer Token password / Required developerToken | Developer token of your Account Manager account | |
Scopes string / Required Hidden Field scopes | https://www.googleapis.com/auth/adwords | Space separated OAuth 2.0 permission scopes for the API |
Token URL string / Required Hidden Field tokenUrl | https://oauth2.googleapis.com/token | The OAuth 2.0 Token URL for the API |
Data Sources
List Accessible Customers
Get a list of accessible customers for the logged in user | key: listAccessibleCustomersDataSource | type: picklist
Input | Notes |
---|---|
Connection connection / Required connection |
Example Payload for List Accessible Customers
{
"result": [
{
"label": "Example Account - 123-456-7890",
"key": "1234567890"
}
]
}
List Accessible Sub Accounts
Get a list of accessible Sub Accounts for the customer id provided. | key: listAccessibleSubAccounts | type: picklist
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer Client Level string customerClientLevel | 1 | The level of the customer client to retrieve. | 1 |
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 |
Example Payload for List Accessible Sub Accounts
{
"result": [
{
"label": "Example Account - 123-456-7890",
"key": "1234567890"
}
]
}
Actions
Account Reports
Account Reports show the performance and metrics associated with the linked Local Services accounts of a Manager account. | key: accountReports
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer IDs string Value List customerIds | 000xxx | A list of customer IDs. | |
End Date string endDateInput | 01-01-2023 | The end date of the date range, inclusive. MM-DD-YYYY format. | |
Manager Customer ID string / Required managerCustomerIdInput | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Page Size string pageSizeInput | 1000 | Numerical value indicating desired page size of paginated results. | 20 |
Page Token string pageTokenInput | Identifier of which page of results to return. This is returned with paginated results. | CJL5XLT2PWDmIpGNGciABRnu | |
Start Date string startDateInput | 01-01-2023 | The start date of the date range, inclusive. MM-DD-YYYY format. |
Confirm Client Link
Confirm a pending customer client link | key: confirmClientLink
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 |
Manager Customer ID string / Required managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 |
Manager Link ID string / Required managerLinkId |
Create Client Link
Create an invitation to link a client account to a manager account | key: createClientLink
Input | Notes | Example |
---|---|---|
Connection connection / Required connection | ||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 |
Manager Customer ID string / Required managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 |
Example Payload for Create Client Link
{
"data": {
"resourceName": "customers/1111111111/customerClientLinks/2222222222~3333333333",
"managerCustomerId": "1111111111",
"clientCustomerId": "2222222222",
"managerLinkId": "3333333333"
}
}
Detailed Lead Reports
Detailed Lead Reports show an in-depth view of leads associated with the linked Local Services accounts of a Manager account. | key: detailedLeadReports
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer IDs string Value List customerIds | 000xxx | A list of customer IDs. | |
End Date string endDateInput | 01-01-2023 | The end date of the date range, inclusive. MM-DD-YYYY format. | |
Manager Customer ID string / Required managerCustomerIdInput | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Page Size string pageSizeInput | 1000 | Numerical value indicating desired page size of paginated results. | 20 |
Page Token string pageTokenInput | Identifier of which page of results to return. This is returned with paginated results. | CJL5XLT2PWDmIpGNGciABRnu | |
Start Date string startDateInput | 01-01-2023 | The start date of the date range, inclusive. MM-DD-YYYY format. |
Get Conversion Action
Get Conversion Action | key: getConversionAction
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 | |
Manager Customer ID string managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Page Size string / Required pageSize | 20 | Numerical value indicating desired page size of paginated results. | 20 |
Page Token string pageToken | Identifier of which page of results to return. This is returned with paginated results. | CJL5XLT2PWDmIpGNGciABRnu |
Get Customer
Get Customer | key: getCustomer
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 | |
Manager Customer ID string managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Page Size string / Required pageSize | 20 | Numerical value indicating desired page size of paginated results. | 20 |
Page Token string pageToken | Identifier of which page of results to return. This is returned with paginated results. | CJL5XLT2PWDmIpGNGciABRnu |
Invite User
Invite a user by email to a customer | key: inviteUser
Input | Notes | Example |
---|---|---|
Access Role string / Required accessRole | ||
Connection connection / Required connection | ||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 |
Email Address string / Required emailAddress | The email address to invite to the customer |
List Accessible Customers
Get a list of customers accessible to the logged in user | key: listAccessibleCustomers
Input | Notes |
---|---|
Connection connection / Required connection |
Example Payload for List Accessible Customers
{
"data": {
"resourceNames": [
"customers/1234567890",
"customers/5555555555"
]
}
}
List Manager's Customers
List all customers under a manager account | key: listCustomers
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Manager Customer ID string / Required managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Page Size string / Required pageSize | 20 | Numerical value indicating desired page size of paginated results. | 20 |
Page Token string pageToken | Identifier of which page of results to return. This is returned with paginated results. | CJL5XLT2PWDmIpGNGciABRnu |
Example Payload for List Manager's Customers
{
"data": {
"results": {
"results": [
{
"customerClient": {
"resourceName": "customers/1234567890/customerClients/1234567890",
"clientCustomer": "customers/1234567890",
"id": "1234567890",
"hidden": false,
"level": "1"
}
},
{
"customerClient": {
"resourceName": "customers/1234567890/customerClients/1234567890",
"clientCustomer": "customers/1234567890",
"id": "1234567890",
"hidden": false,
"level": "1"
}
}
],
"nextPageToken": "CJL5XLT2PWDmIpGNGciABRnu",
"fieldMask": "customerClient.resourceName,customerClient.clientCustomer,customerClient.id,customerClient.level,customerClient.hidden,customerClient.level"
}
}
}
Mutate Campaign
Creates, updates, or removes campaigns as well as local services campaigns. Operation statuses are returned. | key: mutateCampaign
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 | |
Manager Customer ID string managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Operations code / Required operations | The list of operations to perform on individual campaigns. | ||
Partial Failure boolean / Required partialFailure | false | If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. This should always be set to true. | |
Validate Only boolean validateOnly | false | If true, the request is validated but not executed. Only errors are returned, not results. |
Mutate Campaign Criteria
Creates, updates, or removes campaign criteria as well as local services campaign criterion. Operation statuses are returned. | key: mutateCampaignCriteria
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 | |
Manager Customer ID string managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Operations code / Required operations | The list of operations to perform on individual campaigns. | ||
Partial Failure boolean / Required partialFailure | false | If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. This should always be set to true. | |
Validate Only boolean validateOnly | false | If true, the request is validated but not executed. Only errors are returned, not results. |
Raw Request
Send raw HTTP request to Google Ads | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Data string data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} | |
Debug Request boolean debugRequest | false | Enabling this flag will log out the current request. | |
File Data string Key Value List fileData | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] | |
File Data File Names string Key Value List fileDataFileNames | File names to apply to the file data inputs. Keys must match the file data keys above. | ||
Form Data string Key Value List formData | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] | |
Header string Key Value List headers | A list of headers to send with the request. | User-Agent: curl/7.64.1 | |
Max Retry Count string maxRetries | 0 | The maximum number of retries to attempt. | |
Method string / Required method | The HTTP method to use. | ||
Query Parameter string Key Value List queryParams | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | ||
Response Type string / Required responseType | json | The type of data you expect in the response. You can request json, text, or binary data. | |
Retry On All Errors boolean retryAllErrors | false | If true, retries on all erroneous responses regardless of type. | |
Retry Delay (ms) string retryDelayMS | 0 | The delay in milliseconds between retries. | |
Timeout string timeout | The maximum time that a client will await a response to its request | 2000 | |
URL string / Required url | /v16/ | Input the path only (/v16/customers:listAccessibleCustomers), The base URL is already included (https://googleads.googleapis.com). For example, to connect to https://googleads.googleapis.com/v16/customers:listAccessibleCustomers, only /v16/customers:listAccessibleCustomers is entered in this field. | /v16/customers:listAccessibleCustomers |
Use Exponential Backoff boolean useExponentialBackoff | false | Specifies whether to use a pre-defined exponential backoff strategy for retries. |
Search Ads
Returns all rows that match the search query. You can query for local services resources: https://developers.google.com/google-ads/api/docs/campaigns/local-service-campaigns#local_services_resources | key: searchAdsLocalServices
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 | |
Manager Customer ID string managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Page Size string / Required pageSizeInput | 20 | Numerical value indicating desired page size of paginated results. | 20 |
Page Token string pageTokenInput | Identifier of which page of results to return. This is returned with paginated results. | CJL5XLT2PWDmIpGNGciABRnu | |
Query string / Required query | The query string. | SELECT campaign.id, campaign.status, campaign_budget.id, campaign_budget.period, campaign_budget.amount_micros, campaign_budget.type FROM campaign WHERE campaign.advertising_channel_type = 'LOCAL_SERVICES' | |
Return Total Results Count boolean returnTotalResultsCount | If true, the total number of results that match the query ignoring the LIMIT clause will be included in the response. Default is false. |
Upload Call Conversions
Upload offline call conversions into Google Ads in order to track ads that led to sales | key: uploadCallConversions
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Conversions code / Required conversions | The conversions that are being uploaded. | ||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 | |
Debug Enabled boolean debugEnabled | false | If true, the API will perform all upload checks and return errors if any are found. If false, it will perform only basic input validation, skip subsequent upload checks, and return success even if no click was found for the provided userIdentifiers. | |
Manager Customer ID string managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Validate Only boolean validateOnly | false | If true, the request is validated but not executed. Only errors are returned, not results. |
Example Payload for Upload Call Conversions
{
"data": {
"partialFailureError": {
"code": 123,
"message": "string",
"details": [
{
"@type": "string"
}
]
},
"results": [
{
"callerId": "string",
"callStartDateTime": "string",
"conversionAction": "string",
"conversionDateTime": "string"
}
]
}
}
Upload Click Conversions
Upload offline click conversions into Google Ads in order to track ads that led to sales | key: uploadClickConversions
Input | Default | Notes | Example |
---|---|---|---|
Connection connection / Required connection | |||
Conversions code / Required conversions | The conversions that are being uploaded. | ||
Customer ID string / Required customerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. | 111-222-4444 | |
Debug Enabled boolean debugEnabled | false | If true, the API will perform all upload checks and return errors if any are found. If false, it will perform only basic input validation, skip subsequent upload checks, and return success even if no click was found for the provided userIdentifiers. | |
Manager Customer ID string managerCustomerId | Customer ID of the Google Ads Client account; accepts hyphenated or number forms. When used in conjunction with a sub account as the customer ID, this value is used as the 'login-customer-id' header for the HTTP request. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid | 123-456-7890 | |
Validate Only boolean validateOnly | false | If true, the request is validated but not executed. Only errors are returned, not results. |
Example Payload for Upload Click Conversions
{
"data": {
"partialFailureError": {
"code": 123,
"message": "string",
"details": [
{
"@type": "string"
}
]
},
"results": [
{
"callerId": "string",
"callStartDateTime": "string",
"conversionAction": "string",
"conversionDateTime": "string"
}
]
}
}