mod-build 4.0.59-beta.9 → 4.0.59

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.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  ## 4.0.59
4
4
 
5
- - Adding VWO variation ID to the body tag as an attribute `data-vwo-test-id`
5
+ - Added jacuzzi in the sites that should have tcpa below the cta.
6
6
 
7
7
  ## 4.0.58
8
8
 
9
- - Upgraded to new vwo smart code
9
+ - Upgraded to new VWO smart code.
10
10
 
11
11
  ## 4.0.57
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.59-beta.9",
3
+ "version": "4.0.59",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -45,6 +45,7 @@ function handlebarsX(expression, context) {
45
45
  }
46
46
 
47
47
  const tradesWithTcpaAboveCta = ['HOME_SECURITY'];
48
+ const sitesWithTcpaBelowCta = ['go.jacuzzi.com'];
48
49
 
49
50
  export const handlebarsHelpers = [
50
51
  // Run any js line
@@ -192,7 +193,8 @@ export const handlebarsHelpers = [
192
193
  return false;
193
194
  }
194
195
  const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
195
- return tradesWithTcpaAboveCta.includes(trade) || page.isBranded;
196
+ const site = page.website_name?.toLowerCase();
197
+ return (tradesWithTcpaAboveCta.includes(trade) || page.isBranded) && !sitesWithTcpaBelowCta.includes(site);
196
198
  }
197
199
  },
198
200
  {
@@ -202,7 +204,8 @@ export const handlebarsHelpers = [
202
204
  return false;
203
205
  }
204
206
  const trade = page.primary_trade.replace(/\s+/g, '_').toUpperCase();
205
- return !tradesWithTcpaAboveCta.includes(trade) && !page.isBranded;
207
+ const site = page.website_name?.toLowerCase();
208
+ return (!tradesWithTcpaAboveCta.includes(trade) && !page.isBranded) || sitesWithTcpaBelowCta.includes(site);
206
209
  }
207
210
  }
208
211
  ]
@@ -2,8 +2,7 @@
2
2
  window.VWO = window.VWO || [];
3
3
  window.VWO.push(['onEventReceive', 'vA', function (data) {
4
4
  var experimentId = data[1];
5
- var variationId = +data[2];
6
- // add sentry log if variationId is NaN?
5
+ var variationId = data[2];
7
6
  var variationName = _vwo_exp[experimentId].comb_n[variationId];
8
7
  if (typeof(_vwo_exp[experimentId].comb_n[variationId]) !== 'undefined' && ['VISUAL_AB', 'VISUAL', 'SPLIT_URL','SURVEY'].indexOf(_vwo_exp[experimentId].type) > -1) {
9
8
  window._vwo_campaignData = {
@@ -11,12 +10,6 @@
11
10
  n: variationName
12
11
  }
13
12
  }
14
- if (variationId !== 1 && window.addVwoTestAttribute) {
15
- // Control is assigned variation ID 1 - variations receive incremented IDs starting from 2
16
- const actualVariationId = variationId - 1;
17
- const vwoTestAttrValue = `${experimentId}-${actualVariationId}`;
18
- document.body.setAttribute('data-vwo-test', vwoTestAttrValue);
19
- }
20
13
  }
21
14
  }]);
22
15