Skip to content

Instantly share code, notes, and snippets.

View johnnyopao's full-sized avatar
✌️

Johnny Opao johnnyopao

✌️
View GitHub Profile
@johnnyopao
johnnyopao / confirmEmailValidation.html
Last active March 31, 2024 10:03
Confirm Email Validation
<script>
lp.jQuery(function($) {
var ruleID = 'emailMatch';
//The email field to check against
var firstEmailField = 'email';
//The second confirmation email field
@johnnyopao
johnnyopao / ubcalltrackinglinks.html
Last active December 15, 2022 11:42
Unbounce - Adwords Call tracking - Clickable links backup - See full instructions here: http://documentation.unbounce.com/hc/en-us/articles/203509834
@johnnyopao
johnnyopao / ubcalltrackingbuttonlinks.html
Last active December 15, 2022 11:42
Unbounce - Adwords Call tracking - Clickable button links backup - See full instructions here: http://documentation.unbounce.com/hc/en-us/articles/203509834
@johnnyopao
johnnyopao / adwordsClickConversion.html
Last active December 15, 2022 11:42
Trigger Adwords Click Conversion (Placement: Before body end tag)
// This also requires a adwords onhandler conversion script.
// See the section on 'Tracking clicks on links or buttons as conversions' in the article below
// on how to obtain that script
// https://support.google.com/adwords/answer/6095821?hl=en
<script>
$( "#lp-pom-button-15" ).click(function(event) {
event.preventDefault();
@johnnyopao
johnnyopao / formExtConversionClick.html
Created May 13, 2015 23:55
Atrribute conversion on form submission to previous Unbounce page
<script type="text/javascript">
function yourSubmitFunction(e, $) {
e.preventDefault();
var _ubaq = _ubaq || [];
_ubaq.push(['trackGoal', 'convert']);
var ub_script = document.createElement('script');
ub_script.type = 'text/javascript';
ub_script.src =
@johnnyopao
johnnyopao / conversionClick.html
Last active December 15, 2022 11:42
This works to trigger a Unbounce Conversion for buttons that do not navigate away but instead keep them on the same page
<script>
window.trackConversion = function() {
$('body').append('<iframe src="clkg/http/unbouncepages.com/blankpage/" style="display: none"></iframe>');
};
lp.jQuery(function($) {
$('#lp-pom-button-11').click(function () {
trackConversion();
});
<script type="text/javascript">
function yourSubmitFunction(e, $) {
e.preventDefault();
//CUSTOM CODE HERE
// If your code is asynchronous, call this final line in your callback instead
lp.jQuery('.lp-pom-form form').submit();
}
@johnnyopao
johnnyopao / closeFormConfirmationDialog.md
Last active December 15, 2022 11:41
Close your Unbounce Form Confirmation Dialog lightbox with a button

Set the buttons URL to

javascript:lp.jQuery.ubpoverlay.close()
@johnnyopao
johnnyopao / customMobileCssUnbounce.html
Created June 13, 2015 16:36
Unbounce mobile breakpoint
<style>
@media (max-width: 600px){
/*Custom CSS HERE */
}
</style>
@johnnyopao
johnnyopao / ubAdwordsCallTracking.html
Last active December 15, 2022 11:40
Unbounce - Adwords Call tracking - Consolidated (text/links/buttons) - See full instructions here: http://documentation.unbounce.com/hc/en-us/articles/203509834
<script>
// NOTE: If you want to track these links as conversion goals on Unbounce,
// change 'clkn' to 'clkg' in the commented areas below
// Add the button ID's to this array that you want tracked
// For example: ['#lp-pom-button-12', '#lp-pom-button-20']
var callButtons = [];
var ubCallback = function(formatted_number, unformatted_number) {
var numberLinks = document.getElementsByClassName('number_link');