sfc-utils 1.4.160 → 1.4.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,13 @@ function debounce(fn, ms) {
16
16
  };
17
17
  }
18
18
 
19
- function appendLayoutScripts(isEmbedded, isAdRemoved, marketKey, category) {
19
+ function appendLayoutScripts(
20
+ isEmbedded,
21
+ isAdRemoved,
22
+ marketKey,
23
+ category,
24
+ enableBC
25
+ ) {
20
26
  const isApp = appCheck();
21
27
 
22
28
  // React Helmet is actually terrible and runs these scripts twice, so we are including them async ourselves
@@ -121,7 +127,7 @@ function appendLayoutScripts(isEmbedded, isAdRemoved, marketKey, category) {
121
127
 
122
128
  // Wait a beat, then add to body so it doesn't mess with the head (which Helmet seems to want to manage)
123
129
  setTimeout(() => {
124
- if (!isEmbedded && !isApp) {
130
+ if (!isEmbedded && (!isApp || enableBC)) {
125
131
  let blueconicURL = getBlueconic(window.location.origin);
126
132
  let script = document.createElement("script");
127
133
  script.type = "text/javascript";
package/index.js CHANGED
@@ -130,6 +130,7 @@ let blendHDN = function (meta) {
130
130
  HDN.dataLayer.content.keyNlpConsumerGood = [];
131
131
  HDN.dataLayer.content.keyNlpOther = [];
132
132
  HDN.dataLayer.content.keyNlpUnknown = [];
133
+ HDN.dataLayer.content.hasChatBot = meta.HAS_CHAT_BOT || false;
133
134
 
134
135
  // Signal to Blueconic that we are ready for gift button
135
136
  HDN.dataLayer.content.giftEnabled = meta.GIFT_ENABLED;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.160",
3
+ "version": "1.4.162",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",