Created
August 1, 2023 13:01
-
-
Save xlplugins/25cd4aedaebcef6d76b82e8186dd2abd to your computer and use it in GitHub Desktop.
converios track on funnelkit cart open
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
add_action( 'wp_footer', function () { | |
?> | |
<script> | |
window.addEventListener('load', function () { | |
jQuery('body').on('fkcart_open', function () { | |
(function (a, b) { | |
a = "https://log.superceramiccoating.com/conversion.js?cid={clickid}&et=add_to_cart"; | |
var c = b.createElement("script"), d = b.scripts[0]; | |
if (b = b.cookie.match(/(^| )vl-cid=([^;]+)/)) if (-1 < a.indexOf("cid=")) a = a.replace(/cid=.*?(&|$)/, "cid=" + b.pop() + "&"); else { | |
var e = -1 < a.indexOf("?") ? "&" : "?"; | |
a += e + "cid=" + b.pop() | |
} | |
c.src = a; | |
d.parentNode.insertBefore(c, d) | |
})(window, document); | |
}); | |
}) | |
</script> | |
<?php | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment