TapCub is live — analytics, insights and live chat, free on one platform
Analytics

Data Transformation Examples for Analytics: UTM, Events and Channels

Four analytics data transformation examples with before and after numbers: UTM case normalization, merging event names, channel mapping rules and page paths, and how to verify each one.

Su He Published Nov 23, 2026 10 min read Analytics
Sample data: three event names for one sign-up button. Merged, 410 completions out of 1,270 clicks is 32.3%, not the 50.0% seen from the first name alone.Sample data

Data transformation examples in analytics change how recorded data is labelled so that one real thing is counted once. Lower-casing UTM values merges Google and google; merging three event names for one button moves a sign-up rate from 50.0% to 32.3%; a channel rule for two unmapped media moves cost per session from $2.42 to $1.50. Nothing new is measured, but the answers change, so check that totals still reconcile.

What you will learn

  • Fix the source first; use a report-time rule for what you cannot fix; rewrite stored data last
  • Every transformation should reconcile: the sum before and after must match, and you should be able to say why the row count changed
  • Merging can change a conclusion, not just a layout: check conversion rates and cost metrics after each rule

What is data transformation in analytics?

In analytics, data transformation means changing how recorded data is labelled, grouped or combined so that the same real thing is counted once and in the right place. Nothing new is measured. A source written four ways becomes one source; three spellings of one event become one event; a campaign medium nobody mapped gets a channel. The visits and clicks were already there; what changes is the answer to "how many?".

It matters because analytics tools count what they are given, literally. Google Analytics states it plainly for campaign tags: "Parameter values are case sensitive, e.g. utm_source=google is different from utm_source=Google" (Google Analytics Help, checked 2026-11-22). So two tagged links that look identical to a person create two rows in a report. The examples below show how big the effect can be and how to check it. For the wider discipline of keeping data trustworthy, see data quality; for transformation in a pipeline sense, see ETL.

Where should a transformation happen?

There are three places, and they trade permanence against safety:

WhereWhat it doesGood forRisk
At the source (fix the tag)Stops the bad value being recordedAnything you control: UTM naming, event namesOnly helps from now on
At collection or ingestRewrites the value as it arrivesKnown, stable mappingsThe original value is lost if you did not keep it
At report time (rules or views)Maps raw values to clean ones when you read themHistorical data, partner links you do not controlDifferent reports can disagree if rules differ

Order of preference: fix the source first, add a reporting-time rule for what you cannot fix, and rewrite stored data only when you must. Reporting-time rules keep the raw value, so you can change your mind.

Example 1: how does UTM case normalization change source totals?

Sample data: 20,000 sessions in a month. The same sources arrive under several spellings.

Raw utm_sourceSessionsClean source
google5,200google
Google1,300google
GOOGLE300google
facebook2,100facebook
fb900facebook
Facebook400facebook
newsletter1,800email
Newsletter600email
email700email
linkedin1,200linkedin
LinkedIn300linkedin
(direct)5,200(direct)

The rule is two steps: lower-case every value, then map the aliases (fb to facebook, newsletter to email). The 12 rows become 5, and the sessions still add up to 20,000.

SourceBefore (largest single row)AfterShare after
google5,200 (26.0%)6,80034.0%
(direct)5,200 (26.0%)5,20026.0%
facebook2,100 (10.5%)3,40017.0%
email1,800 (9.0%)3,10015.5%
linkedin1,200 (6.0%)1,5007.5%

Before the clean-up, google and direct tie at 26.0%; after it, google leads direct by 8 points. Facebook was never in the top three rows but is the third source once its variants are combined. Case and alias drift hides your real top sources.

TransformationBeforeAfterEffect
UTM case and alias merge12 source rows5 source rowsgoogle 26.0% → 34.0% of sessions
Event name mergesignup_click 820 only1,270 clicksSign-up rate 50.0% → 32.3%
Channel rule (ppc, paid-social)Other 3,200Other 1,200Cost per session $2.42 → $1.50
Path merge (/pricing variants)900 views1,400 views+56% on one page

Sample data; sessions total 20,000 before and after each rule.

Example 2: how does merging event names change a conversion rate?

Sample data: a sign-up button was tracked by three developers over a year.

Raw event nameCountClean event
signup_click820signup_clicked
Signup Click310signup_clicked
sign_up_clicked140signup_clicked
signup_completed410signup_completed

A funnel built only on the first name shows 410 ÷ 820 = 50.0% of clickers completing sign-up. Merged, there are 820 + 310 + 140 = 1,270 clicks, and the rate is 410 ÷ 1,270 = 32.3%. The transformation did not change what visitors did; it removed a flattering error from the denominator. A product team that believed 50% would have declared the sign-up form healthy; at 32.3% it has a problem to fix.

Rule: merge to one canonical name for each real action, keep a table of the old names, and rebuild any funnel that used one of them. Agree on a naming convention (lowercase, underscores, verb in the past tense) so you do not need the merge next year.

app.tapcub.com

Sign-up clicks to completions

after merging 3 event names

Clicks (3 names merged)

1,270

Sign-up completed

410

Counting only one of the three click names showed 410 of 820, a flattering 50.0%.
Sample data
Sample data: three event names for one sign-up button. Merged, 410 completions out of 1,270 clicks is 32.3%, not the 50.0% seen from the first name alone.

Example 3: how does a channel mapping rule change spend metrics?

Sample data: the same 20,000 sessions, grouped by channel. Rules assign a channel from the medium and referrer. The paid campaigns were tagged utm_medium=ppc and utm_medium=paid-social, which the default rules did not recognize.

ChannelBeforeAfterChange
Paid Search1,8002,900+1,100
Paid Social0900+900
Other3,2001,200−2,000
Everything else15,00015,0000

The share of sessions in "Other" falls from 16.0% to 6.0%. The effect on a money metric is larger: with $4,350 spent on paid search in the month, cost per session was $4,350 ÷ 1,800 = $2.42 before the rule and $4,350 ÷ 2,900 = $1.50 after. The campaign always cost $4,350; what changed is that its traffic is now counted. A decision to cut paid search because it looked expensive would have been based on a missing 1,100 sessions.

Check before you save a rule: preview the sessions it will touch, and make sure the three buckets (moved in, moved out, unchanged) sum to the old total, as here: 1,100 + 900 − 2,000 = 0.

Example 4: when should page paths be merged?

Sample data: a pricing page reachable at three addresses.

Raw pathPageviews
/pricing900
/Pricing300
/pricing/200

Merged, /pricing has 1,400 pageviews, 56% more than the 900 on its own row. Be careful here, because not every difference is an error. RFC 3986, the standard for web addresses, states that the scheme and the host are case-insensitive; the path is not in that statement, so whether /Pricing and /pricing are the same page depends on your server. Merge paths only when your site serves the same content at both, and confirm by opening them.

How do you check a transformation did not break the data?

Run the same five checks every time:

  1. Totals reconcile. The sum of all rows before and after must match (20,000 in the examples). A mapping that drops a value shows up as a gap.
  2. Row count falls by the number you expect. 12 raw sources to 5 clean ones; if it fell to 3, something merged that should not have.
  3. Spot-check the extremes. Open the five largest changes and the five smallest rows and confirm each by hand.
  4. Keep the old values. Store the raw value beside the clean one, or apply the rule at report time.
  5. Record the rule with a date. Write when it started and whether history was recomputed, because trend lines will step at that date if it was not.

What mistakes do transformations introduce?

  • Merging things that differ. email for a newsletter and email for transactional mail may need separate channels; check before mapping.
  • Forgetting history. A rule that only applies going forward creates a step in every trend at the date it was added.
  • Letting two reports use different rules. If marketing and product each keep their own mapping, the same campaign has two totals.
  • Silent rules. A rule nobody wrote down becomes a mystery after the next staff change.
  • Treating the transformation as the fix. If the same bad tag keeps arriving, fix it at the source; see how to name UTM parameters in name UTM parameters.

How do you apply these transformations in TapCub?

Take the examples in order.

  1. Channels and sources. In Web analytics › Sources, rows are grouped by channel type from UTM, referring host and click IDs. Rules you add for the site win over the defaults, so you can map ppc and paid-social to paid channels. Channel rules and recomputing history are under Web analytics › Configuration › Web settings. How channels are decided lists the default rules.
  2. Event names. In All-platform analytics › Data › Virtual events / props, a virtual event is a list of rules: if any rule matches, one event with your clean name is written. Rules are OR, conditions inside a rule are AND, and a rule can name a source event. Run preview tests it on the last 7 days of real data and shows matched events and visitors. The copy carries a $virtual_source property with the original name, and it appears in the event list and in every analysis model.
  3. Values inside events. A virtual property checks rules in order, writes the first match and falls back to a default; for example section becomes Blog for paths starting with /blog. A real property with the same name is never overwritten.
  4. Backfill and limits. A virtual event only produces copies for events that arrive after the rule is active, so backfill history before building a funnel. The channel report does not rewrite source fields already stored on events.
  5. Imports. When you import a CSV of events, you map each column to a target field and unmapped columns are ignored; do the clean-up in the file or in a rule afterwards.

TapCub applies the rules you write; it does not guess that fb means facebook for you.

FAQ

What are examples of data transformation?

In analytics: lower-casing UTM values so Google and google become one source, merging signup_click and Signup Click into one event, mapping ppc to a Paid Search channel, and normalizing page paths. Each changes what is counted, not what visitors did.

Should I fix data at the source or transform it later?

Fix the source first, so bad values stop arriving. Use a report-time rule for historical data and links you do not control, because it keeps the raw value. Rewrite stored data only when you cannot avoid it, since that loses the original.

How do I know a data transformation worked?

Check that totals before and after match, that the row count fell by the amount you expected, and that the biggest changes are right when opened by hand. Keep the raw values and record the rule with its start date.

Are UTM parameters case sensitive?

Yes in Google Analytics: utm_source=google and utm_source=Google are different values and produce separate rows. Pick lowercase for all tags and enforce it with a naming guide, then normalize old data with a rule.

Can transformation change my conversion rate?

Yes. In the example, merging three event names moved a sign-up rate from 50.0% to 32.3% because the denominator was understated. The visitors' behaviour was the same; the earlier number was wrong.

Sources

Filed underAnalytics

Was this article helpful?

We use your answers to fix and expand this page.

Su He

Data Analyst

Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.

Clean up channels and events without touching raw data

Add channel rules, name virtual events and preview them on real data before you rely on them.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics