Tell your Facebook Visitors to SIGN UP already!

A little code injection you can use to talk to your inbound social media visitors

Tell your Facebook Visitors to SIGN UP already!
Photo by Mariia Shalabaieva / Unsplash

Sometimes, you just need to tell your visitors to sign up already instead of stalking you on socials. Without bugging everyone else. Here's the result, with thanks to WBR Independent for letting me steal the screenshot.

The following code can go into your code injection footer. Feel free to adjust wording, colors, eand so on.



<script>
    const urlParams = new URLSearchParams(window.location.search);
    const utmCode = urlParams.get('fbclid');
    if (utmCode) {
        const div = document.createElement('div');
        div.className = 'facebook-visitor';
        div.innerHTML = `
             <div class="facebook-inner">
             Hello Facebook Visitor, let’s make this relationship personal. Don’t miss another story!  
                <a href="#/portal/">Subscribe today.</a>
                </div>
        `;
     document.body.insertBefore(div, document.body.firstChild);
    }
</script>
<style>
.facebook-visitor {
    padding: 10px;
    color: white;
    background-color: #4C50E9;
    font-style: bold;
    font-weight: bold;
    font-family: merriweather;
    width: 100%;
    font-size: 15px;   
}
  .facebook-inner {
    max-width: min(95vw, 800px);
    margin-left: auto;
    margin-right: auto;
  }
  .facebook-visitor a {
    color: white;
    text-decoration: underline;
  }
</style>

Happy Ghosting!