PageSourceSearch

https://www.everycolorisprimary.com/assets/custom-analytics.js

js everycolorisprimary.com collected 2026-10-07 10:48:27 UTC 18,694 bytes, 52 lines download raw bytes

1var pageName;var $=jQuery;$(window).on("load",function(){var currentLocation=window.location.pathname;if(currentLocation==="/"){pageName='home'}else{pageName=currentLocation.substring(currentLocation.lastIndexOf('/')+1,)}
2$("a").each(function(){if($(this).hasClass('site-header__logo')){$(this).attr("sc:linkname","global header|navigation|logo")}else if($(this).parents().hasClass("site-header")){$(this).attr("sc:linkname",`global header|navigation|${$(this).text().replace(/\s+/g, ' ').toLowerCase().trim()}`)}else if($(this).parents().hasClass("site-footer")){$(this).attr("sc:linkname",`global footer|navigation|${$(this).text().replace(/\s+/g, ' ').toLowerCase().trim()}`)}})
3$(".site-header__nav ul.site-header__nav__list li button").click(function(){let dataLayer=[];dataLayer.push({"event":"pfLinkName","pfLinkName":{"linkName":`global header|navigation|${$(this).text().replace(/\s+/g, ' ').toLowerCase().trim()}`,"linkType":"internal"}})
4var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)})
5$("a").each(function(){if(!$(this).parents().hasClass("site-header")&&!($(this).parents().hasClass("site-footer"))){let closestHeadingList,closestHeadingCount;if(!($(this).parents().closest("section").hasClass("infographic"))){closestHeadingList=$(this).parents().closest("section").find(":header")}else{closestHeadingList=$(this).parents().closest("section").find('.container .infographic__top__left h3')}
6closestHeadingCount=closestHeadingList.length;if(closestHeadingList){let closestHeadingItem;for(let i=0;i<closestHeadingCount;i++){if($(closestHeadingList[i]).html().lastIndexOf('<br draggable="true" data-highlightable="1" id="iis76j-2-2-2">')>0)
7closestHeadingItem=$(closestHeadingList[i]).html().split('<br draggable="true" data-highlightable="1" id="iis76j-2-2-2">').join(' ');else{if(closestHeadingCount>1){closestHeadingItem=$(closestHeadingList[i-1]).text().replace(/\s+/g,' ').toLowerCase().trim()+'|'+$(closestHeadingList[i]).text().replace(/\s+/g,' ').toLowerCase().trim()}else{closestHeadingItem=$(closestHeadingList[i]).text().replace(/\s+/g,' ').toLowerCase().trim()}}
8closestHeadingItem=closestHeadingItem.split(',').join("").split(".").join("").split(':').join("").replace(/\s+/g,' ').toLowerCase().trim()}
9if(pageName=='home'){$(this).attr("sc:linkname",`${pageName}|content|navigation|${closestHeadingItem}|${$(this).text().replace(/\s+/g, ' ').toLowerCase().trim()}`)}else{$(this).attr("sc:linkname",`content|navigation|${closestHeadingItem}|${$(this).text().replace(/\s+/g, ' ').toLowerCase().trim()}`)}}}});let totalPageSections=parseInt(100/$(".page-pagination__dots .page-pagination__dot").length);$(".page-pagination__dots .page-pagination__dot").each(function(index){$(this).attr({"dot_number":index})});$(".page-pagination-anchor").each(function(index){$(this).attr({"dot_number":index});let currentSectionName=$(this).parent().next(".custom-block-element").find(":header").text().toLowerCase().trim();$(this).attr("current-section",currentSectionName);$($(".page-pagination__dots .page-pagination__dot")[index]).attr("current-section",currentSectionName)});$(".page-pagination__dots .page-pagination__dot").click(function(){let dataLayer=[];dataLayer.push({"event":"pfLinkName","pfLinkName":{"linkName":`pagination|dots|active dot number ${$(this).attr("dot_number")}`,"linkType":"internal"}})
10var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)});$(".page-pagination__next").click(function(){let dataLayer=[];dataLayer.push({"event":"pfLinkName","pfLinkName":{"linkName":`pagination|next section|active dot number ${$(".page-pagination__dots .page-pagination__dot.active").next().attr("dot_number")}`,"linkType":"internal"}})
11var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)});$(".page-pagination__prev").click(function(){let dataLayer=[];dataLayer.push({"event":"pfLinkName","pfLinkName":{"linkName":`pagination|previous section|active dot number ${$(".page-pagination__dots .page-pagination__dot.active").prev().attr("dot_number")}`,"linkType":"internal"}})
12var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)});const findTheActiveSection=(function(){let prevSection=$(".page-pagination__dots .page-pagination__dot.active").attr("dot_number");return function(){if(prevSection!=$(".page-pagination__dots .page-pagination__dot.active").attr("dot_number")){let scrollToSection=$(".page-pagination__dots .page-pagination__dot.active").attr("current-section").split('.').join("").toLowerCase().trim();let dataLayer=[];dataLayer.push({"event":"pfSectionScroll","pfSectionScroll":{"sectionName":`scrolled to section|${scrollToSection}`}})
13var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event);prevSection=$(".page-pagination__dots .page-pagination__dot.active").attr("dot_number")}}})();let pageLoadCounter=0;const findTheActiveSectionPageLoad=(function(){return function(){if(pageLoadCounter==0){let scrollToSection;if($(".page-pagination__dots .page-pagination__dot.active").length>0){scrollToSection=$(".page-pagination__dots .page-pagination__dot.active").attr("current-section").split('.').join("").toLowerCase().trim()}else{scrollToSection=$($("section.columns-cta").find(":header")[0]).text().toLowerCase().trim()}
14let dataLayer=[];dataLayer.push({"event":"pfSectionScroll","pfSectionScroll":{"sectionName":`scrolled to section|${scrollToSection}`}})
15var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event);pageLoadCounter==1}}})();findTheActiveSectionPageLoad();$(window).scroll(function(){clearTimeout($.data(this,'scrollTimer'));$.data(this,'scrollTimer',setTimeout(function(){findTheActiveSection()},250))});if(window.location.pathname.includes('/resources')){var twentyFive=!1;var fifty=!1;var seventyFive=!1;var hundred=!1;jQuery(window).scroll(function(e){var scrollTop=jQuery(window).scrollTop();var docHeight=jQuery(document).height();var winHeight=jQuery(window).height();var scrollPercent=scrollTop/(docHeight-winHeight);var scrollPercentRounded=Math.round(scrollPercent*100);if(scrollPercentRounded>=25&&scrollPercentRounded<50&&!twentyFive){let dataLayer=[];dataLayer.push({event:"pfSectionScroll",pfSectionScroll:{sectionName:"25% scrolled",},});var event=new CustomEvent("pfAnalytics",{detail:dataLayer,});document.querySelector("body").dispatchEvent(event);
15twentyFive=!0}
16if(scrollPercentRounded>=50&&scrollPercentRounded<75&&!fifty){let dataLayer=[];dataLayer.push({event:"pfSectionScroll",pfSectionScroll:{sectionName:"50% scrolled",},});var event=new CustomEvent("pfAnalytics",{detail:dataLayer,});document.querySelector("body").dispatchEvent(event);fifty=!0}
17if(scrollPercentRounded>=75&&scrollPercentRounded<100&&!seventyFive){let dataLayer=[];dataLayer.push({event:"pfSectionScroll",pfSectionScroll:{sectionName:"75% scrolled",},});var event=new CustomEvent("pfAnalytics",{detail:dataLayer,});document.querySelector("body").dispatchEvent(event);seventyFive=!0}
18if(scrollPercentRounded>=100&&!hundred){let dataLayer=[];dataLayer.push({event:"pfSectionScroll",pfSectionScroll:{sectionName:"100% scrolled",},});var event=new CustomEvent("pfAnalytics",{detail:dataLayer,});document.querySelector("body").dispatchEvent(event);hundred=!0}})}
19$(".scroll-to-top").click(function(){var linkName=pageName+"|content navigation|"+"page scroll back to top";s.pfLinkName(linkName,"internal")});grvFormRegistration();function grvFormRegistration(){window.addEventListener('helixLoaded',(event)=>{if(event.detail.hasDirty==!1&&event.target.localName=="grv-registration-flow"){let grvExtLinks=document.querySelector('grv-registration-flow').shadowRoot.querySelectorAll("a");grvExtLinks.forEach(function(grvExtLink,index){$(grvExtLink).on('click',function(){let dataLayer=[];dataLayer.push({"event":"pfLinkName","pfLinkName":{"linkName":`content|navigation|GRV registration|${$(this).text().replace(/\s+/g, ' ').toLowerCase().trim()}`,"linkType":"external"}})
20var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event);console.log($(this).attr("href"))})})}},!1);window.addEventListener('helixEvent',(event)=>{if(event.target.localName=="grv-registration-flow"){const detail=event.detail;const name=Object.prototype.hasOwnProperty.call(detail,'name')?detail.name:undefined;const meta=(Object.prototype.hasOwnProperty.call(detail,'meta')&&detail.meta&&detail.meta.length)?detail.meta[0]:undefined;let analyticsType='';if(event.detail.path[1]=="personal"||event.detail.path[1]=="GrvStepController-personal"||meta.newStep=="personal"){meta.stepNumber="1"}else if(event.detail.path[1]=="secondStep"||event.detail.path[1]=="GrvStepController-secondStep"||meta.newStep=="secondStep"){meta.stepNumber="2"}else if(event.detail.path[1]=="noLicenseStep"||event.detail.path[1]=="GrvStepController-noLicenseStep"||meta.newStep=="noLicenseStep"){meta.stepNumber="2B"}else if(event.detail.path[1]=="fourthStep"||event.detail.path[1]=="GrvStepController-fourthStep"||meta.newStep=="fourthStep"||meta.newStep=="GrvStepController-fourthStep"){meta.stepNumber="3"}else if(meta.newStep=="success"){meta.stepNumber="4"}
21if(name=="GrvHeaderBackClick"){let dataLayer=[];dataLayer.push({"event":"pfRegistrationInputWorkflow","pfRegistrationInputWorkflow":{"registrationSource":"GRV","registrationStepNumber":meta.stepNumber,"registrationFieldName":detail.name,"registrationFormName":event.target.localName}})
22var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
23if(name=="GrvHeaderCloseClick"){let dataLayer=[];dataLayer.push({"event":"pfRegistrationInputWorkflow","pfRegistrationInputWorkflow":{"registrationSource":"GRV","registrationStepNumber":meta.stepNumber,"registrationFieldName":detail.name,"registrationFormName":event.target.localName}})
24var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
25if(name=="HelixInputFocus"||name=="grvSelectFocus"){if(!meta.name&&!meta.value)return;let prevFocusItem;let oldEventItem=(window.prevEventItem);let oldEvent=(window.prevEvent);if(window.prevFieldValue!=undefined){$(oldEventItem).attr("data-sub-value",window.prevFieldValue)}
26let currentInputEvent=event.target;let currentInputItem=event.path[0];let currentItemIsSelect;window.prevEvent=event;window.prevEventItem=currentInputItem;window.prevFieldValue=currentInputItem.value;if(($(oldEventItem).hasClass("helix-input"))&&(oldEventItem!=undefined)){setTimeout(function(){if(name=="grvSelectFocus"){currentItemIsSelect=($(currentInputItem.querySelector("helix-select")).hasClass("helix-select--has-focus"))}else{currentItemIsSelect=($(currentInputItem).hasClass("helix-input")&&$(currentInputItem).hasClass("helix-input--has-focus"))}
27if(!($(oldEventItem).hasClass("helix-input--has-error"))&&currentItemIsSelect&&(oldEventItem!=currentInputItem)&&($(oldEventItem).attr("data-sub-value")!=oldEventItem.value)){meta.value=oldEventItem.value;if((prevFocusItem!=oldEventItem)&&(meta.value!=undefined)){let dataLayer=[];dataLayer.push({"event":"pfRegistrationInputWorkflow","pfRegistrationInputWorkflow":{"registrationSource":"GRV","registrationStepNumber":oldEvent.detail.meta[0].stepNumber,"registrationFieldName":oldEvent.detail.meta[0].name,"registrationFormName":"grv-registration-flow"}})
28var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
29prevFocusItem=currentInputItem}},100)}
30$(currentInputEvent).on('focusout',function(){let oldBlurValue=currentInputItem.value;if(window.prevFieldValue!=undefined){$(currentInputItem).attr("data-sub-value",window.prevFieldValue)}
31if(window.prevEventItem!=null){window.prevEventItem=null;currentInputItem=prevEvent.path[0];setTimeout(function(){if(!($(currentInputItem).hasClass("helix-input--has-error"))&&($(currentInputItem).hasClass("helix-input"))&&($(currentInputItem).attr("data-sub-value")!=currentInputItem.value)){meta.value=currentInputItem.value;if((meta.value!=undefined)){let dataLayer=[];dataLayer.push({"event":"pfRegistrationInputWorkflow","pfRegistrationInputWorkflow":{"registrationSource":"GRV","registrationStepNumber":prevEvent.detail.meta[0].stepNumber,"registrationFieldName":prevEvent.detail.meta[0].name,"registrationFormName":"grv-registration-flow"}})
32var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
33prevFocusItem=currentInputItem}},100)}})}
34if(name=='HelixCheckboxSelect'||name=='HelixSelectChange'){if(!meta.name&&!meta.value)return;if(meta.value){let dataLayer=[];dataLayer.push({"event":"pfRegistrationInputWorkflow","pfRegistrationInputWorkflow":{"registrationSource":"GRV","registrationStepNumber":meta.stepNumber,"registrationFieldName":meta.name,"registrationFormName":event.target.localName}})
35var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}}
36if(name=="GrvStepPreNavigate"){let dataLayer=[];dataLayer.push({"event":"pfRegistrationWorkflow","pfRegistrationWorkflow":{"registrationSource":"GRV","registrationAction":"step","registrationStepNumber":meta.stepNumber,"registrationVisitorStatus":"non-validated","registrationPageLoad":"false","registrationFormName":"grv-registration-flow","registrationErrorMessage":"na","registrationUserID":"na","registrationUserGroup":"na"}})
37var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
38if(name=="GrvTooltip-Show"){let dataLayer=[];dataLayer.push({"event":"pfRegistrationInputWorkflow","pfRegistrationInputWorkflow":{"registrationSource":"GRV","registrationStepNumber":meta.stepNumber,"registrationFieldName":meta.name,"registrationFormName":event.target.localName}})
39var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
40if(name=='GrvStepContinue'){let dataLayer=[];dataLayer.push({"event":"pfLinkName","pfLinkName":{"linkName":`${event.target.localName}|GRV registration|step ${meta.stepNumber}|${meta.name}`,"linkType":"internal"}})
41var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
42if(name=='HelixButtonClick'&&meta.disabled==!1&&meta.stepNumber==2){if(!meta.name&&!meta.value)return;let dataLayer=[];if(meta.value=="noLicenseStep"){dataLayer.push({"event":"pfRegistrationInputWorkflow","pfRegistrationInputWorkflow":{"registrationSource":"GRV","registrationStepNumber":meta.stepNumber,"registrationFieldName":meta.value,"registrationFormName":event.target.localName}})}else if(meta.value=="fourthStep"){dataLayer.push({"event":"pfLinkName","pfLinkName":{"linkName":`${event.target.localName}|GRV registration|step ${meta.stepNumber}|${meta.value}`,"linkType":"internal"}})}
43var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}}},!1)}});(function(){window.configLocation=window.configLocation?window.configLocation:'/config.json';fetch('/config.json').then((response)=>{if(!response.ok){console.log("Response with error"+response);throw new Error('Not 2xx reponse')}
44response.json().then((data)=>{window.janrainConfig=data.grv;const grvApp=document.querySelector('grv-app');grvApp?.addEventListener('grvSessionLoggedIn',(sessionData)=>{let dataLayer=[];dataLayer.push({"event":"pfRegistrationWorkflow","pfRegistrationWorkflow":{"registrationSource":"GRV","registrationAction":"completed","registrationStepNumber":"4","registrationVisitorStatus":sessionData.detail.user.janrainRecord.hcpValidation.status,"registrationPageLoad":"false","registrationFormName":"grv-registration-flow","registrationErrorMessage":"na","registrationUserID":sessionData.detail.user.janrainRecord.uuid,"registrationUserGroup":sessionData.type}})
45var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)});grvApp?.addEventListener('grvSessionLoggedOut',(sessionData)=>{console.log("grvSessionLoggedOut data - "+JSON.stringify(sessionData))});grvApp?.addEventListener('helixEvent',(sessionData)=>
45{if(sessionData.detail.name=='GrvSubmitFailed'){let dataLayer=[];dataLayer.push({"event":"pfRegistrationWorkflow","pfRegistrationWorkflow":{"registrationSource":"GRV","registrationAction":"error","registrationStepNumber":"1","registrationVisitorStatus":"non-validated","registrationPageLoad":"false","registrationFormName":sessionData.localName.target,"registrationErrorMessage":sessionData.detail.meta[0].message[0],"registrationUserID":"na","registrationUserGroup":"na"}})
46var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
47if(sessionData.detail.name=='GrvUSLicenseValidationError'){let dataLayer=[];dataLayer.push({"event":"pfRegistrationWorkflow","pfRegistrationWorkflow":{"registrationSource":"GRV","registrationAction":"error","registrationStepNumber":"2","registrationVisitorStatus":"non-validated","registrationPageLoad":"false","registrationFormName":"grv-registration-flow","registrationErrorMessage":"we've been unable to validate your entry, please try again","registrationUserID":"na","registrationUserGroup":"na"}})
48var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
49if(sessionData.detail.name=='GrvSubmitStarted'){let dataLayer=[];dataLayer.push({"event":"pfRegistrationWorkflow","pfRegistrationWorkflow":{"registrationSource":"GRV","registrationAction":"submit","registrationStepNumber":"3","registrationVisitorStatus":"non-validated","registrationPageLoad":"false","registrationFormName":"grv-registration-flow","registrationErrorMessage":"na","registrationUserID":"na","registrationUserGroup":"na"}})
50var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}
51if(sessionData.detail.name=='GrvRegistrationInitiated'){let dataLayer=[];dataLayer.push({"event":"pfRegistrationWorkflow","pfRegistrationWorkflow":{"registrationSource":"GRV","registrationAction":"initiated","registrationStepNumber":"1","registrationVisitorStatus":"non-validated","registrationPageLoad":"false","registrationFormName":"grv-registration-flow","registrationErrorMessage":"na","registrationUserID":"na","registrationUserGroup":"na"}})
52var event=new CustomEvent('pfAnalytics',{detail:dataLayer});document.querySelector('body').dispatchEvent(event)}})})}).catch((error)=>{console.error(error)})})()

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.