Ash asks, “We are moving our website to a new domain name. We have UTM links created on the existing website. I would like to know:
1. The UTMs will stop working/get re-directed to new domain name?
2. If 1 is True then what is the best way going forward to handle existing UTM links while re-branding to a new domain name. Thanks Ash”
The technical answer depends on how you’re doing your migration. A word of caution: with only a few exceptions, Google Analytics UTM tracking should not be done referring your website to itself. Google Analytics UTMs are for external links coming into your site only, for the most part. Broadly, any kind of migration is technically a product launch or software development project, so treat it as such and plan and test as much as you can before doing it live.
Can’t see anything? Watch it on YouTube here.
Listen to the audio here:
- Got a question for You Ask, I’ll Answer? Submit it here!
- Subscribe to my weekly newsletter for more useful marketing tips.
- Find older episodes of You Ask, I Answer on my YouTube channel.
- Need help with your company’s data and analytics? Let me know!
- Join my free Slack group for marketers interested in analytics!
What follows is an AI-generated transcript. The transcript may contain errors and is not a substitute for watching the video.
In today’s episode ash asks, we are moving our website to a new domain name, we have UTM links created on the existing website.
I’d like to know, will the UTM link stop working or get redirected to the new domain name? And if that’s true, then what’s the best way going forward to handle existing UTM links while rebranding to a node new domain name? So the technical answer to this question is dependent on how you’re doing your migration.
Generally speaking, most people using web servers like Apache or engine x will have what’s called an ht access file, HTML hypertext access file that allows you to redirect or rewrite URLs.
If you’re using Apache, the mod rewrite directive would be the one that you would use to do this.
And just generally speaking, for relatively straightforward websites, you will be doing what’s called a global rewrite where, in fact, we went through this last year.
My company’s name used to be brain trust insights.
com, we moved to trust insights.ai.
And so in the mod rewrite control directive, we basically set any request, including all the trailing directories, folders, pages, and UTM tracking codes, which are just query parameters.
just slice off that first domain name, put a new one on, and then otherwise, keep everything else the same.
So it’s a it’s a global rewrite to do that, that would be that in this situation, when you’re just changing everything, that is generally the best practice.
The catch is, of course, if you have like a huge hairball of subdomains and things like that, you use a really like archaic web server, then yes, you could run into some trouble.
And that’s going to be something you need to bring up with your IT department.
When it comes to UTM codes, again, they are just query parameters, there’s something you attach to the end of your URL, and if you’re doing a global rewrite should be taken care of.
I want to make sure that you’re not using UTM codes on your website itself, when you link to other pages on your website.
Generally speaking, that’s a bad idea.
There are a few exceptions where you might want to do something like that.
But for the most part, Google Analytics UTM tracking codes should only be used on External links.
So you have a link from another website to yours, that’s when you would use those UTM tracking codes.
There are the two exceptions that were that’s not the case is one.
When you’re using a tool like Google Tag, map, Niger, actually just ran into this with a customer.
And there is a offline source that goes to an online source that can only be reached through that source.
For example, suppose that a company sent out a mailer, right, they would send out this mailer with a custom URL going to a specific page on your website, you would create a UTM link inside of Google’s Tag Manager that would say this came from paper mail, because there’s no way to put the you’re not going to ask somebody to type in UTM tracking parameters on a paper mail, you can use a custom URL, and either a redirect or a Tag Manager link, the redirect actually be the best way to do that.
But in this case, that ship had sailed for that customer.
So that’s one exception.
The other exception is, if you want to use some of the lower down UTM tracking codes like campaign keyword or content, to specifically identify an action that somebody has taken, you wouldn’t change source medium at all.
In fact, those should be generally regarded as untouchable.
You’d never use source medium on your own website.
But for campaign, maybe content Sure.
keyword, maybe on your own website, you would use UTM tracking goes with those.
So this is largely an IT thing.
And here’s where I think it sounds like things could be going wrong for you.
And where I know for sure things have gone wrong at past customers and clients.
Your website migration is fundamentally an IT project, which means that you need to go through the full it planning and and process for like any kind of software project or development or anything like that, that incorporates who’s doing what, what’s the timeline? When are things going to move over? What has to be changed? What are the risks, what is likely to go wrong.
And there are a number of just Google for them, you know, technical website, migration checklists, there’s, like I said, dozens of these things all over the internet, go find like 10 of them, and then sort of Frank and merge them together.
And that will give you a good starting point for this kind of project so that everything is accounted for before you do the migration, because the last thing you want to do, especially if your website’s a bigger one, is get a third of the way into the migration, everything breaks, and you’re like, Oh crap, nobody thought about this or that or this.
Your best bet is to do as much planning up front, even though it takes longer and is sometimes downright painful.
And then ideally, you tested on the staging site of some kind or developments or just to make sure everything’s working first before you do the migration.
I remember when we did this for trust in science.
Last year, we used our staging environments on on our WordPress host, and tested, tested, tested, made sure everything worked HR contact forms, worked all that stuff before we ever did anything with the production environment.
And if you do really well, after you’ve gone through the test migration, you’ll have a lot of things like the control files, like the ht access file, stuff that when you go to move it into production is very, very fast.
So even though it takes longer to do the actual production migration, the one that really counts, takes less time, because you’ve already done a lot of the legwork up front in the staging site.
So be aware of that, I would strongly recommend that you follow that approach rather than just kind of winging it, it will not go well.
I’ve never once seen a a impromptu migration go as smoothly as could it just to add.
The other thing that doing that more planned out process does is it allows you to, to work in in upgrades as well.
So for example, if you’re using a caching service, like cloud flare, or you’ve been wanting to, this would be the time to do it, do it, test it in staging, and then put it into the migration process.
Once you’ve tested it, and you made sure it works and your site works and everything else works all works together.
It’s a great time to do those kinds of upgrades that can make your site faster, that can make it more mobile friendly, all the things that Google cares about in your search engine rankings.
So long answer to seemingly obvious question, work with your IT team, make sure that you’re using that global mod rewrite if as long as it’s appropriate and plan the heck out of this thing and test it.
That’s how you will have fewer headaches.
As always please leave your comments in the comments box below and subscribe to the YouTube channel and the newsletter.
I’ll talk to you soon.
want help solving your company’s data analytics and digital marketing problems? This is trusted insights.ai today and let us know how we can help you
You might also enjoy:
- How to Set Your Public Speaking Fee
- The Evolution of the Data-Driven Company
- Best Practices for Public Speaking Pages
- How to Set Your Consultant Billing Rates
Want to read more like this from Christopher Penn? Get updates here:
Get your copy of AI For Marketers (2019 Edition)