# Google Ads

## Prerequisites

Connecting to the Google Ads API requires:

1. Obtain a Google Ads Developer token\
   Follow the [Google documentation](https://developers.google.com/google-ads/api/docs/get-started/dev-token) which takes you through two steps:
   1. Select or create a Google Ads manager account
   2. Apply for access to the Google Ads API
2. [Create or use a Google Cloud OAuth App](#oauth-user-created)

You can see if your access is complete by searching 'Google Ads API' in the Google Cloud universal search bar

<figure><img src="https://2119005510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FedNbhp7XNeTdK7we4Ka5%2Fuploads%2Fgit-blob-dd9875a57636fec7f11e5a1724920fce2e86a650%2Fimage.png?alt=media" alt="" width="563"><figcaption><p>Search 'Google Ads' in the universal search bar</p></figcaption></figure>

## Authentication methods

#### OAuth (User Created)

This method uses your own Google Project to authorize access, and is the most secure method since your own OAuth credentials are used.

To generate credentials:

1. Visit <https://console.cloud.google.com/apis/credentials> and select your project
2. Click "Create Credentials" and choose "OAuth Client ID" as the type
3. Choose "Web Application" as the application type
4. Add a redirect URI to the Google OAuth app

{% hint style="info" %}
If you're unsure what value to for the redirect URI, the following Snowflake query will construct it for your account:\
\
`select 'https://'||get(parse_json(SYSTEM$allowlist()),0):"host"::varchar||'/oauth/complete-secret' as REDIRECT_URL;`
{% endhint %}

5. Click Create, and use the generated Client ID and Secret during Omnata connection creation.

<figure><img src="https://2119005510-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FedNbhp7XNeTdK7we4Ka5%2Fuploads%2Fgit-blob-8a55f871aee82d3406ed3ad9ce675b6123f21c26%2FGoogle%20sheet%20client%20ID%20and%20secret.png?alt=media" alt=""><figcaption></figcaption></figure>

6. In the Omnata App, Create a Connection and follow the instructions to create and authorise the integration.

## Inbound Syncs

* Campaign
* Metrics

### Supported Sync Strategies

* Incremental
* Full-refresh

## Outbound Syncs

Coming soon...
