Terra Kaffe | Great coffee is night and day
Posted by:
Category:
Comments:
Post Date:
Terra Kaffe | Great coffee is night and day
[]
Terra Kaffe | Excellent coffee is day and night 1 && !$.isFunction(b)) { c = $.extend({}, h.defaults, c); if (typeof c.expires === 'number') { var d = c.expires, t = c.expires = new Date(); t.setMilliseconds(t.getMilliseconds() + d * 864e+5) } return (document.cookie = [encode(a), '=', stringifyCookieValue(b), c.expires ? '; expires=' + c.expires.toUTCString() : '', c.path ? '; path=' + c.path : '', c.domain ? '; domain=' + c.domain : '', c.secure ? '; secure' : ''].join('')) } var e = a ? undefined : {}, cookies = document.cookie ? document.cookie.split('; ') : [], i = 0, l = cookies.length; for (; i 0) { if (Shopify.Checkout.step === 'contact_information') { dataLayer.push(transactionData, { 'event': 'Customer Information', 'pageType': 'Customer Information' }); console.log("Customer Information - Transaction Data" + " :" + JSON.stringify(transactionData, null, " ")); } else if (Shopify.Checkout.step === 'shipping_method') { dataLayer.push(transactionData, { 'event': 'Shipping Information', 'pageType': 'Shipping Information' }); console.log("Shipping - Transaction Data" + " :" + JSON.stringify(transactionData, null, " ")); } else if (Shopify.Checkout.step === "payment_method") { dataLayer.push(transactionData, { 'event': 'Add Payment Info', 'pageType': 'Add Payment Info' }); console.log("Payment - Transaction Data" + " :" + JSON.stringify(transactionData, null, " ")); } } if (__DL__.debug == true) { /** DATALAYER: Transaction */ if (Shopify.Checkout.page == "thank_you") { dataLayer.push(transactionData, { 'pageType': 'Transaction', 'event': 'Transaction' }); console.log("Transaction Data" + " :" + JSON.stringify(transactionData, null, " ")); } } else { /** DATALAYER: Transaction */ if (Shopify.Checkout.page == "thank_you") { dataLayer.push(transactionData, { 'pageType': 'Transaction', 'event': 'Transaction' }); } } } /** DATALAYER: All Pages * Fire all pages trigger after all additional dataLayers have loaded. */ dataLayer.push({ 'event': 'DataLayer Loaded' }); console.log('DATALAYER: DataLayer Loaded.'); /********************** * DATALAYER EVENT BINDINGS ***********************/ /** DATALAYER: * Add to Cart / Dynamic Cart View * Fire all pages trigger after all additional dataLayers have loaded. */ $(document).ready(function () { /** DATALAYER: Search Results */ var searchPage = new RegExp(__DL__.searchPage, "g"); if (document.location.pathname.match(searchPage)) { var search = { 'searchTerm': __DL__.searchTermQuery, 'pageType': "Search", 'event': "Search" }; dataLayer.push(search); if (__DL__.debug) { console.log("Search" + " :" + JSON.stringify(search, null, " ")); } } /** DATALAYER: Cart */ // stage cart data function mapJSONcartData() { jQuery.getJSON('/cart.js', function (response) { // get Json response __DL__.cart = response; var cart = { 'products': __DL__.cart.items.map(function (line_item) { return { 'id': line_item.id, 'sku': line_item.sku, 'variant': line_item.variant_id, 'name': line_item.title, 'price': (line_item.price / 100), 'quantity': line_item.quantity } }), 'pageType': 'Cart', 'event': 'Cart' }; if (cart.products.length > 0) { dataLayer.push(cart); if (__DL__.debug) { console.log("Cart" + " :" + JSON.stringify(cart, null, " ")); } } }); } viewcartfire = 0; // view cart $(__DL__.viewCart).on('click', function (event) { if (viewcartfire !== 1) { viewcartfire = 1; // if dynamic cart is TRUE if (__DL__.dynamicCart) { cartCheck = setInterval(function () { // begin check interval if ($(__DL__.cartVisableSelector).length > 0) { // check visible selectors clearInterval(cartCheck); mapJSONcartData(); $(__DL__.removeCartTrigger).on('click', function (event) { // remove from cart var link = $(this).attr("href"); jQuery.getJSON(link, function (response) { // get Json response __DL__.removeCart = response; var removeFromCart = { 'products': __DL__.removeCart.items.map(function (line_item) { return { 'id': line_item.id, 'sku': line_item.sku, 'variant': line_item.variant_id, 'name': line_item.title, 'price': (line_item.price / 100), 'quantity': line_item.quantity } }), 'pageType': 'Remove from Cart', 'event': 'Remove from Cart' }; dataLayer.push(removeFromCart); if (__DL__.debug) { console.log("Cart" + " :" + JSON.stringify(removeFromCart, null, " ")); } }); }); } }, 500); } } }); // add to cart jQuery.getJSON('/cart.js', function (response) { // get Json response __DL__.cart = response; var cart = { 'products': __DL__.cart.items.map(function (line_item) { return { 'id': line_item.id, 'sku': line_item.sku, 'variant': line_item.variant_id, 'name': line_item.title, 'price': (line_item.price / 100), 'quantity': line_item.quantity } }) } __DL__.cart = cart; collection_cartIDs = []; collection_matchIDs = []; collection_addtocart = []; for (var i = __DL__.cart.products.length - 1; i >= 0; i--) { var x = parseFloat(__DL__.cart.products[i].variant); collection_cartIDs.push(x); } }); function __DL__addtocart() { dataLayer.push(product, { 'pageType': 'Add to Cart', 'event': 'Add to Cart' }); if (__DL__.debug) { console.log("Add to Cart" + " :" + JSON.stringify(product, null, " ")); } // if dynamic cart is TRUE if (__DL__.dynamicCart) { console.log("dynamic"); var cartCheck = setInterval(function () { // begin check interval if ($(__DL__.cartVisableSelector).length > 0) { // check visible selectors clearInterval(cartCheck); mapJSONcartData(); $(__DL__.removeCartTrigger).on('click', function (event) { // remove from cart var link = $(this).attr("href"); jQuery.getJSON(link, function (response) { // get Json response __DL__.removeCart = response; var removeFromCart = { 'products': __DL__.removeCart.items.map(function (line_item) { return { 'id': line_item.id, 'sku': line_item.sku, 'variant': line_item.variant_id, 'name': line_item.title, 'price': (line_item.price / 100), 'quantity': line_item.quantity } }), 'pageType': 'Remove from Cart', 'event': 'Remove from Cart' }; dataLayer.push(removeFromCart); if (__DL__.debug) { console.log("Cart" + " :" + JSON.stringify(removeFromCart, null, " ")); } }); }); } }, 500); } } $(document).on('click', __DL__.cartTriggers, function () { __DL__addtocart(); }); /** DATALAYER: Newsletter Subscription */ __DL__newsletter_fire = 0; $(document).on('click', __DL__.newsletterSelectors, function () { if (__DL__newsletter_fire !== 1) { __DL__newsletter_fire = 1; var newsletterCheck = setInterval(function () { // begin check interval if ($(__DL__.newsletterSuccess).length > 0) { // check visible selectors clearInterval(newsletterCheck); dataLayer.push({ 'event': 'Newsletter Subscription' }); } }, 500); } }); /** DATALAYER: Wishlist */ setTimeout(function () { $(__DL__.wishlistSelector).on('click', function () { dataLayer.push(product, { 'event': 'Add to Wishlist' }); if (__DL__.debug) { console.log("Wishlist" + " :" + JSON.stringify(product, null, " ")); } }); if (document.location.pathname == __DL__.wishlistPage) { var __DL__productLinks = $('[href*="product"]'); var __DL__prods = []; var __DL__links = []; var __DL__count = 1; $(__DL__productLinks).each(function () { var href = $(this).attr("href"); if (!__DL__links.includes(href)) { __DL__links.push(href); $(this).attr("dataLayer-wishlist-item", __DL__count++); jQuery.getJSON(href, function (response) { // get Json response __DL__.wishlist = response; var wishlistproducts = { 'id': __DL__.wishlist.product.id, 'name': __DL__.wishlist.product.title, }; __DL__prods.push(wishlistproducts); }); } }); dataLayer.push({ 'products': __DL__prods, 'pageType': 'Wishlist', 'event': 'Wishlist' }); } var __DL__count = 1; var wishlistDel = $(__DL__.removeWishlist); wishlistDel.each(function () { $(this).attr("dataLayer-wishlist-item-del", __DL__count++); }); $(__DL__.removeWishlist).on('click', function () { console.log('click') var index = $(this).attr("dataLayer-wishlist-item-del"); var link = $("[dataLayer-wishlist-item=" + index + "]").attr("href"); console.log(index) console.log(link) jQuery.getJSON(link, function (response) { // get Json response __DL__.wishlist = response; var wishlistproducts = { 'id': __DL__.wishlist.product.id, 'name': __DL__.wishlist.product.title, }; dataLayer.push({ 'products': wishlistproducts, 'pageType': 'Wishlist', 'event': 'Wishlist Delete Product' }); }); }) }, 3000); /** DATALAYER: CTAs */ $(__DL__.ctaSelectors).on('click', function () { var ctaCheck = setInterval(function () { // begin check interval if ($(__DL__.ctaSuccess).length > 0) { // check visible selectors clearInterval(ctaCheck); dataLayer.push({ 'event': 'CTA' }); } }, 500); }); /** DATALAYER: Promo Subscriptions */ $(__DL__.promoSubscriptionsSelectors).on('click', function () { var ctaCheck = setInterval(function () { // begin check interval if ($(__DL__.promoSuccess).length > 0) { // check visible selectors clearInterval(ctaCheck); dataLayer.push({ 'event': 'Promo Subscription' }); } }, 500); }); }); // document ready }(), function () { if (window.BOOMR && (window.BOOMR.version || window.BOOMR.snippetExecuted)) { return; } window.BOOMR = window.BOOMR || {}; window.BOOMR.snippetStart = new Date().getTime(); window.BOOMR.snippetExecuted = true; window.BOOMR.snippetVersion = 12; window.BOOMR.application = "storefront-renderer"; window.BOOMR.themeName = "TERRA"; window.BOOMR.themeVersion = "4.0.0"; window.BOOMR.shopId = 62664933633; window.BOOMR.themeId = 136715600129; window.BOOMR.renderRegion = "gcp-us-east1"; window.BOOMR.url = "https://www.terrakaffe.com/cdn/shopifycloud/boomerang/shopify-boomerang-1.0.0.min.js"; var where = document.currentScript || document.getElementsByTagName("script")[0]; var parentNode = where.parentNode; var promoted = false; var LOADER_TIMEOUT = 3000; function promote() { if (promoted) { return; } var script = document.createElement("script"); script.id = "boomr-scr-as"; script.src = window.BOOMR.url; script.async = true; parentNode.appendChild(script); promoted = true; } function iframeLoader(wasFallback) { promoted = true; var dom, bootstrap, iframe, iframeStyle; var doc = document; var win = window; window.BOOMR.snippetMethod = wasFallback ? "if" : "i"; bootstrap = function(parent, scriptId) doc.body; parent.appendChild(script); ; if (!window.addEventListener && window.attachEvent && navigator.userAgent.match(/MSIE [67]./)) { window.BOOMR.snippetMethod = "s"; bootstrap(parentNode, "boomr-async"); return; } iframe = document.createElement("IFRAME"); iframe.src = "about:blank"; iframe.title = ""; iframe.role = "presentation"; iframe.loading = "eager"; iframeStyle = (iframe.frameElement || iframe).style; iframeStyle.width = 0; iframeStyle.height = 0; iframeStyle.border = 0; iframeStyle.display = "none"; parentNode.appendChild(iframe); try { win = iframe.contentWindow; doc = win.document.open(); } catch (e) { dom = document.domain; iframe.src = "javascript:var d=document.open();d.domain='" + dom + "';void(0);"; win = iframe.contentWindow; doc = win.document.open(); } if (dom) { doc._boomrl = function() { this.domain = dom; bootstrap(); }; doc.write(""); } else { win._boomrl = function() { bootstrap(); }; if (win.addEventListener) { win.addEventListener("load", win._boomrl, false); } else if (win.attachEvent) { win.attachEvent("onload", win._boomrl); } } doc.close(); } var link = document.createElement("link"); if (link.relList && typeof link.relList.supports === "function" && link.relList.supports("preload") && ("as" in link)) { window.BOOMR.snippetMethod = "p"; link.href = window.BOOMR.url; link.rel = "preload"; link.as = "script"; link.addEventListener("load", promote); link.addEventListener("error", function() { iframeLoader(true); }); setTimeout(function() { if (!promoted) { iframeLoader(true); } }, LOADER_TIMEOUT); BOOMR_lstart = new Date().getTime(); parentNode.appendChild(link); } else { iframeLoader(false); } function boomerangSaveLoadTime(e) if (window.addEventListener) { window.addEventListener("load", boomerangSaveLoadTime, false); } else if (window.attachEvent) { window.attachEvent("onload", boomerangSaveLoadTime); } if (document.addEventListener) { document.addEventListener("onBoomerangLoaded", function(e) { e.detail.BOOMR.init({ ResourceTiming: { enabled: true, trackedResourceTypes: ["script", "img", "css"] }, }); e.detail.BOOMR.t_end = new Date().getTime(); }); } else if (document.attachEvent) { document.attachEvent("onpropertychange", function(e) { if (!e) e=event; if (e.propertyName === "onBoomerangLoaded") { e.detail.BOOMR.init({ ResourceTiming: { enabled: true, trackedResourceTypes: ["script", "img", "css"] }, }); e.detail.BOOMR.t_end = new Date().getTime(); } }); } })();]]> Skip to content
Loading...
SourceShare this post
Related
Posts
Coffee
Leaves ‘n Beans Cafe
A Cafe for Real PeopleBy people passionate about the craftWe built Leaves ‘n Beans around our love of crafting the...
Coffee
Maple Bacon Coffee (Whole Bean) by Bones Coffee Company
Close Modal Original Price: Current Price: $15.99 Product is on Sale Maple-Glazed Bacon Frequency: Sugar Free No Artificial Sweeteners Keto...
Coffee
Brew Haha Coffeehouse | Home
About us Brew Haha Coffeehouse, which we affectionately call Brew, is a family owned coffee shop in central Overland Park,...
Coffee
Blackbeard Espresso
From 2014-2017, Blackbeard Espresso was primarily a mobile operation, brewing around the streets and event circuit of Louisville in almost...