HubSpot Marketing & Development Tips & Help

How to Track a Vanity URL in Google Analytics

Written by Tanya Wigmore | Sep 17, 2021 2:29:00 PM

Using a custom domain that redirects to your main site (a vanity domain) or a shortened URL that redirects to your landing page is a great way to measure offline initiatives and specific campaigns.

Setting up your URL tracking parameters before you set up your redirects is an important and often missed step of tracking your conversions from other (forwarded) domains & URLs. Follow these steps below to capture more data on your campaigns in Google Analytics so you can report on the success of your work!

Vanity Domain vs. Vanity URL

Vanity Domain

Vanity domain is a completely different domain name that you're using for a campaign that forwards to a page on your main site. These are common for things like special events where you want to have a unique domain to show the public for it - but you don't really want to build a new microsite for it so you've just added that page to your main site. As this traffic is a bit different from the main site traffic, you want to track it differently and need to add the tracking parameters into the domain forwarding. 

An example of this would be if we used a custom domain for our HubSpot User Group that forwarded to our landing page on the site:

  • vanity domain: www.CaribbeanHUG.com
  • forwarded to:  www.cronyxdigital.com/caribbean-hug

Vanity URL

Vanity URL is when you use a URL in your campaigns that doesn't really exist and forwards to a different page on your site. Most commonly used like a URL shortener for posters, ads and offline advertising where you want to maintain the brand awareness of your main domain but keep it super simple to remember and type in.

An example of this would be if we shortened that URL like this:

  • vanity URL: www.cronyxdigital.com/HUG
  • redirected to:  www.cronyxdigital.com/caribbean-hug

How to Set up Your Vanity URL so You Can Track it

We have found that most of the time, when someone clicks a link that redirects from one website to another, that visit will show in Google Analytics as being just another (direct / none) visitor in Google Analytics 🙁 While the redirects sometimes have the referring domain attributed to it, most of the time they don't. 

To increase the chances of having your referral data get passed through to Google Analytics all you need to do is add URL tracking parameters the destination page URL. 

Forwarded Domain Tracking Instructions

Add your tracking code to the destination URL at the domain redirect, in GoDaddy or whatever domain registrar you use and where you have that domain forwarding set up. 

For example

  • instead of just redirecting your vanity domain to domain.com/custom-campaign-page
  • you would redirect them to domain.com/custom-campaign-page?utm_source=vanity-url&utm_medium=billboard&utm_campaign=custom-campaign

Vanity URL Redirect Tracking Instructions

When you add your redirect of the vanity URL to the actual URL, add in the tracking code to the destination URL. 

For example

  • instead of just redirecting the vanity URL: www.cronyxdigital.com/HUG to www.cronyxdigital.com/caribbean-hug
  • we would set up that redirect to be from: www.cronyxdigital.com/HUG to www.cronyxdigital.com/caribbean-hug?utm_source=publication&utm_medium=print&utm_campaign=Q4-2021

You can use Google’s tracking URL builder, Raven’s tracking URL builder, a spreadsheet, or if you have Marketing Pro you can use HubSpot's Tracking URL Builder found in the Analytics & Reporting tools. It really doesn't matter what tool you use as long as you get the parameters correct.  

Reporting on URL Parameters in Google Analytics

In Google Analytics, head over to your Campaigns report, Source report, or Medium report and you'll be able to identify and filter by the parameters that you've used. You can create a custom segment so that you're looking only at that traffic and see their site engagement metrics or you can compare two or more different segments to see how the behavior of those visitors compares with those from other sources. 

Test!

Visit the vanity URL and double-check that it's redirecting as expected. Did it trigger the URL parameters? Are those parameters showing up in Google 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. 

If they're not showing up, go back to square one and double-check:

  • are you looking at a date range that includes when the redirecting vanity URL was in place with the tracking code?
  • is there any reasons it wouldn't have garnered any clicks during that period?
  • have you set up the parameters as directed by the URL builder (proper naming convention, all required utms included, etc.)?
  • are those parameters being stripped out in the redirect (talk to dev about this one)?
  • have you tried removing the parameters and then re-adding them back in (equivalent to tech support 'turn it off and turn it on again' which is surprisingly effective)?

And that’s it! You should now see the data from your forwarded domains in Google Analytics. 

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