If you want to use Google Ads auto-tagging for a deep integration with Google Analytics and you don’t want to have to manually tag all of your ads so that they are also recognizable in Heap, follow these steps for a quick solution on manual and auto-tagging for Google Ads.
The only methods that will capture UTM parameters are those that begin with ‘utm_’
Within Google Ads, you can use ValueTrack and custom parameters along with a tracking template to automatically generate a tagged URL with all of the information you need. A tracking template which populates the query string with campaignid, adgroupid, and keyword looks like this:
{lpurl}?campaignid={campaignid}&adgroupid={adgroupid}&term={keyword}
Then when someone clicks on one of your ads, {lpurl} will be replaced with your landing page, and the rest of the parameters will be expanded to contain the campaign id, ad group id, and keyword. For a list of all parameters and instructions on how to set this up, see Google’s support docs on Setting up tracking with ValueTrack parameters.
To get the actual campaign and ad content rather than just the IDs which aren’t that useful, you need to use custom parameters at the campaign and ad level and then use the parameters like this:
{lpurl}?utm_source=google&utm_medium={ifsearch:cpc}{ifcontent:display}&utm_campaign={_campaign}&utm_term={keyword}&utm_content={_content}
At the campaign level, you’ll need to set up a customer parameter named _campaign containing the URL encoded name of the campaign. At the individual ad level, you’ll need to set up a parameter named _content containing the URL encoded title of the ad. You can include these columns in your CSV upload by deriving them from the ad and campaign names. You can find the full list of CSV columns mappings in Google’s documentation on CSV file columns.
For more information on setting up custom parameters, check out this Google documentation on Creating custom parameters for advanced tracking.
Lastly, within Google Analytics, you’ll want to check the following option at the property level:
Allow manual tagging (UTM values) to override auto-tagging (GCLID values)
This will allow Google Analytics to merge the auto-tagging data from the gclid parameter with your manual (automatic) tagging.
For more information about the manual override, see Google’s documentation on Using auto-tagging for non-Analytics purposes.