Track pageview from a vanity URL | Community
Skip to main content
Level 4
January 23, 2025
Solved

Track pageview from a vanity URL

  • January 23, 2025
  • 2 replies
  • 819 views

We have a vanity URL, e.g.  https://www.myvanityurl.com.

There is no page associated with the vanity URL. It's just a URL with the redirect. When someone goes to it, it immediately redirects to our site. e.g. https://www.mysite.com.

We cannot track traffic coming from the vanity URL and into our site.

Is it possible to track incoming traffic from the vanity URL to our site? How?

Best answer by kayawalton

Hi @m_alcantara,

To track the usage of our vanity URLs (and we also use the same approach when we migrate sites and want to track how many folks still use the old URL), we add campaign parameters to the landing page URL and use that as the destination URL for the vanity.

Using your example: myvanityurl.com would redirect to mysite.com/?campaign=redirect (or however your implementation sets up your tracking parameters). 

2 replies

kayawalton
Community Advisor and Adobe Champion
kayawaltonCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
January 23, 2025

Hi @m_alcantara,

To track the usage of our vanity URLs (and we also use the same approach when we migrate sites and want to track how many folks still use the old URL), we add campaign parameters to the landing page URL and use that as the destination URL for the vanity.

Using your example: myvanityurl.com would redirect to mysite.com/?campaign=redirect (or however your implementation sets up your tracking parameters). 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 23, 2025

Yes... I've been trying to initiate this approach on my site... if only I could get my people to do it (and consistently).....

 

Keep in mind, you want to keep vanity URL campaigns pretty basic, since vanity URLs tend to live beyond specific campaigns (due to being an easy to type in URL). For the people that do try to follow my recommendations, I always get questions like "can we also add "campaignx" to the parameters... to which I always say... but campaignx is only running this month... people will be using this URL for years... 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 23, 2025

There is one other option, but it's more complex...  if you work with your DevOps team, you could in theory have the redirect add a custom tag into the request header (so there's nothing showing in the resulting URL)... you would then need your developers to read this header info and pass it in your data layer (or set a value you can read, etc)... you can then create "Vanity URL" tracking based on this... but it requires a lot more steps and working with various teams... it's easier to just add a campaign into the redirect destination.

christel_guidon
Adobe Champion
Adobe Champion
January 23, 2025

We use the same method as what Jen and Achaia mention above. Without this, there is no way that I know of to differentiate users coming to your site with/without that vanity URL. You need to setup a tracking parameter as part of the redirect