Skip to main content

Google Ads Component

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

Google Ads 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:

  1. Access the project selector in the top-left and select an existing project or create a new one.
  2. Select APIs & Services -> Enabled APIs & services from the left hand menu
  3. Click Enable APIs and Services towards the top of the screen
  4. Search for "google ads api" and select Google Ads API in the results (avoid selecting AdWords as that is deprecated)
  5. Click the Enable button to add the API to your project
  6. On the sidebar, select Credentials.
  7. 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.
    1. Your app will be externally available to your customers, so choose a User Type of External.
    2. Fill out the OAuth consent screen with an app name (your company or product's name), support email, app logo, domain, etc.
    3. You can ignore domains for now.
    4. On the next page, ignore scopes - this component knows what scopes it needs to run and will request the right scopes for you.
    5. 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.
  8. Once your "Consent Screen" is configured open the Credentials page from the sidebar again.
  9. Click +CREATE CREDENTIALS and select OAuth client ID.
    1. Under Application type select Web application.
    2. Under Authorized redirect URIs enter Prismatic's OAuth 2.0 callback URL: https://oauth2.prismatic.io/callback
    3. Click CREATE.
  10. Take note of the Client ID and Client Secret that are generated.
info

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 Config Variables drawer, select your Google Ads Connection and enter your client ID and secret.

InputDefaultNotesExample
Input
Authorize URL
string
/ Required
Hidden Field
Default
https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent
Notes
The OAuth 2.0 Authorization URL for the API
Example
 
Input
Client ID
string
/ Required
Default
Notes
Client Identifier of your app for the API
Example
 
Input
Client Secret
password
/ Required
Default
Notes
Client Secret of your app for the API
Example
 
Input
Developer Token
password
/ Required
Default
Notes
Developer token of your Account Manager account
Example
 
Input
Manager Customer ID
string
/ Required
Default
Notes
Customer ID of the Google Ads Manager account; accepts hyphenated or number forms.
Example
111-222-4444
Input
Revoke URL
string
/ Required
Hidden Field
Default
https://oauth2.googleapis.com/revoke
Notes
The OAuth 2.0 Revoke URL for the API
Example
 
Input
Scopes
string
/ Required
Hidden Field
Default
https://www.googleapis.com/auth/adwords
Notes
Space separated OAuth 2.0 permission scopes for the API
Example
 
Input
Token URL
string
/ Required
Hidden Field
Default
https://oauth2.googleapis.com/token
Notes
The OAuth 2.0 Token URL for the API
Example
 

Actions#

Get Conversion Action#

Get Conversion Action | key: getConversionAction

InputDefaultNotesExample
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Customer ID
string
/ Required
Default
Notes
Customer ID of the Google Ads Client account; accepts hyphenated or number forms.
Example
111-222-4444
Input
Page Size
string
/ Required
Default
20
Notes
Numerical value indicating desired page size of paginated results.
Example
20
Input
Page Token
string
Default
Notes
Identifier of which page of results to return. This is returned with paginated results.
Example
CJL5XLT2PWDmIpGNGciABRnu

Get Customer#

Get Customer | key: getCustomer

InputDefaultNotesExample
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Customer ID
string
/ Required
Default
Notes
Customer ID of the Google Ads Client account; accepts hyphenated or number forms.
Example
111-222-4444
Input
Page Size
string
/ Required
Default
20
Notes
Numerical value indicating desired page size of paginated results.
Example
20
Input
Page Token
string
Default
Notes
Identifier of which page of results to return. This is returned with paginated results.
Example
CJL5XLT2PWDmIpGNGciABRnu

List Customers#

List Customers | key: listCustomers

InputDefaultNotesExample
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Page Size
string
/ Required
Default
20
Notes
Numerical value indicating desired page size of paginated results.
Example
20
Input
Page Token
string
Default
Notes
Identifier of which page of results to return. This is returned with paginated results.
Example
CJL5XLT2PWDmIpGNGciABRnu

Output Example Payload#

{  "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"    }  }}

Manual Conversions#

Manual Conversions | key: manualConversions

InputNotesExample
Input
Click ID
string
/ Required
Notes
Google Click ID (gclid) of the conversion.
Example
 
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Conversion Currency
string
/ Required
Notes
Currency associated with the conversion value. This is the ISO 4217 3-character currency code. For example: USD, EUR.
Example
USD
Input
Conversion Name
string
/ Required
Notes
Resource name of the conversion action associated with this conversion.
Example
customers/1234567890/conversionActions/1234567890
Input
Conversion Time
string
/ Required
Notes
The date time at which the conversion occurred. The timezone must be specified. The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm"
Example
2019-01-01 12:32:45-08:00
Input
Conversion Value
string
/ Required
Notes
The value of the conversion for the advertiser.
Example
1
Input
Customer ID
string
/ Required
Notes
Customer ID of the Google Ads Client account; accepts hyphenated or number forms.
Example
111-222-4444