Google Ads: create conversion action
create_conversion_actionCreates a Google Ads conversion action (what the account counts as a result) and returns the conversion ID and label its website tag needs.
Only type WEBPAGE can be created: a result counted by a Google Ads
conversion tag on the website. Stage that tag in Tag Manager with the
returned conversion_id and conversion_label (the "Google Ads Conversion
Tracking" tag, fired on the sign-up / thank-you trigger); nothing is
counted until the user publishes the Tag Manager container.
Analytics-imported types (GOOGLE_ANALYTICS_4_CUSTOM, _PURCHASE) cannot be
created through the Google Ads API and are refused with an explanation.
This tool creates one ENABLED action and changes nothing else: it never
edits, demotes or removes an existing conversion action or goal.
primary_for_goal has no default on purpose — a primary action is one the
account's bidding aims for, so ask the user and pass their answer.
Args:
customer_id: The Google Ads customer ID (numbers only, no hyphens).
name: The conversion action's name, unique in the account
(e.g. "Sign-up (website)").
category: What the result is. One of: SIGNUP, SUBMIT_LEAD_FORM,
PURCHASE, CONTACT, BOOK_APPOINTMENT, REQUEST_QUOTE, SUBSCRIBE_PAID,
BEGIN_CHECKOUT, ADD_TO_CART, DOWNLOAD, GET_DIRECTIONS,
OUTBOUND_CLICK, PAGE_VIEW, DEFAULT.
primary_for_goal: True makes this a primary action — campaigns that
bid for conversions aim for it. False records it as secondary
(reported, not bid on). Required: pass what the user chose.
type: The conversion action type. Only WEBPAGE is supported.
counting_type: ONE_PER_CLICK (one result per ad click — right for
sign-ups and leads) or MANY_PER_CLICK (every result — right for
purchases). Defaults to MANY_PER_CLICK for PURCHASE and
ONE_PER_CLICK for every other category.
default_value: The value of one result, in the account's currency
(a plain amount, not micros). Optional; no value is set if omitted.
default_currency_code: ISO 4217 currency code for default_value,
e.g. the account's own currency. Optional.
always_use_default_value: True always records default_value, ignoring
any value the tag sends. Optional.
click_through_lookback_window_days: How many days after an ad click a
result still counts (1-90). Optional; Google's default if omitted.
Returns:
Dictionary with the new action's resource name and id, its
conversion_id / conversion_label / send_to for the website tag, the
other enabled primary actions already in this category (read only),
and whether the account's goal for this category is biddable.Tools revision: 5c9bea8f.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | No | WEBPAGE | |
| category | Yes | ||
| customer_id | Yes | ||
| counting_type | No | ||
| default_value | No | ||
| primary_for_goal | Yes | ||
| default_currency_code | No | ||
| always_use_default_value | No | ||
| click_through_lookback_window_days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |