Marketing Migration

View Original

Easily Track HubSpot 404 Errors in Slack

We are constantly moving companies over to HubSpot and one of the big transitions is getting all of the landing pages migrated. Part of this step also includes a whole bunch of 301 redirects to be sure that old links don’t break. But even with the most organized marketing setup, you never get all of those 301s setup before you make the switch.

So what should you do?

We were trying to find a cleaner solution last week and came up with a quick and easy way to log when there is an error, so you can immediately fix it while staying in Slack.

No more logging into Google Analytics to find your 404s a day later, get a real time feed in Slack as they happen.








Here’s the quick setup process. Requirements are Slack, Zapier, and a website (we will walk through as if you were to do this in HubSpot, but it can be used anywhere with some simple modifications).

This is the code you need to modify then include within your 404 page.

<script>
$(document).ready(function() {
	var url404 = "ZAPIER_URL_GOES_HERE?badURL=" + document.location.href
	$.ajax({ url: url404 })
});
</script>


Any questions? Drop them in the comments below or contact us - we will be happy to help!