Created
July 19, 2017 23:35
-
-
Save RobertCam/cd2542f8afe28a2e197ca4bdcea887dc to your computer and use it in GitHub Desktop.
Unbounce remove default link tracking (but still track as a goal)
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
<script> | |
(function(){ | |
// ID of button to remove Unbounce default tracking | |
var btnId = $("#lp-pom-button-219"); | |
// Add URL to link to | |
var url = 'https://tix.cathedral.org/TheatreManager/1/login?event=794'; | |
// Change to true if you want to track as a goal | |
var goal = true; | |
btnId.attr('href', url); | |
if (goal) { | |
window.trackConversion = function() { | |
$('body').append('<iframe src="clkg/http/unbouncepages.com/blankpage/" style="display: none"></iframe>'); | |
}; | |
lp.jQuery(function($) { | |
$(btnId).click(function () { | |
trackConversion(); | |
}); | |
}); | |
} | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment