If you have a content upgrade, it can seem impossible to track your leads using the Facebook pixel without them leaving your page. Here’s how to fire that event and keep them where you want them …reading the rest of your blog post.
Did you embed your optin on your blog post or page? That’s called a content upgrade.
A content upgrade is simply bonus content that people can get access to in exchange for their email address. A related freebie or worksheet or even a video that you want reward your readers with for joining your list.
How do you track content upgrade leads with the Facebook pixel if they don’t go to a thank you page?
With content upgrades in the middle of your blog post, you don’t want them to give up their email addresses if it means they leave your article to hit the thank you page and fire that lead pixel event. Here’s how to track content upgrade leads and keep them where you want them when using optin form embeds, specifically ConvertKit.
Content upgrades. We love them. You embed your ConvertKit form into the middle of your blog post, but how do you track Facebook pixel lead events if you want them to stay there and not redirect to a thank you page?
You want them to stay there and keep reading so redirecting to a thank you page is not optimal but if you use a success message, you can’t fire the lead pixel event to track your leads for ad usage and audience building later.
Want them to keep reading and still track them using the Facebook pixel?
This is how.
Here is the code you’ll need:
In Divi, add the code block and paste this code:
IMPORTANT NOTE: sometimes when you copy and past code from a website or pdf, the ” will look different, almost curly. Make sure after you paste this to go and manually replace with the ” from your keyboard. If not, the code will not work.
<script>
function buttonClickPixelFire() {
// Grab those subscribers
window._fbq.push(‘track’, ‘lead’);
}
</script>
In the video above I used a text block module for my ConvertKit embed and lost my code for some reason after the page update. Use a code block here instead. I’m not sure why this became a problem but the code block seems to be just fine.
In Divi, add another code block and add this to your button code you copied from ConvertKit right after <button — see the example below:
onClick=”buttonClickPixelFire();”
It will look like this – although your style may be different.
IMPORTANT NOTE: sometimes when you copy and past code from a website or pdf, the ” will look different, almost curly. Make sure after you paste this to go and manually replace with the ” from your keyboard. If not, the code will not work.
<button onClick=”buttonClickPixelFire();” class=”formkit-submit” style=”color: #ffffff; background-color: #1677be; border-radius: 4px; font-weight: 400;” data-element=”submit”>Subscribe</button>
Not using Divi yet?
Get Divi now: http://bit.ly/2n7T1a7
Ready for ConvertKit?
Sign up for ConvertKit: http://bit.ly/2MdAVCC
This is AWESOME!! Thank you so much for such clear instructions and the video walkthrough, as well as the code snippets!
You are very welcome! If you have any problems, hit me up on Facebook 🙂