Log into the Sparkhub app

Landing Page Tip: How to Automatically Redirect with a Trackable, Shortened Link

Jan 09, 2024

Let's talk about a really cool hack you can do on a landing page, and that is, use it to redirect the guest to another page.

Why would you do this, you may ask? Well, PB has a tool called Trackable Links. You create a Trackable Link that you tie to a specific destination link you want to share. For example, I can create a Trackable Link that will go to my YouTube channel. It will be a PB-hosted link, that will then take the user to my YouTube channel. When you send the trackable link via a PB text, PB can track which of your contacts has viewed it, and when.

But the contact has to first confirm that they want to proceed to the destination. Is there a way to have a trackable link that skips that confirmation step? Now, I believe that step is there so that people have transparency about what link they're clicking on, which is a good thing. But I do want to share a workaround that lets the viewer go automatically to the link of your choice, without confirming, while still letting you track their click to them. You do this by using not an official PB Trackable Link, but a PBLP, which is also trackable, and that has an automatic redirect in it. This will accomplish the same thing as the trackable link without the confirmation step.

Plus, it has the added benefit that it can function as sort of a link shortener. Since we can't use bitly or other shorteners in our Project Broadcast texts, it's nice to be able to send a PBLP link, which isn't very long, that can redirect the viewer to a longer link that you have in mind for them.

So that's the why. Here's the how.

  • Step 1: create a PBLP for this purpose. You'll want to give it a helpful internal name for yourself, like, "Redirect - YouTube channel" or whatever your redirect destination is. You can also give a title and description so the person clicking it can see what to expect, depending on how it previews for them. This makes it clear where you're sending them.
  • Step 2: Add my code to your page by dragging in an HTML block and pasting it in. You can copy it from my blog post on this topic. Inside the code, you can swap in two things, indicated with red below: your link, and your desired delay. You can give a few seconds so that the viewer can land on your page without going straight to the final destination too fast, or you can set it to 0 to have a minimal delay. This delay is in milliseconds, so I'm going to type in 5000 to give a 5-second delay.

<script type="text/javascript">
function Redirect()
setTimeout('Redirect()', 5000);

  • Step 3: Add a little surrounding content to give context. This is optional, but even if you don't have a delay, you never know if the viewer's connection is slow and has a little lag, so I figure doesn't hurt. They'll probably see your landing page for at least a blink or two before their device completes the redirect.
  • Step 4: save and test. You knew I wouldn't leave that step out, right? Send the PBLP to yourself via PB Chat. Open the link yourself and you should see it work.
  • Step 5: send out the link via a Project Broadcast message. Be transparent in the text about what the link is. Each recipient will have a unique url for it, which is PB's magic sauce that will make their click track to them. As a result, you'll be able to see who accessed their unique link and when.
Of course, if you like what you've created, you can clone your Landing Page to do this again for another link, and your code will already be on the page ready to edit!