Autonnel v0.1.0

Google Ads

OAuth-only via the plugin-ads plugin; no token mode supported.


Google Ads is an OAuth-only platform. It requires @autonnel/plugin-ads — there is no token mode. If the plugin is not installed, Google Ads does not appear in the admin UI.

Prerequisites

  • A Google Ads account with a Developer Token approved (or in test mode)
  • A Google Cloud project with the Google Ads API enabled and OAuth credentials created
  • @autonnel/plugin-ads installed and registered in astro.config.mjs

Why there is no token mode

Facebook, TikTok, and Bing provide long-lived bearer tokens you can paste into a settings form. Google’s Ads API design does not offer this path — all API access requires an OAuth refresh token scoped to a specific customer account. There is no equivalent “generate a static token” flow in Google Ads. Because of this, Google Ads cannot be supported without an OAuth authorization flow and therefore requires the plugin.

Plugin setup

Install the plugin:

npm install @autonnel/plugin-ads

Register it with Google credentials in astro.config.mjs:

import autonnel from 'autonnel';
import adsPlugin from '@autonnel/plugin-ads';

export default defineConfig({
  integrations: [
    autonnel({
      plugins: [
        adsPlugin({
          google: {
            clientId: 'YOUR_GOOGLE_CLIENT_ID',
            clientSecret: 'YOUR_GOOGLE_CLIENT_SECRET',
            developerToken: 'YOUR_DEVELOPER_TOKEN',
          },
        }),
      ],
    }),
  ],
});

The clientId and clientSecret come from your Google Cloud project’s OAuth credentials (type: Web application). The developerToken is issued by Google Ads — see below.

Obtaining a Developer Token

  1. Sign in to your Google Ads manager account (MCC).
  2. Go to Tools & SettingsAPI Center.
  3. Fill in the required fields and submit an application for a Developer Token.
  4. While awaiting approval, Google issues a test-mode token that only works against test accounts.

Production token approval can take several business days. You can proceed with a test token during development.

Authorization walkthrough

Once the plugin is configured:

  1. Go to Ads in the autonnel admin.
  2. Click Add platformGoogle Ads.
  3. Click Connect with OAuth.
  4. You are redirected to Google’s consent screen. Sign in with the Google account that has access to the Google Ads customer you want to use.
  5. After granting access, you are redirected back. Autonnel stores the refresh token and lists the accessible ad accounts.
  6. Select the ad account and save.

Event mapping defaults

Internal eventGoogle Ads event
PURCHASEPurchase

PURCHASEPurchase is non-editable. Additional available events: Lead, PageView, AddToCart, BeginCheckout.

Google Ads conversion actions are created in your Google Ads account and identified by a resource name. The plugin maps internal events to conversion action resource names at send time. You configure the resource name in the platform settings after authorization.

Click-ID routing

Three parameters identify Google Ads traffic:

ParameterDescription
gclidStandard Google click ID
wbraidiOS privacy-preserving identifier (web-to-app)
gbraidiOS privacy-preserving identifier (app-to-web)

If any of these parameters is present when an order is created, the postback is routed to the Google Ads adapter.

Caveats

  • Google Ads will not appear in the admin UI until the plugin is installed and Google credentials are provided in astro.config.mjs.
  • OAuth refresh tokens expire after 6 months of inactivity. If a token expires, the platform shows as disconnected in the admin UI. Re-authorize by clicking Connect with OAuth again.
  • Developer Token approval from Google can take days. Plan for this delay when scheduling a go-live date.
  • The Google Ads API quota is tied to your Developer Token’s access level. Standard access allows more conversion uploads per day than test access.