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-adsinstalled and registered inastro.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
- Sign in to your Google Ads manager account (MCC).
- Go to Tools & Settings → API Center.
- Fill in the required fields and submit an application for a Developer Token.
- 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:
- Go to Ads in the autonnel admin.
- Click Add platform → Google Ads.
- Click Connect with OAuth.
- 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.
- After granting access, you are redirected back. Autonnel stores the refresh token and lists the accessible ad accounts.
- Select the ad account and save.
Event mapping defaults
| Internal event | Google Ads event |
|---|---|
PURCHASE | Purchase |
PURCHASE → Purchase 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:
| Parameter | Description |
|---|---|
gclid | Standard Google click ID |
wbraid | iOS privacy-preserving identifier (web-to-app) |
gbraid | iOS 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.