Created
April 15, 2019 09:38
-
-
Save chrisgalard/fa0f259b540b35b2a69ab6ebcdc60e47 to your computer and use it in GitHub Desktop.
Tracking Facebook Events In Clickfunnels THE RIGHT WAY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This is a series of code snippets that you can use in order to track your | |
Facebook pixel data and events effectively in your Clickfunnels pages. | |
--> | |
<!-- Use this to track your pixel events when people go to the second step of a 2-step form --> | |
<script> | |
var submitBtn = document.querySelector('[href="#submit-form-2step"]'), | |
secondStep = document.querySelector('.o2step_step2'), | |
submitBtn.addEventListener('click', function (e) { | |
setTimeout(function () { | |
if (secondStep.style.display != 'none') { | |
// Your event here. For example: | |
fbq('track', 'Lead'); | |
} | |
}, 0); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment