> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalyr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Ads

> What an agent can build in your Google Ads account: Search campaigns with bidding and locations, keyword ad groups, responsive search, display and Demand Gen ads, and what it can't do.

Agents create Google Ads Search campaigns and ad groups, and add ads to existing Search,
Display and Demand Gen ad groups. They work in the customer account you selected for
Google Ads in **Sources**. Everything starts paused.

## Before you start

| Requirement | Detail |
| - | - |
| Google Ads connection | Connected in **Sources**, with the customer account selected |
| Conversion actions | Only for conversion-based bidding. Without an active one, the preview warns that the bidding has nothing to optimize for. |
| Auto-tagging | We recommend that you turn it on in Google Ads. Without it, clicks carry no `gclid`. DATALYR's UTMs are still added, and the preview warns. |

## Campaigns

Pass `platform: "google"` in `target`. Agents create Search campaigns only.

| Field | Values |
| - | - |
| `type` | `search` |
| `budget` | Required: `{ "daily": 50 }`. A new budget for this campaign alone, never a shared one. |
| `bidding.strategy` | `maximize_conversions`, `target_cpa` with `target_cpa`, `target_roas` with `target_roas` (`3.5` means 350%), `maximize_clicks` with an optional `max_cpc` cap, or `manual_cpc` |
| `locations` | `countries` (2-letter codes), `location_ids` and `excluded_location_ids` (Google geo target ids) |
| `languages` | Language codes such as `en`. Leave out for all languages. |
| `search_partners` | `false` by default. Display expansion stays off. |

### Find location ids

Ask the agent to look them up. It calls `search_targeting` with `platform: "google"`,
`type: "location"` and the place name in `q`. The ids go in `locations.location_ids` or
`excluded_location_ids`. `type: "language"` returns language codes the same way.

```json theme={null}
{ "platform": "google", "account_id": "1234567890", "type": "location", "q": "Austin" }
```

## Ad groups

Agents add Search ad groups with keywords. Budget and bidding stay on the campaign.

| Field | Values |
| - | - |
| `keywords` | 1 to 200, each `{ "text": "running shoes", "match": "exact" }`. `match` is `exact`, `phrase` or `broad`. |
| `negative_keywords` | Up to 200, in the same shape |
| `default_cpc` | Required in Manual CPC campaigns, and only there: the most to pay per click |

A keyword has at most 80 characters and 10 words, and no symbols such as `! @ % * , ?`
or brackets.

## Ads

Agents add ads to existing ad groups. The ad group's campaign decides the formats.

| Campaign | Format | Ad type |
| - | - | - |
| Search | `search_text` | Responsive search ad |
| Display | `multi_asset` | Responsive display ad |
| Demand Gen | `multi_asset` | Demand Gen image ad |
| Demand Gen | `video_responsive` | Demand Gen video ad, with existing YouTube videos |

| Format | Text | Files |
| - | - | - |
| Responsive search | 3 to 15 headlines (30 characters), 2 to 4 descriptions (90), up to 2 display paths (15). Pin headlines to positions 1 to 3 and descriptions to 1 or 2. | None. No call to action. |
| Responsive display | 1 to 5 headlines (30), 1 long headline (90), 1 to 5 descriptions (90) | 1.91:1 images (at least 600×314) and 1:1 images (300×300): at least one of each, 15 in total. Up to 5 logos, 1:1 or 4:1. |
| Demand Gen image | 1 to 5 headlines (40), 1 to 5 descriptions (90) | Up to 20 images: 1.91:1, 1:1, 4:5 (480×600) or 9:16 (600×1067), with at least one 1.91:1 or 1:1. A 1:1 logo is required. |
| Demand Gen video | 1 to 5 headlines (40), long headlines (90) and descriptions (90) | 1 to 5 YouTube video ids in `platform_options.youtube_video_ids`. A 1:1 logo is required. |

| Ad rule | Detail |
| - | - |
| Business name | Display and Demand Gen ads show `identity.business_name` and a logo from `identity.logo_asset_id`. Google ads have no Page. |
| Text width | Chinese, Japanese and Korean characters count as 2 |
| Landscape images | Must be 1.91:1, for example 1200×628. 16:9 isn't accepted. |
| Demand Gen headlines | Keep one at 30 characters or fewer, or the ad won't show on Display |
| Responsive search ads per ad group | Google runs at most 3 enabled at once. The preview warns, and the new ad stays paused. |
| Display options | `platform_options`: `main_color` and `accent_color` together as `#RRGGBB`, `allow_flexible_color`, `format_setting` (`ALL_FORMATS`, `NATIVE`, `NON_NATIVE`), `price_prefix`, `promo_text` |
| Call to action | Optional on display and Demand Gen ads, for example `SHOP_NOW` or `LEARN_MORE` |

Google reviews ads while they are paused, so `get_ad_status` shows `approved` or
`rejected` before you turn an ad on.

## What agents can't do on Google Ads

| Not available | What happens |
| - | - |
| Creating Display, Demand Gen, Performance Max or other campaign types | `create_campaign` takes `search` only |
| Ads in Performance Max, Video, Shopping or App campaigns | Shown with `can_add_ads: false` |
| Smart Display campaigns and dynamic search ad groups | Shown with `can_add_ads: false` |
| Campaigns declared as EU political advertising | Shown with `can_add_ads: false` |
| Demand Gen carousel ads | Not offered as a format |
| Uploaded video files | Refused. Use YouTube video ids. |
| Audiences in new ad groups | `list_ad_audiences` lists them for reference only |
| Shared budgets and total (custom-period) budgets | Budget changes refused. Change them in Google Ads. |
| Archive, delete, new content for an ad | Refused. Pause instead. |
| Policy exemptions | Refused |

## Changes after launch

Turn on, pause, and a campaign's own daily budget. See
[Change ads after launch](/agent-ads/change-ads). Google can spend up to 2× a daily
budget on one day, and at most 30.4× it in a month.

## Previews

Google Ads has no rendered preview. The agent shows you the headlines, descriptions and
link from the summary before you say yes.

## Next

* [Add ad files](/agent-ads/files): images and logos for display and Demand Gen.
* [Turn ads on within spend limits](/agent-ads/live-ads-and-spend-limits): what turning on counts.
* [Google Ads](/integrations/google-ads): connect Google Ads and send conversions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.