Skip to content
GPLWP Guides

How to shorten and track links in WordPress

Marketing & Email Time About 20 minutes 6 steps Updated 13 Sep 2026

MARKETING & EMAIL
The short answer

WordPress can provide basic post shortlinks, but it does not include branded redirects or a click-reporting dashboard. For a few links, use UTM parameters and GA4; for many affiliate or campaign links, a tracking plugin is the faster route.

The route
  1. 01Choose what to measure
  2. 02Use WordPress and GA4 manually
  3. 03Build a consistent campaign URL
  4. 04Test the complete link
  5. 05Take the fast plugin route
  6. 06Review clicks and maintain links

What you need

  • A WordPress site with administrator access
  • A Google Analytics 4 property if you want campaign or outbound-click reports
  • The destination URLs you want to shorten
  • A naming convention for sources, mediums and campaigns

Choose what to measure

Decide whether you need campaign attribution, clicks on outbound links, or a central list of branded redirects. These are different measurements. UTM parameters tell Google Analytics where a visit came from, while a redirect tool can count clicks on the short URL itself.

For a small number of links, the manual route is usually enough. If you manage affiliate links, email campaigns, paid ads or several destinations, use a link-management plugin so old URLs can be edited without changing every placement.

Use WordPress and GA4 manually

For links to your own posts, WordPress can generate a basic ?p=-style shortlink, but core WordPress does not provide branded slugs or a built-in click report. For external links, add campaign parameters such as utm_source, utm_medium, utm_campaign and, where useful, utm_content. Google recommends using consistent, case-sensitive values for these fields.

To measure outbound clicks, make sure your GA4 web stream is installed and turn on enhanced measurement for outbound clicks. GA4 can then record links that take visitors away from your domain without extra page code. This manual route is fine for occasional links, but it will not give you a branded redirect library or plugin-level per-link management.

Build a consistent campaign URL

Start with the final destination URL, then add your tracking values. For example: https://example.com/offer/?utm_source=newsletter&utm_medium=email&utm_campaign=spring-sale&utm_content=top-button.

Keep names lowercase and consistent. Use one source for the platform, one medium for the channel, and one campaign name for the promotion. Do not add different capitalisation or spelling for the same campaign, because Analytics treats those values as different entries.

Test the complete link

Open the short or tracked URL in a private browser window and confirm that it reaches the intended page. Check that the final address still contains the UTM parameters when they are meant to reach your site, then look in GA4 Realtime for the visit or outbound click.

Where links pass through more than one redirect, check every hop. A redirect, affiliate network or security service can remove query parameters, send visitors to the wrong destination, or create a loop. Also test on mobile and check that your own admin visits are not being mistaken for campaign traffic.

Take the fast plugin route

Install and activate a link-management plugin, then create a link with the long destination URL, a short slug, and the redirect type you need. BetterLinks Pro Shorten Track and Manage any URL fits this job because it combines short links, redirects, click analytics, link organisation and campaign parameter tracking in WordPress.

After creating the link, copy the short URL into your email, advert or page. Use categories or tags to separate campaigns, affiliates and social links. BetterLinks documentation places individual link reports in the link-management area and broader reports under its Analytics screen.

Review clicks and maintain links

Review click totals, unique clicks, referrers, devices and dates rather than judging a campaign from clicks alone. Compare the short-link report with GA4 sessions and conversions; the numbers can differ because browsers, ad blockers, redirects and consent settings affect collection.

Keep the short URL stable when a destination changes. Update its target instead of replacing the link in every email or advert. For permanent moves use a permanent redirect only when appropriate; use a temporary redirect while testing or when the destination is expected to change. BetterLinks supports 301, 302 and 307 redirect types.

The fast route

Let BetterLinks Pro Shorten Track and Manage any URL do it

Combines branded link shortening, redirects, click analytics, and campaign organization for affiliate and marketing links.

Get BetterLinks Pro Shorten Track and Manage any URL

Sources

  1. developer.wordpress.org /reference/functions/wp_get_shortlink/?utm_source=openai
  2. support.google.com /analytics/answer/13566436?hl=en&utm_source=openai
  3. support.google.com /analytics/answer/10917952?utm_source=openai
  4. betterlinks.io /docs/how-to-track-individual-analytics/?utm_source=openai
  5. betterlinks.io /docs/manage-settings-betterlinks/?utm_source=openai

Questions

Can WordPress shorten links without a plugin?
Yes, but only in a limited way. WordPress can generate basic post shortlinks, usually using a query-string format such as <code>?p=123</code>. It does not natively provide branded slugs, a redirect manager or a per-link click dashboard, so a plugin or server-level redirect is needed for a fuller short-link system.
What is the difference between UTM tracking and click tracking?
UTM tracking identifies the campaign that brought a visitor to a page, while click tracking counts interactions with a particular link. GA4 can report campaign parameters and outbound clicks, but a link-management plugin can also report clicks against each branded redirect before the visitor reaches the destination.
Why are my UTM values missing in Google Analytics?
UTM values are often missing because a redirect or tracking service strips the query string, the Analytics tag is not installed on the destination site, or the campaign names are inconsistent. Test the final URL, confirm the parameters survive every redirect, and use GA4 Realtime before waiting for standard reports to populate.
Should I use a 301 or 302 redirect for a marketing link?
Use a 301 when the short URL should permanently point to a new destination, and use a 302 while the destination is temporary or still being tested. Do not change redirect types casually on active campaigns, and test that the chosen type preserves the destination and any required tracking parameters. BetterLinks also documents 307 as a temporary redirect option.