Skip to content

Instantly share code, notes, and snippets.

@buger
Forked from kylefox/granify-core.html
Last active December 25, 2015 17:29
Show Gist options
  • Save buger/7013521 to your computer and use it in GitHub Desktop.
Save buger/7013521 to your computer and use it in GitHub Desktop.
<!--
This snippet loads the core Granify script.
** Remember to replace YOUR_SITE_ID with your actual Site ID **
-->
<script type="text/javascript">
(function (c, a) {
window.Granify = a;
var b, d, h, e;
b = c.createElement("script");
b.type = "text/javascript";
b.async = !document.cookie.match("_g_uh=");
b.src = ("https:" === c.location.protocol ? "https:" : "http:") +
'//cdn.granify.com/assets/javascript.js?id=YOUR_SITE_ID';
d = c.getElementsByTagName("script")[0];
d.parentNode.insertBefore(b, d);
a._stack = [];
a.init = function (b, c, f) {
function d(a, b) {
a[b] = function () {
Granify._stack.push([b].concat(
Array.prototype.slice.call(arguments, 0)))
}
}
var g = a;
h = ['on', 'trackCart', 'trackOrder'];
for (e = 0; e < h.length; e++) d(g, h[e]);
};
})(document, window.Granify || []);
Granify.init();
</script>
<!--
This snippet loads the core Granify script.
** Remember to replace YOUR_SITE_ID with your actual Site ID **
-->
<script type="text/javascript">
(function (c, a) {
window.Granify = a;
var b, d, h, e;
b = c.createElement("script");
b.type = "text/javascript";
b.async = !document.cookie.match("_g_uh=");
b.src = ("https:" === c.location.protocol ? "https:" : "http:") +
'//cdn.granify.com/assets/yahoo.js?id=YOUR_SITE_ID';
d = c.getElementsByTagName("script")[0];
d.parentNode.insertBefore(b, d);
a._stack = [];
a.init = function (b, c, f) {
function d(a, b) {
a[b] = function () {
Granify._stack.push([b].concat(
Array.prototype.slice.call(arguments, 0)))
}
}
var g = a;
h = ['on', 'trackCart', 'trackOrder'];
for (e = 0; e < h.length; e++) d(g, h[e]);
};
})(document, window.Granify || []);
Granify.init();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment