How to build a campaign URL for Google Analytics 4

A campaign URL is your normal link with a few parameters on the end. Google Analytics 4 reads them and reports which email, ad or post sent the visit. Building one takes a minute.

Updated

What a campaign URL looks like

Everything after the question mark is the tracking. The page the visitor sees is the same.

https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=october-update

Build the link

  1. Paste the full address of the page you want people to land on, including https.
  2. Set the source to where the link will be placed: newsletter, linkedin, partner-site.
  3. Set the medium to the type of channel: email, social, cpc, referral.
  4. Set the campaign to one name you reuse on every link for this push: october-update.
  5. Copy the result and use it in place of the plain link.

The parameters GA4 reads

  • utm_source: where the click comes from. Required in practice.
  • utm_medium: the type of channel. GA4 uses it to sort traffic into channel groups.
  • utm_campaign: the name of the campaign.
  • utm_term: the paid keyword.
  • utm_content: which link or ad version was clicked.
  • utm_id: a campaign ID, needed only when you import cost data.
  • utm_source_platform, utm_creative_format and utm_marketing_tactic: extra GA4 dimensions that most sites can leave empty.

Where the data appears in GA4

  1. Open Reports, Acquisition, Traffic acquisition.
  2. Change the first column from Session primary channel group to Session source / medium.
  3. Add Session campaign as a second column with the plus button.
  4. For the next 30 minutes, check Reports, Realtime instead. The standard reports can take a day to fill.

When not to tag a link

  • Links between pages of your own site. A UTM there overwrites where the visitor came from.
  • Google Ads. Turn on auto-tagging in the Google Ads account and let it add the gclid parameter. It carries more detail than manual UTMs.
  • Links you want other sites to copy. People paste the tagged URL and their visitors get counted under your campaign.

Three mistakes to check before you send

  • Mixed case. GA4 counts Email and email as two mediums. Use lowercase.
  • Spaces. They become %20 in the link. Use hyphens.
  • A medium GA4 does not know. A made-up value such as utm_medium=blast lands in the Unassigned channel.

Tools for this guide

All tools →

More guides

All guides →