{"id":5436,"date":"2022-10-27T16:16:48","date_gmt":"2022-10-27T13:16:48","guid":{"rendered":"https:\/\/trackingchef.com\/?p=5436"},"modified":"2023-09-20T17:53:18","modified_gmt":"2023-09-20T14:53:18","slug":"custom-variables-google-ads-conversion","status":"publish","type":"post","link":"https:\/\/trackingchef.com\/google-ads\/custom-variables-google-ads-conversion\/","title":{"rendered":"Adding Custom Variables to a Google Ads Conversion"},"content":{"rendered":"\n

Working with Google Ads you can use multiple conversions to track various meaningful actions users perform on your site. But what if you want to track tens of lead forms, for example, various gated content? Or maybe multiple events you’re promoting.<\/p>\n\n\n\n

Setting up endless conversions is a bad habit, so for this, we will need to add some variable that’s sent with every conversion, containing additional information about that conversion. Enter Google Ads Custom Variables<\/a>.<\/p>\n\n\n\n

These Custom Variables are a great solution for any brand running Google Ads at scale. From SaaS companies who want to track the plan user’s purchased, to a tour guide that wants to know which tours were booked by a specific keyword he’s promoting.<\/p>\n\n\n\n

These custom variables must be set up both in the code and in Google Ads.<\/p>\n\n\n\n

Creating the Custom Variables in Google Ads<\/h2>\n\n\n\n

Simply navigate to the Custom Variables tab from the Conversions screen. The first field indicates the name of the Custom variable that will be visible in Google Ads reports. The second field, Tag string, is the name of the variable passed in the code.<\/p>\n\n\n

\n
\"\"<\/figure><\/div>\n\n\n

Manually installing the Google Ads Custom Variables<\/h2>\n\n\n\n

If your Google Ads code is installed directly on your site, adjust the GTAG event to use the variable you created. The variable’s key is the “Tag String” set in Google Ads, and the variable’s value should be set dynamically based on the user’s action.<\/p>\n\n\n\n

gtag('event', 'conversion', {'send_to': 'AW-1234567890\/abcdefghijklmnop','value': 1.0, 'currency': 'USD', 'hotel': [hotel_name]});<\/code><\/pre>\n\n\n\n

Installing the Google Ads Custom Variable using Google Tag Manager<\/h2>\n\n\n\n
\n

Update (February 2023)<\/strong>
Several client accounts using this method have run into conversion tracking issues in Google Ads over the past few weeks. I recommend using a standard Google Ads Conversions tag instead (which unfortunately can’t use these Custom Variables)<\/p>\n<\/blockquote>\n\n\n\n

You can also add the custom variable to your Google Ads Tag in GTM. Google Ads Conversion tag doesn’t support these custom variables in GTM, so in this case, we will use the Google Ads Remarketing Tag. It’s worth noting that technically there isn’t any difference between the tags, other than Conversion making the conversion label mandatory (as it is linked to a specific conversion in the account).<\/s><\/p>\n\n\n\n

    \n
  1. Create a new tag of the type Google Ads Remarketing Tag<\/li>\n\n\n\n
  2. Set both the Conversion ID and Conversion Label<\/li>\n\n\n\n
  3. Toggle the Custom Parameters to Manually Specify<\/li>\n\n\n\n
  4. Set the Key to the “Tag String” set in Google Ads<\/li>\n\n\n\n
  5. Set the Value to a variable with the data you want to send<\/li>\n<\/ol>\n\n\n
    \n
    \"image-1598100\"
    Google Ads Remarketing Tag with Custom Variables<\/figcaption><\/figure><\/div>\n\n\n

    Note that you can also use the “Use Data Layer” option but it defaults to a standard schema by Google that most likely won’t match your needs. I strongly recommend sending these explicitly instead.<\/s><\/p>\n","protected":false},"excerpt":{"rendered":"

    Working with Google Ads you can use multiple conversions to track various meaningful actions users perform on your site. But what if you want to track tens of lead forms, for example, various gated content? Or maybe multiple events you’re promoting. Setting up endless conversions is a bad habit, so for this, we will need […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,39],"tags":[],"_links":{"self":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/5436"}],"collection":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/comments?post=5436"}],"version-history":[{"count":5,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/5436\/revisions"}],"predecessor-version":[{"id":5754,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/5436\/revisions\/5754"}],"wp:attachment":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/media?parent=5436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/categories?post=5436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/tags?post=5436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}