From ec0586c1e5f37f3811834933a25068dab9cdd494 Mon Sep 17 00:00:00 2001 From: Edward Casbon Date: Wed, 11 Oct 2023 09:33:36 +0100 Subject: [PATCH] Add local.simple-talk.com as an excluded GA4 environment. (#503) * Added local.simple-talk.com as an excluded GA4 environment. * Version bump to v14.2.1 * Add version number to deprecated functions --- dist/honeycomb.js | 8 ++++---- dist/honeycomb.min.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/analytics/js/honeycomb.analytics.google.js | 7 ++++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/dist/honeycomb.js b/dist/honeycomb.js index 3c9a4ada..e759015c 100644 --- a/dist/honeycomb.js +++ b/dist/honeycomb.js @@ -104,7 +104,7 @@ var init = function init() { }); }; var isExcludedEnvironment = exports.isExcludedEnvironment = function isExcludedEnvironment() { - var excludedEnvironments = ['localhost', 'local.red-gate.com', 'local.honeycomb.com', 'webstaging.red-gate.com', 'coredev-uat']; + var excludedEnvironments = ['localhost', 'local.red-gate.com', 'local.honeycomb.com', 'local.simple-talk.com', 'webstaging.red-gate.com', 'coredev-uat']; var isExcluded = false; excludedEnvironments.forEach(function (environment) { if (window.location.host.includes(environment)) { @@ -257,13 +257,13 @@ var setupTrackingAlias = exports.setupTrackingAlias = function setupTrackingAlia } }; var setCustomVariable = function setCustomVariable() { - (0, _honeycombNotification.logDeprecatedFunctionToConsole)('setCustomVariable', 'Google Analytics'); + (0, _honeycombNotification.logDeprecatedFunctionToConsole)('setCustomVariable', 'Google Analytics', '14.2.0'); }; var setOptimizeId = function setOptimizeId() { - (0, _honeycombNotification.logDeprecatedFunctionToConsole)('setOptimizeId', 'Google Analytics'); + (0, _honeycombNotification.logDeprecatedFunctionToConsole)('setOptimizeId', 'Google Analytics', '14.2.0'); }; var setSites = function setSites() { - (0, _honeycombNotification.logDeprecatedFunctionToConsole)('setSites', 'Google Analytics'); + (0, _honeycombNotification.logDeprecatedFunctionToConsole)('setSites', 'Google Analytics', '14.2.0'); }; var _default = exports["default"] = { init: init, diff --git a/dist/honeycomb.min.js b/dist/honeycomb.min.js index ee59f6b5..48fcea04 100644 --- a/dist/honeycomb.min.js +++ b/dist/honeycomb.min.js @@ -1 +1 @@ -!function a(i,n,r){function l(e,t){if(!n[e]){if(!i[e]){var o="function"==typeof require&&require;if(!t&&o)return o(e,!0);if(c)return c(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}o=n[e]={exports:{}},i[e][0].call(o.exports,function(t){return l(i[e][1][t]||t)},o,o.exports,a,i,n,r)}return n[e].exports}for(var c="function"==typeof require&&require,t=0;t=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o'),t.find(".js-animate--fade__item").hide().first().show(),setInterval(a,9e3))})}}},{}],4:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.version=o.date=o.breakpoints=void 0;o.version="Version goes here",o.date="Date goes here",o.breakpoints=[{breakpoint:"large",width:9999},{breakpoint:"medium",width:768},{breakpoint:"small",width:480}]},{}],5:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function a(t){document.documentElement.classList.add(t)}function i(){return-1!==navigator.appVersion.indexOf("MSIE 7")}o.default={init:function(){i()&&a("ie7")},isIE7:i}},{}],6:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var c=(t=t("../../document/js/honeycomb.document.load-script"))&&t.__esModule?t:{default:t};o.default={init:function t(){var e=0=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);oIf you prefer, you can choose not to allow some types of cookies. To disallow all cookies, except essential cookies that our site needs to function, click Save settings. Otherwise, you can enable certain types of cookies by checking the appropriate box under Manage cookie groups.
Blocking some types of cookies may affect your experience of our site and what we can offer you.",n.appendChild(r),document.createElement("button")),l=(r.setAttribute("class","button button--primary button--small spaced-bottom--tight spaced-right--tight"),r.innerHTML="Accept all",r.addEventListener("click",function(t){t.preventDefault(),i(null)}),n.appendChild(r),document.createElement("button")),l=(l.setAttribute("class","button button--small spaced-bottom--tight"),l.innerHTML="Reject all",l.addEventListener("click",function(t){t.preventDefault();var e,o={};for(e in a)o[e]=0;i(o)}),n.appendChild(l),document.createElement("h2")),l=(l.setAttribute("class","gamma text--redgate"),l.innerHTML="Manage cookie groups",n.appendChild(l),document.createElement("p")),c=(l.innerHTML="Performance cookies include Google Analytics and similar platforms that help us see how people are using our site. Targeting cookies let us deliver content and ads relevant to your interests on our sites and third-party ones.",n.appendChild(l),document.createElement("ul"));for(o in c.setAttribute("class","cookie-dialog__groups"),a){var s=document.createElement("li"),d=document.createElement("input"),p=(d.setAttribute("type","checkbox"),d.setAttribute("name","groups[]"),d.setAttribute("id","group-".concat(o)),d.setAttribute("value",o),1==a[o]&&d.setAttribute("checked","checked"),document.createElement("label"));p.setAttribute("for","group-".concat(o)),p.innerHTML=o,s.appendChild(d),s.appendChild(p),c.appendChild(s)}n.appendChild(c);var l=document.createElement("div"),u=(l.setAttribute("class","cookie-dialog__controls"),document.createElement("button")),u=(u.setAttribute("class","button button--primary button--small"),u.innerHTML="Save settings",u.addEventListener("click",function(t){t.preventDefault();for(var e=m.querySelectorAll('input[type="checkbox"]'),o={},a=0;aWe use some essential cookies to make this website work.

\n

We\'d like to set additional ones to see how you use our site and for advertising.

\n',w=[],f=function(){return p},r=function(){return u},g=function(){return m},y=function(){return h},v=function(){return b},k=function(){return w},M=function(){var t=JSON.parse(c.default.get(f()));return"object"!==n(t)||null===t?null:t},_=function(){var e=0

"+e.formatted_address.replace(/,/gi,",
")+"

",a=new window.google.maps.InfoWindow({content:t}),window.google.maps.event.addListener(o,"click",function(){a.open(i,o)}),a.open(i,o))})))})}}},{}],26:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function a(){void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so dropdown functionality won't work as expected"):window.jQuery(n).find("li").each(function(){var t,e=window.jQuery(this);e.hasClass(c)||0".concat(d(),"")).attr("href","#toggle").attr("tabindex","-1").addClass("arrow"),e.addClass("dropdown ".concat(l)),e.attr(s,"true"),t.appendTo(e))})}function i(){document.querySelectorAll("li[".concat(s,"] > a")).forEach(function(t){t.addEventListener("click",function(t){t.preventDefault();t=t.target.closest(".dropdown");t&&(t.classList.contains(r)?(t.classList.remove(r),t.classList.add(l)):(t.classList.add(r),t.classList.remove(l)))})}),document.querySelector("body").addEventListener("click",function(t){if(document.querySelector(".dropdown.".concat(r)))for(var e=document.querySelectorAll(".dropdown"),o=t.target,a=0;a'},p=function(t,e){for(var o=[],a=e.parentElement;null!==a;)a.classList.contains("dropdown")&&o.push(a),a=a.parentElement;for(var i=0;i'),e.addClass("header--primary--has-inner-container"),o.appendTo(e)}),void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so header functionality won't work as expected"):(t=window.jQuery(".js-header-primary-collapse"),o="dropdown--open",t.each(function(){window.jQuery("body").on("click",".header--primary__container .dropdown .arrow",function(){var t=window.jQuery(this),e=t.parents(".header--primary");t.parent("li").hasClass("open")?e.addClass(o):e.removeClass(o)})})),void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so header functionality won't work as expected"):((e=window.jQuery("body")).on("click",".header--primary__menu-button",function(t){t.preventDefault(),e.hasClass("mobile-nav--open")?e.removeClass("mobile-nav--open"):e.addClass("mobile-nav--open")}),e.on("click",".header--primary__menu--mobile .dropdown > a",function(t){var e;"#toggle"!==this.getAttribute("href")&&(e=window.jQuery(this).siblings('a[href="#toggle"]'))&&(t.preventDefault(),e.trigger("click"))}))}}},{}],28:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function n(t,e){t.preventDefault(),null!==(t=e.parentElement).className.match(c)?t.className=t.className.replace(s,"").replace(c,""):t.className=t.className+" ".concat(s)}function r(t,e,o){t.preventDefault();for(var a=e.querySelectorAll(".".concat(c)),i=0;i
';return void 0!==t.icon&&t.icon.type?"font"===t.icon.type?e+='':"image"===t.icon.type&&(e+=''):e+='',e+='
X

'+t.content+"

"}o.default={init:function(){void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so notifications won\t work as expected"):window.jQuery("body").on("click",".notification--block .notification__close",function(t){t.preventDefault(),window.jQuery(this).parent().parent().slideUp({complete:function(){window.jQuery(this).remove()}})})},block:function(t){var e=this;this.options=t,this.defaults={type:"info",icon:{type:!1,src:!1},content:"",duration:!1,container:window.jQuery("body")},this.settings={},this.init=function(){window.jQuery.extend(!0,e.settings,e.defaults,e.options),e.notification=window.jQuery(a(e.settings)),e.show(),e.notification.on("click",".notification__close",function(t){t.preventDefault(),e.close()})},this.show=function(){e.notification.hide(),e.settings.container.prepend(e.notification),e.notification.slideDown(),e.settings.duration&&(e.timeoutId=window.setTimeout(function(){e.close.call(e)},e.settings.duration))},this.close=function(){e.notification.slideUp({complete:function(){this.remove()}}),e.settings.duration&&window.clearTimeout(e.timeoutId)},e.init()},buildNotification:a}},{}],30:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.logDeprecatedFunctionToConsole=void 0;o.logDeprecatedFunctionToConsole=function(){var t=0=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){var o;if(t)return"string"==typeof t?i(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?i(t,e):void 0}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o\n
\n
\n \n
\n
\n

We could not reach youtube.com

\n

youtube.com may currently be down, or may be blocked by your network.

\n
\n
\n \n '}catch(t){e.e(t)}finally{e.f()}}}function c(t){return function(t){var e=1e["20%"]&&30=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o'),t.find(".js-animate--fade__item").hide().first().show(),setInterval(a,9e3))})}}},{}],4:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.version=o.date=o.breakpoints=void 0;o.version="Version goes here",o.date="Date goes here",o.breakpoints=[{breakpoint:"large",width:9999},{breakpoint:"medium",width:768},{breakpoint:"small",width:480}]},{}],5:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function a(t){document.documentElement.classList.add(t)}function i(){return-1!==navigator.appVersion.indexOf("MSIE 7")}o.default={init:function(){i()&&a("ie7")},isIE7:i}},{}],6:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var c=(t=t("../../document/js/honeycomb.document.load-script"))&&t.__esModule?t:{default:t};o.default={init:function t(){var e=0=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);oIf you prefer, you can choose not to allow some types of cookies. To disallow all cookies, except essential cookies that our site needs to function, click Save settings. Otherwise, you can enable certain types of cookies by checking the appropriate box under Manage cookie groups.
Blocking some types of cookies may affect your experience of our site and what we can offer you.",n.appendChild(r),document.createElement("button")),l=(r.setAttribute("class","button button--primary button--small spaced-bottom--tight spaced-right--tight"),r.innerHTML="Accept all",r.addEventListener("click",function(t){t.preventDefault(),i(null)}),n.appendChild(r),document.createElement("button")),l=(l.setAttribute("class","button button--small spaced-bottom--tight"),l.innerHTML="Reject all",l.addEventListener("click",function(t){t.preventDefault();var e,o={};for(e in a)o[e]=0;i(o)}),n.appendChild(l),document.createElement("h2")),l=(l.setAttribute("class","gamma text--redgate"),l.innerHTML="Manage cookie groups",n.appendChild(l),document.createElement("p")),c=(l.innerHTML="Performance cookies include Google Analytics and similar platforms that help us see how people are using our site. Targeting cookies let us deliver content and ads relevant to your interests on our sites and third-party ones.",n.appendChild(l),document.createElement("ul"));for(o in c.setAttribute("class","cookie-dialog__groups"),a){var s=document.createElement("li"),d=document.createElement("input"),p=(d.setAttribute("type","checkbox"),d.setAttribute("name","groups[]"),d.setAttribute("id","group-".concat(o)),d.setAttribute("value",o),1==a[o]&&d.setAttribute("checked","checked"),document.createElement("label"));p.setAttribute("for","group-".concat(o)),p.innerHTML=o,s.appendChild(d),s.appendChild(p),c.appendChild(s)}n.appendChild(c);var l=document.createElement("div"),m=(l.setAttribute("class","cookie-dialog__controls"),document.createElement("button")),m=(m.setAttribute("class","button button--primary button--small"),m.innerHTML="Save settings",m.addEventListener("click",function(t){t.preventDefault();for(var e=u.querySelectorAll('input[type="checkbox"]'),o={},a=0;aWe use some essential cookies to make this website work.

\n

We\'d like to set additional ones to see how you use our site and for advertising.

\n',w=[],f=function(){return p},r=function(){return m},g=function(){return u},y=function(){return h},v=function(){return b},k=function(){return w},M=function(){var t=JSON.parse(c.default.get(f()));return"object"!==n(t)||null===t?null:t},_=function(){var e=0

"+e.formatted_address.replace(/,/gi,",
")+"

",a=new window.google.maps.InfoWindow({content:t}),window.google.maps.event.addListener(o,"click",function(){a.open(i,o)}),a.open(i,o))})))})}}},{}],26:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function a(){void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so dropdown functionality won't work as expected"):window.jQuery(n).find("li").each(function(){var t,e=window.jQuery(this);e.hasClass(c)||0".concat(d(),"")).attr("href","#toggle").attr("tabindex","-1").addClass("arrow"),e.addClass("dropdown ".concat(l)),e.attr(s,"true"),t.appendTo(e))})}function i(){document.querySelectorAll("li[".concat(s,"] > a")).forEach(function(t){t.addEventListener("click",function(t){t.preventDefault();t=t.target.closest(".dropdown");t&&(t.classList.contains(r)?(t.classList.remove(r),t.classList.add(l)):(t.classList.add(r),t.classList.remove(l)))})}),document.querySelector("body").addEventListener("click",function(t){if(document.querySelector(".dropdown.".concat(r)))for(var e=document.querySelectorAll(".dropdown"),o=t.target,a=0;a'},p=function(t,e){for(var o=[],a=e.parentElement;null!==a;)a.classList.contains("dropdown")&&o.push(a),a=a.parentElement;for(var i=0;i'),e.addClass("header--primary--has-inner-container"),o.appendTo(e)}),void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so header functionality won't work as expected"):(t=window.jQuery(".js-header-primary-collapse"),o="dropdown--open",t.each(function(){window.jQuery("body").on("click",".header--primary__container .dropdown .arrow",function(){var t=window.jQuery(this),e=t.parents(".header--primary");t.parent("li").hasClass("open")?e.addClass(o):e.removeClass(o)})})),void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so header functionality won't work as expected"):((e=window.jQuery("body")).on("click",".header--primary__menu-button",function(t){t.preventDefault(),e.hasClass("mobile-nav--open")?e.removeClass("mobile-nav--open"):e.addClass("mobile-nav--open")}),e.on("click",".header--primary__menu--mobile .dropdown > a",function(t){var e;"#toggle"!==this.getAttribute("href")&&(e=window.jQuery(this).siblings('a[href="#toggle"]'))&&(t.preventDefault(),e.trigger("click"))}))}}},{}],28:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;function n(t,e){t.preventDefault(),null!==(t=e.parentElement).className.match(c)?t.className=t.className.replace(s,"").replace(c,""):t.className=t.className+" ".concat(s)}function r(t,e,o){t.preventDefault();for(var a=e.querySelectorAll(".".concat(c)),i=0;i
';return void 0!==t.icon&&t.icon.type?"font"===t.icon.type?e+='':"image"===t.icon.type&&(e+=''):e+='',e+='
X

'+t.content+"

"}o.default={init:function(){void 0===window.jQuery?window.console.warn("Honeycomb: jQuery not found, so notifications won\t work as expected"):window.jQuery("body").on("click",".notification--block .notification__close",function(t){t.preventDefault(),window.jQuery(this).parent().parent().slideUp({complete:function(){window.jQuery(this).remove()}})})},block:function(t){var e=this;this.options=t,this.defaults={type:"info",icon:{type:!1,src:!1},content:"",duration:!1,container:window.jQuery("body")},this.settings={},this.init=function(){window.jQuery.extend(!0,e.settings,e.defaults,e.options),e.notification=window.jQuery(a(e.settings)),e.show(),e.notification.on("click",".notification__close",function(t){t.preventDefault(),e.close()})},this.show=function(){e.notification.hide(),e.settings.container.prepend(e.notification),e.notification.slideDown(),e.settings.duration&&(e.timeoutId=window.setTimeout(function(){e.close.call(e)},e.settings.duration))},this.close=function(){e.notification.slideUp({complete:function(){this.remove()}}),e.settings.duration&&window.clearTimeout(e.timeoutId)},e.init()},buildNotification:a}},{}],30:[function(t,e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.logDeprecatedFunctionToConsole=void 0;o.logDeprecatedFunctionToConsole=function(){var t=0=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(t,e){var o;if(t)return"string"==typeof t?i(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?i(t,e):void 0}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,a=new Array(e);o\n
\n
\n \n
\n
\n

We could not reach youtube.com

\n

youtube.com may currently be down, or may be blocked by your network.

\n
\n
\n \n '}catch(t){e.e(t)}finally{e.f()}}}function c(t){return function(t){var e=1e["20%"]&&30 { 'localhost', 'local.red-gate.com', 'local.honeycomb.com', + 'local.simple-talk.com', 'webstaging.red-gate.com', 'coredev-uat', ]; @@ -195,15 +196,15 @@ const setupTrackingAlias = (element = document) => { }; const setCustomVariable = (...args) => { - logDeprecatedFunctionToConsole('setCustomVariable', 'Google Analytics'); + logDeprecatedFunctionToConsole('setCustomVariable', 'Google Analytics', '14.2.0'); }; const setOptimizeId = (...args) => { - logDeprecatedFunctionToConsole('setOptimizeId', 'Google Analytics'); + logDeprecatedFunctionToConsole('setOptimizeId', 'Google Analytics', '14.2.0'); }; const setSites = (...args) => { - logDeprecatedFunctionToConsole('setSites', 'Google Analytics'); + logDeprecatedFunctionToConsole('setSites', 'Google Analytics', '14.2.0'); }; export default {