google_ads_conversion_action
A conversion action is a measurable event you care about — a form submit, a phone call, a purchase. Conversion actions tell Google what to optimize toward and what to report on.
Google matches a declared conversion action to the live one by name, so writing a block that repeats the name of an action the account already has adopts it rather than creating a second one. That is how you take over an action Google Analytics or the Google Ads UI created for you.
Example
A simple lead-form conversion with a fixed value:
resource "google_ads_conversion_action" "lead" { name = "Lead form submit" type = "WEBPAGE" category = "SUBMIT_LEAD_FORM" status = "ENABLED" counting_type = "ONE_PER_CLICK" primary_for_goal = true click_through_lookback_window_days = 30 view_through_lookback_window_days = 1
value_settings { default_value = 50 default_currency_code = "EUR" always_use_default_value = true }}Primary or secondary
primary_for_goal is the setting that decides what your Conversions
column means, and therefore what Smart Bidding buys:
primary_for_goal = true— the action counts in the Conversions column and bidding optimizes toward it.primary_for_goal = false— the action is still measured and still reported (“all conversions”), but it is observation-only: it does not drive bidding.
Google’s default is primary. An auto-imported pageview event left
at the default can quietly become most of your reported conversions, so
bidsmith validate warns about a PAGE_VIEW action that stays primary.
See Stop counting pageviews as
conversions.
Schema
Required
-
name( String ) -
type( String ) One of:UNKNOWN,AD_CALL,ANDROID_APP_PRE_REGISTRATION,ANDROID_INSTALLS_ALL_OTHER_APPS,CLICK_TO_CALL,FIREBASE_ANDROID_CUSTOM,FIREBASE_ANDROID_FIRST_OPEN,FIREBASE_ANDROID_IN_APP_PURCHASE,FIREBASE_IOS_CUSTOM,FIREBASE_IOS_FIRST_OPEN,FIREBASE_IOS_IN_APP_PURCHASE,FLOODLIGHT_ACTION,FLOODLIGHT_TRANSACTION,GOOGLE_ANALYTICS_4_CUSTOM,GOOGLE_ANALYTICS_4_PURCHASE,GOOGLE_HOSTED,GOOGLE_PLAY_DOWNLOAD,GOOGLE_PLAY_IN_APP_PURCHASE,LEAD_FORM_SUBMIT,SALESFORCE,SEARCH_ADS_360,SMART_CAMPAIGN_AD_CLICKS_TO_CALL,SMART_CAMPAIGN_MAP_CLICKS_TO_CALL,SMART_CAMPAIGN_MAP_DIRECTIONS,SMART_CAMPAIGN_TRACKED_CALLS,STORE_SALES,STORE_SALES_DIRECT_UPLOAD,STORE_VISITS,THIRD_PARTY_APP_ANALYTICS_ANDROID_CUSTOM,THIRD_PARTY_APP_ANALYTICS_ANDROID_FIRST_OPEN,THIRD_PARTY_APP_ANALYTICS_ANDROID_IN_APP_PURCHASE,THIRD_PARTY_APP_ANALYTICS_IOS_CUSTOM,THIRD_PARTY_APP_ANALYTICS_IOS_FIRST_OPEN,THIRD_PARTY_APP_ANALYTICS_IOS_IN_APP_PURCHASE,UPLOAD_CALLS,UPLOAD_CLICKS,WEBPAGE,WEBPAGE_CODELESS,WEBSITE_CALL. -
category( String ) One of:UNKNOWN,DEFAULT,PAGE_VIEW,PURCHASE,SIGNUP,LEAD,DOWNLOAD,ADD_TO_CART,BEGIN_CHECKOUT,SUBSCRIBE_PAID,PHONE_CALL_LEAD,IMPORTED_LEAD,SUBMIT_LEAD_FORM,BOOK_APPOINTMENT,REQUEST_QUOTE,GET_DIRECTIONS,OUTBOUND_CLICK,CONTACT,ENGAGEMENT,STORE_VISIT,STORE_SALE,QUALIFIED_LEAD,CONVERTED_LEAD.
Optional
-
status( String ) One of:ENABLED,REMOVED,HIDDEN. Default"ENABLED"; omit to manage at the default. -
counting_type( String ) One of:ONE_PER_CLICK,MANY_PER_CLICK. -
primary_for_goal( Boolean ) -
include_in_conversions_metric( Boolean ) -
click_through_lookback_window_days( Integer ) -
view_through_lookback_window_days( Integer ) -
phone_call_duration_seconds( Integer )
Nested blocks documented below: value_settings, attribution_model_settings.
phone_call_duration_seconds applies to call actions: a call shorter
than this many seconds is not counted at all. The Google Ads UI sets 60
on the call action it creates for you, which discards every call under a
minute; 0 counts them all.
include_in_conversions_metric is a second, older switch over the same
column, from before Google grouped actions into conversion goals. Both
stay writable — declare whichever one your account actually uses, so a
change to it lands in review rather than in a report nobody questions.
Nested blocks
value_settings
Default monetary value Google assigns to each conversion.
always_use_default_value = true overrides any per-conversion value
sent at fire time (useful when the value is unknown until the lead is
qualified).
Optional
-
default_value( Number ) -
default_currency_code( String ) -
always_use_default_value( Boolean )
attribution_model_settings
How credit for one conversion is spread across the clicks that led to
it. Google offers two models for new selections —
GOOGLE_ADS_LAST_CLICK and GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN —
and the retired heuristic models are still accepted here so an account
that reports one keeps round-tripping.
Optional
-
attribution_model( String ) One of:EXTERNAL,GOOGLE_ADS_LAST_CLICK,GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK,GOOGLE_SEARCH_ATTRIBUTION_LINEAR,GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY,GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED,GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN.
See also
google_ads_call_asset— links a phone number to a call-tracking conversion action.- Stop counting pageviews as conversions — the whole workflow for an imported action.
- Google’s conversion-tracking docs — for choosing
typeandcategory.