PageSourceSearch

https://thegleamery.com/cdn/shop/t/92/assets/calendly_tracking.js?v=101010110605841323341789941353

js thegleamery.com collected 2026-10-08 16:56:36 UTC 6,614 bytes, 2 lines download raw bytes

1(function(window2,document2){"use strict";var _a,_b,_c;if(window2.gleameryCalendlyTracking)return;var VERSION="1",PREFIX="rk_session_id:",FIELDS=["source","medium","campaign","content","term"],surface=((_a=window2.gleameryAnalyticsIdentityBridgeConfig)==null?void 0:_a.surface)==="booking_flow"?"booking_app":"storefront",attribution,links=new Map,disposed=!1,refreshQueued=!1;function consented(){var _a2;return((_a2=window2.gleameryConsent)==null?void 0:_a2.hasCategory("analytics"))===!0}function calendlyUrl(value){try{var url=new URL(value,window2.location.href);return url.protocol==="https:"&&["calendly.com","www.calendly.com"].includes(url.hostname)?url:void 0}catch(e){return}}function snapshot(value){var result={};return FIELDS.forEach(function(field){typeof(value==null?void 0:value[field])=="string"&&value[field]&&(result[field]=value[field])}),result}function cookieSnapshot(name){try{var prefix=name+"=",cookie=document2.cookie.split(";").find(function(part){return part.trim().startsWith(prefix)}),result={};return decodeURIComponent(cookie?cookie.trim().slice(prefix.length):"").split("|").forEach(function(pair){var separator=pair.indexOf("=");if(!(separator<0)){var value=pair.slice(separator+1);value&&value!=="null"&&value!=="undefined"&&(result[pair.slice(0,separator)]=value)}}),snapshot(result)}catch(e){return{}}}function currentTouch(){var params=new URL(window2.location.href).searchParams,touch={};FIELDS.forEach(function(field){params.get("utm_"+field)&&(touch[field]=params.get("utm_"+field))});var referrer=document2.referrer;try{var hostname=new URL(referrer).hostname.toLowerCase();["thegleamery.com","gleamery.com"].some(function(domain){return hostname===domain||hostname.endsWith("."+domain)})&&(referrer="")}catch(e){referrer=""}return!touch.source&&referrer&&(referrer.includes(".google.")?touch.source="google":referrer.includes(".bing.")?touch.source="bing":referrer.includes("yahoo.")?touch.source="yahoo":referrer.includes("linkedin")?touch.source="linkedin":referrer.includes("facebook")?touch.source="facebook":/twitter|\/\/t\.co|\/\/x\.com/.test(referrer)?touch.source="twitter":touch.source=referrer),!touch.medium&&referrer&&(/google\.c|bing\.|yahoo\.c|duckduckgo/.test(referrer)?touch.medium="organic":/linkedin|facebook|twitter|\/\/t\.co|\/\/x\.com/.test(referrer)?touch.medium="social":touch.medium="referral"),(params.get("gclid")||params.get("gbraid")||params.get("wbraid"))&&(touch.source="google",touch.medium="cpc"),params.get("fbclid")&&(touch.source="facebook",touch.medium="social"),touch}function getAttribution(){if(attribution)return attribution;var current=currentTouch(),first=cookieSnapshot("analytics_first_touch");return{firstTouch:Object.keys(first).length?first:current,lastTouch:Object.keys(current).length?current:cookieSnapshot("analytics_last_touch")}}function prepare(value){var _a2;var url=calendlyUrl(value);if(!url||!consented())return{url:value};try{var sessionId=(_a2=window2.gleameryAnalyticsIdentityBridge)==null?void 0:_a2.getIdentifiers().rk_session_id;if(!sessionId&&typeof window2.getRKSessionId=="function"&&(sessionId=window2.getRKSessionId()),typeof sessionId!="string"||!/^[A-Za-z0-9_-]{1,128}$/.test(sessionId))return{url:value};var context=getAttribution(),lastTouch=snapshot(context.lastTouch);return Object.keys(lastTouch).length&&FIELDS.forEach(function(field){url.searchParams.delete("utm_"+field),lastTouch[field]&&url.searchParams.set("utm_"+field,lastTouch[field])}),url.searchParams.set("utm_content",PREFIX+sessionId),{url:url.toString(),sessionId:sessionId,context:context}}catch(e){return{url:value}}}function record(prepared,linkId){var _a2;if(!(!prepared.sessionId||!consented()))try{var destination=new URL(prepared.url);(_a2=window2.analytics)==null||_a2.track("Calendly Link Clicked",{rk_session_id:prepared.sessionId,calendly_tracking_version:VERSION,clicked_at:new Date().toISOString(),source_surface:surface,page_hostname:window2.location.hostname,page_path:window2.location.pathname,destination_hostname:destination.hostname,destination_path:destination.pathname,link_id:linkId||void 0,first_touch:snapshot(prepared.context.firstTouch),last_touch:snapshot(prepared.context.lastTouch)})}catch(e){}}function updateLink(link){var href=link.getAttribute("href"),entry=links.get(link),original=entry&&href===entry.rendered?entry.original:href;if(!original||!calendlyUrl(original)){links.delete(link);return}var prepared=prepare(original);return links.set(link,{original:original,rendered:prepared.url}),href!==prepared.url&&link.setAttribute("href",prepared.url),prepared}function refresh(){disposed||(links.forEach(function(_entry,link){link.isConnected||links.delete(link)}),document2.querySelectorAll("a[href]").forEach(updateLink))}function queueRefresh(){refreshQueued||disposed||(refreshQueued=!0,window2.queueMicrotask(function(){refreshQueued=!1,refresh()}))}function activate(event){if(!(event.defaultPrevented||(event.type==="click"?event.button!==0:event.button!==1))){var link=event.target instanceof window2.Element?event.target.closest("a[href]"):void 0;if(link){var prepared=updateLink(link);if(prepared){var section=link.closest("[id^='shopify-section-']");record(prepared,link.dataset.calendlyLinkId||link.id||(section==null?void 0:section.id))}}}}var observer=new window2.MutationObserver(queueRefresh);observer.observe(document2.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href"]}),document2.addEventListener("click",activate,!0),document2.addEventListener("auxclick",activate,!0),window2.gleameryCalendlyTracking={ver
1sion:VERSION,isCalendlyUrl:function(value){return!!calendlyUrl(value)},decorateUrl:function(value){return prepare(value).url},prepareNavigation:function(value,linkId){var prepared=prepare(value);return record(prepared,linkId),prepared.url},setAttribution:function(value){attribution=consented()&&value?{firstTouch:snapshot(value.firstTouch),lastTouch:snapshot(value.lastTouch)}:void 0,refresh()},refresh:refresh,destroy:function(){disposed=!0,observer.disconnect(),document2.removeEventListener("click",activate,!0),document2.removeEventListener("auxclick",activate,!0),links.forEach(function(entry,link){link.getAttribute("href")===entry.rendered&&link.setAttribute("href",entry.original)}),links.clear(),attribution=void 0}},(_b=window2.gleameryConsent)==null||_b.onConsentUpdate(function(){consented()||(attribution=void 0),refresh()}),(_c=window2.gleameryConsent)==null||_c.onCategory("analytics",refresh),refresh()})(window,document);
2//# sourceMappingURL=/cdn/shop/t/92/assets/calendly_tracking.js.map?v=101010110605841323341789941353

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.