Even if auto-tagging is enabled, there are some cases where the Google Click Identifier (GCLID) cannot be used as intended. This can happen, for example, when ad_user_data is denied through your Consent Mode implementation. In these situations, the automatic retrieval of dimensions from the Ads platform might be impacted. As a result, you might see (data not available) labels for cross-channel traffic source dimensions in Google Analytics.
To improve the above, you can implement manual tagging (UTM parameters) alongside auto-tagging. Manual tagging allows you to send traffic source information to Google Analytics by configuring destination URLs with UTM parameters to populate traffic-source dimensions.
While implementing manual tagging using UTMs, we encourage you to maintain consistency on the values for each of the ads platforms to ensure consistency in your reports and automate as much as possible the collection of the values of UTM parameters.
The following script helps to automatically sets a custom parameter at campaign level with the value equals to the name of each campaign. It allows client to ease their tracking in GA4 with utm. Specifically: utm-campaign
Attention: this script works only for Search, Shopping and Performance Max campaigns.
We recommend using this script which automatically sets a custom parameter at campaign level with the name of each campaign.
- In your Google Ads account, click the Tools icon.
- Click the Bulk actions drop down in the section menu.
- Click Scripts.
- Click the plus button to create a new script.
- Name it as you prefer (we recommend a name that you can easily identify as the script goal)
- Delete the content of the script.
- Copy paste and the code from the file main.js
Save the script, authorize it and then run it.
We strongly recommend you to schedule it every day.
Final url suffix allows you to enter parameters that will be attached to the end of your landing page URL so you can track information about where people go after they click your ad. It can be set at different levels in your account: Account, Campaign, Adgroup, or Ad level.
If you are not using a tracking tool (ad management and/or site centric) we recommend to set the utms at the account level:
- Navigate in the Google Ads account, and go in the Account setting section.
- There you’ll find a “Tracking” setting.
- Here you can find the Final URL suffix field. Set it to: utm_source=google&utm_source_platform=Google+Ads&utm_medium=cpc&utm_campaign={_campaignname}&utm_campaignid={campaignid}
If you are using a tracking tool, check on your account at every level, where the “final url suffix” field is already filled out. We recommend using Google Ads Editor to check this quickly.
If some final url suffix is filled, just download a bulksheet of your account.
If they are not using the final URL suffix yet, make sure you set-up a final url suffix at the account level.
In your bulksheet, add the UTM parameters after your existing final URL suffix: "&utm_source=google&utm_source_platform=Google+Ads&utm_medium=cpc&utm_campaign={_campaignname}&utm_campaignid={campaignid}"
Example:
- Final URL suffix is already set to “a=1&b=2”.
- Just add after the utm parameters for Google Analytics:
- a=1&b=2*&utm_source=google&utm_source_platform=Google+Ads&utm_medium=cpc&utm_campaign={_campaignname}&utm_campaignid={campaignid}*
Note that we recommend adding the URL suffix at the highest possible level.
In your Google Ads account, enter in the edition of one of your ads.
In the URL option section, you’ll find a “Test” button. This will allow you to verify that UTM parameters are properly filled. The name of the campaign should be readable.
See CONTRIBUTING.md
for details.
Apache 2.0; see LICENSE
for details.
This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.