The advantage of the web is that we can fairly reliably and accurately measure the performance of various campaigns.

By linking your website to Google Analytics 4 (GA4), you can, for example, check the number of impressions and clicks. But what if you're inviting visitors to the same landing page from different sources and you want to know which source is bringing you the most? You can also check that, but you need to tweak your URL a bit.

For a clearer understanding, let's use the example below.

You are promoting your campaign on various channels - on the Facebook social network, via email, using ads (Google Ads), on ads from external providers. If you don't have the URL parameters properly set up, GA4 will only record the total clicks from all channels. To avoid this, you can use a tool like the URL Builder.

The URL Builder is a tool that allows you to add different parameters to the basic URL (e.g., http://www.example.com). Parameters (also called UTM or tags) are all the tags following the question mark symbol (?): utm_source, utm_medium, utm_content, utm_campaign.

The URL Builder lets you add parameters to any URL by:

  • Campaign Source (utm_source): with this tag, we define the source of the visit - e.g., facebook, google, newsletter,
  • Campaign Medium (utm_medium): with this tag, we specify the advertising medium - e.g., cpc, email, paid_social, banner,
  • Campaign Name (utm_campaign): we can give the campaign a name - e.g., 48hour_sale
  • Campaign Term (utm_term): we can mark the words we are advertising on on the URL,
  • Campaign Content (utm_content): a tag useful for A/B testing.
  • Campaign ID (utm_id): an optional campaign identifier (GA4).

Of course, you can omit any of the tags. Do not add manual UTM tags to links within your own site (they overwrite the visit source), use lowercase and a consistent format (facebook, not Facebook or FB), and do not put personal data (emails, names) into links. Document your tags in a spreadsheet; in advertising platforms use dynamic parameters where they support them.

You can easily get a URL with all the tags by entering all the necessary data into the URL Builder and copying the URL.

A URL with tags provides key information about the channel through which you drove traffic to your site: the type of campaign and the key word. This advertising method is recommended for use in all marketing activities where analytical data is important for us.

Examples of campaign tagging:

Facebook: for paid advertising on Facebook and Instagram, use utm_source=facebook and utm_medium=paid_social, and add the campaign and ad name.

Example: www.example.com/?utm_source=facebook&utm_medium=paid_social&utm_campaign=campaign_name&utm_content=ad_name

Email: as the source use newsletter and as the medium email, and GA4 will categorize the visit into the Email channel by default. Larger providers for mass email campaigns already allow automatic tagging.

Example: www.example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=2026-03_spring (in the campaign name, use the format year-month)

External advertising: for the source (source), determine the advertiser and the format - e.g., advertising with banners on a chosen portal.

Example: www.example.com/?utm_source=portal_name&utm_medium=banner&utm_campaign=campaign_name

An exception is Google Ads, where auto-tagging (gclid) and the link to GA4 are enabled; you usually do not add manual UTM tags to paid Google ads.

After properly setting the utm_source or utm_medium tag, check the analytical data. Monitor analytics as often as possible, as the URL Builder is an excellent tool that provides a precise overview of various performance indicators; you can obtain valuable information during the campaign.

Measuring in a time of privacy

Updated 2026. Measuring an online store has changed fundamentally since 2022. Universal Analytics stopped processing data in July 2023 and was replaced by GA4, which does not count page views but events (item view, add to cart, begin checkout, purchase). Visitors who decline cookies are invisible to analytics, so you will always lose part of your visits. Safari, Firefox and iOS restrict tracking, and for advertising features in the European Economic Area Google requires consent signals (Consent Mode v2).

What to do?

  1. The truth is the orders in your store. Take revenue and the number of orders from the store or from your ERP. Analytics, Meta and Google Ads interpret, but they will never match 100%.
  2. Set up GA4 properly. Events with values, key events (purchase, inquiry), your own traffic excluded, a link to Google Ads and Search Console; export the data to BigQuery for larger stores.
  3. Introduce Consent Mode v2 through a consent management platform (CMP) that supports it. In basic mode, tags load only after consent; in advanced mode Google also receives limited signals without consent and models conversions from them. The legal assessment of advanced mode depends on the supervisory authority, so if you are not sure, choose basic mode.
  4. For larger stores, consider server-side tagging. Events are sent by your server instead of the browser, which can improve control over data and measurement reliability and relieve the browser; it requires your own server environment and costs. It does not bypass consent: you need a legal basis for every event.
  5. At purchase, send the advertising platform hashed customer data (enhanced conversions at Google, Conversions API at Meta), always in line with consent.
  6. Look wider. Customer acquisition cost, ROAS and the share of repeat customers. For bigger decisions compare the periods before and after a change, not only the attribution of a single ad.
  7. Use session recordings and heatmaps (Clarity, Hotjar) with consent and mask fields containing personal data.

Data transfers to the US are currently governed by the EU-US Data Privacy Framework (since July 2023); an appeal before the Court of Justice of the EU is pending, so check the current status when you rely on it. More on consent and cookie rules: Online store legislation (EU).

Do today

  1. Compare last month's number of orders in the store and in GA4 and write down the difference.
  2. Check that the "Accept all" and "Reject all" buttons in the consent banner are equally prominent.
  3. Check in GA4 that the "purchase" event is recorded only once.
  4. Exclude your own traffic from the reports.
  5. Write down where in the company you take the "real" order numbers from.

Frequently asked questions

UTM parameters are tags added to URL links for tracking traffic sources in GA4 (Google Analytics 4). With them, we know exactly which campaign, medium, and source a visitor came from when they made a purchase - not just "referral" or "direct".

Standard parameters: utm_source (e.g. facebook, newsletter), utm_medium (cpc, email, social), utm_campaign (campaign name), utm_content (differentiating between ad variants), and utm_term (keyword for search campaigns). The first three are sufficient for basics; utm_id is an optional campaign identifier in GA4.

With Google Campaign URL Builder (free tool). Always use lowercase and no spaces (use - or _ instead of spaces). Consistent naming convention is key - inconsistent UTMs create chaos in reports.

In GA4 go to Reports - Acquisition - Traffic acquisition. Here you see traffic segmentation by source/medium. For campaign reporting, select the "Session campaign" dimension. Combine with conversion metrics for a complete picture. Keep in mind that visitors who decline analytics cookies are not visible in the reports.

By themselves no - Google knows UTM parameters are for analytics. Make sure pages with parameters have a canonical URL without parameters, and do not use UTM tags in internal links.

Anže Voh
AuthorAnže Voh

My name is Anže, I am a certified Magento solution expert and the maker of several award-winning online stores. I am the architect of all Degriz projects.

Write to me →