How to Track a Forwarded Vanity URL in Google Analytics

August 26, 2019 / by Tanya Wigmore

Using a custom domain that redirects to your main site is a great way to customize your messaging and send your offline-generated traffic to a specific page on your site. But how do you track a forwarded domain in Google Analytics so you can show performance for your marketing campaigns?

When you’re using a vanity URL or redirecting URL for an offline or online marketing campaign, you'll want to make sure you’re tracking it in Google Analytics. This will allow you to accurately report on the success of your campaigns in regards to website traffic, engagement and conversions. 

There are two common situations when you'd want to track a vanity URL:

  1. You’re using a vanity URL offline in a magazine, mail out, billboard or other medium and want to track how many people came to the site via those ads and campaigns.
  2. You’re using a vanity URL online in various campaigns and want to track how many people came to the site via those other online sources.

When your potential visitor types in the vanity URL they are taken from that URL to the new URL. Generally speaking, when someone clicks a link from one website to another, that visit will show as being a "referral" in Google Analytics with the source site attributed to it.


The answer is “sometimes” but more often than not, it doesn't. While I have seen forwarded domains showing as referrers in Google Analytics, the referral usually gets stripped out in the redirect and that visit gets lumped under (direct / none) traffic with no source attributed. If the thought of missing attribution data gives you a bit of a panic, here's what you can do to ensure you're tracking your vanity URLs.


Adding tracking code to your destination page for your redirect can help you identify the traffic that was generated from your vanity URL.

  1. Create tracking code for you URL. You can use Google’s tracking URL builder, Raven’s tracking URL builder, HubSpot's URL tracker in the "Campaign" settings, or whichever other utm tracking code builder you prefer.
  2. Forward your vanity URL to your destination URL with the tracking code added to it. In your domain registrar you can specify where you want the domain to redirect to; put in your full tracking URL there.
  3. Test! Visit the vanity URL. Does it redirect OK? Is it showing up in Analytics? If you look at the "Real Time" reports in Google Analytics you'll be able to see right away if it's tracking or not. 

 And that’s it!

Want more advanced Google Analytics help? We're here to help 🤓

Topics: SEO, Analytics

Tanya Wigmore

Written by Tanya Wigmore

Tanya Wigmore is the founder of CRO:NYX Digital and is passionate about inbound marketing and search marketing. When she's not digging into web analytics to improve CRO & UX, she's developing content strategies for our clients.