A/B Testing Links Guide

Test copy, creative, placement and CTAs with one tagged link per variant

Use UTM Builder

An A/B test on links compares two versions of the same message to see which one gets more clicks and more results. You do not need a testing tool. You need two links that differ in one tag, an even split of the audience, and enough people to trust the gap.

How this works with TrimLink

TrimLink does not split or rotate traffic between URLs, and it has no A/B testing feature. You run the test yourself: create one tagged short link per variant and put each link in a different version of the post, ad, email or flyer. Each short link shows its own aggregate click count.

2. Decide how much traffic you need

Decide this before you send anything. The number that counts is how many people see each variant: emails delivered, post impressions or flyers handed out. Clicks are the result you measure on top of that.

Sample size per variant (approximate)

n per variant = (1.96 + 0.84)^2 x [p1 x (1 - p1) + p2 x (1 - p2)] / (p2 - p1)^2
  • p1 is your current click rate. p2 is the rate you want to be able to detect.
  • 1.96 gives 95% confidence (two-sided): with no real difference, a gap this big shows up by chance at most 1 time in 20.
  • 0.84 gives 80% power: if the lift is real and at least that big, the test catches it 8 times in 10.
  • (1.96 + 0.84)^2 = 7.84. This is the standard normal approximation for comparing two proportions. Treat the result as a ballpark; it gets rougher at very low rates.

Worked example

Your newsletter usually gets clicks from 3% of delivered emails. You want to know if a new subject line can lift that to 4%.

  1. p1 = 0.03, so p1 x (1 - p1) = 0.0291
  2. p2 = 0.04, so p2 x (1 - p2) = 0.0384
  3. Sum = 0.0675. (p2 - p1)^2 = 0.01^2 = 0.0001
  4. n = 7.84 x 0.0675 / 0.0001 = 5,292

About 5,300 delivered emails per variant, 10,600 in total.

People per variant at a 3% click rate (95% confidence, 80% power, rounded up to the next 100)
Current rateRate to detectLiftPeople per variant
3%3.6%+20%13,900
3%4%+33%5,300
3%4.5%+50%2,600
3%6%+100%800

Rules of thumb

  • At a 3% click rate, spotting a lift to 4% takes about 5,300 people per variant.
  • Halve the lift you want to detect and you need roughly 3 to 4 times as many people.
  • With about 1,000 people per variant, you can only detect big gaps, such as 3% vs 5.5%.
  • Can't reach the number? Test a bigger change, or run the same test over several sends of the same campaign and add them up.

Quick check when the test ends

When both variants reached the same number of people, the gap between the two click counts should be at least 2 x the square root of their total. That is a rough 95% check, and it only works when exposure was equal.

Example: 246 vs 186 clicks. Total 432, square root 20.8, times 2 = 41.6. The gap is 60, so the lead is unlikely to be chance.

3. Read the results in TrimLink and GA4

TrimLink tells you which link got more clicks. GA4 tells you what those visitors did next. Read both, and compare A with B inside the same tool.

In TrimLink: which link got more clicks

  • Open each variant's short link. Each one has its own click analytics: clicks over time, referrers, countries, and devices and browsers.
  • Compare the two click totals for the same date range. If both variants reached the same number of people, the one with more clicks drew more interest.
  • Scan the referrers and countries for surprises, such as most of one variant's clicks coming from a place you did not send it.

In GA4: what happened after the click

  1. Go to Reports > Acquisition > Traffic acquisition.
  2. Click + Add filter and include only your campaign (Session campaign = dec_webinar).
  3. Click + next to the dimension drop-down and add Session manual ad content as a secondary dimension. It holds the utm_content value from the start of each session.
  4. Compare Sessions, Key events and Session key event rate for each utm_content value. You can build the same table in an exploration.
  5. Key events are the actions you marked as important, such as a sign-up or a purchase. GA4 used to call them conversions. Mark one in Admin > Data display > Events with the star icon.
  • Clicks show interest. Key events show what happened after. A teasing subject line can win on clicks and lose on sign-ups; when the two disagree, the key event usually matters more.
  • TrimLink clicks and GA4 sessions will not match. Some people leave before the page loads, and some block analytics. Compare A with B inside one tool, not TrimLink's clicks with GA4's sessions.
  • Use the Session version of the dimension. First user manual ad content only shows the value that first brought each user to your site.

What not to do

  • Changing two things at once

    If version B has a new subject line and a new send time, you cannot tell which change moved the clicks. Change one thing per test.

  • Peeking and stopping early

    Counts swing a lot in the first hours. Stopping as soon as one variant looks ahead picks false winners. Set the sample size and end date first, then read the result once.

  • Reusing a utm_content value across campaigns

    If cta_top ran in March and again in November, a GA4 report grouped by Session manual ad content over both months shows one combined row. Give each test its own values, or filter by campaign every time.

  • Testing on tiny traffic

    With 200 emails per variant, 9 clicks vs 6 clicks is noise: the gap of 3 is well below 2 x the square root of 15, which is 7.7. Check the table in step 2 first.

  • Mixing audiences

    Variant A on Instagram and variant B in the newsletter is not a test: the audiences differ, so you measure the channel, not the copy. Send both to the same kind of audience in the same time window.

Three worked examples

Email subject-line test

A list of 12,000 subscribers is split at random into two segments of 6,000. Both get the same email at the same time. Only the subject line differs, and the link in each version is its own short link.

Same on both:
utm_source=newsletter, utm_medium=email, utm_campaign=dec_webinar
Variant A:
utm_content=subject_a
Variant B:
utm_content=subject_b

The usual click rate is 3%. Detecting 3% vs 4% needs about 5,300 per variant, so 6,000 each is enough.

subject_a: 186 clicks (3.1%). subject_b: 246 clicks (4.1%). The gap is 60, and 2 x the square root of 432 is 41.6, so subject B wins on clicks.

Then check webinar sign-ups (a key event) by Session manual ad content in GA4 before you roll the winner out.

Email UTM builder

Social post copy test

Two LinkedIn captions for the same template launch: one opens with a question, one with a number. Same image, same page. You cannot split your followers, so post copy A on Tuesday and copy B on Thursday at the same hour, then swap the days the next week.

Same on both:
utm_source=linkedin, utm_medium=social, utm_campaign=template_launch
Variant A:
utm_content=copy_question
Variant B:
utm_content=copy_stat

Organic reach changes from post to post, so note each post's impressions from LinkedIn and compare clicks per 1,000 impressions, not raw clicks alone.

copy_question: 122 clicks on 9,800 impressions (12.4 per 1,000). copy_stat: 88 clicks on 9,400 impressions (9.4 per 1,000). Impressions were close, so the quick check still applies: the gap is 34, and 2 x the square root of 210 is 29.

The question caption leads. Reach varies, so treat this as a strong hint and repeat it once. If you boost the posts as ads, let the ad platform split the audience and give each ad its own short link.

LinkedIn UTM builder

Two QR codes on two flyer designs

A gym prints 1,000 flyers of design A (a photo) and 1,000 of design B (text only) for its open day. Each design has its own QR code, and each QR code points to its own short link. Both designs go out in the same five places, at the same times, in equal numbers.

Same on both:
utm_source=qr_code, utm_medium=offline, utm_campaign=open_day
Variant A:
utm_content=flyer_photo
Variant B:
utm_content=flyer_text

With 1,000 flyers per design you can only detect big gaps, roughly 3% vs 5.5% of flyers scanned. That is fine for two very different designs, not for a font change.

flyer_photo: 74 scans. flyer_text: 41 scans. The gap is 33, and 2 x the square root of 115 is 21.4, so the photo design wins.

Each scan opens the short link, so TrimLink counts it as a click on that link. Print the winner for the next run.

UTM builder

Checklist

  • Only one thing differs between the variants.
  • One short link per variant, with the same source, medium and campaign.
  • utm_content values are lowercase, named element_variant, and new for this test.
  • Both variants reach the same kind of audience, in the same time window, in equal numbers.
  • Sample size and end date are written down before launch.
  • The key event you care about is marked in GA4.
  • Each link opens the right page with its tags. Test it once.
  • Result read once, at the end date: clicks in TrimLink, key events in GA4.

Related guides

Build your variant links

Tag each variant in the free UTM builder, then shorten each tagged URL into its own short link.

Open the UTM builder

Created with TrimLink - Privacy-First URL Shortener and Analytics

Download more resources at trimlink.co/resources