mod-build 3.7.25 → 3.7.26-beta.1

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
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.26
4
+
5
+ - Adding VWO variation ID to the body tag as an attribute `data-vwo-test-id`
6
+
3
7
  ## 3.7.25
4
8
 
5
9
  - Upgraded to new VWO smart code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.7.25",
3
+ "version": "3.7.26-beta.1",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -10,6 +10,12 @@ window.VWO.push(['onEventReceive', 'vA', function (data) {
10
10
  n: variationName
11
11
  }
12
12
  }
13
+ if (variationId !== 1) {
14
+ // Control gets variation id as 1 and variation 1 get 2 and so on
15
+ const actualVariationId = variationId - 1;
16
+ const vwoTestAttrValue = `${experimentId}-${actualVariationId}`;
17
+ document.body.setAttribute('data-vwo-test-id', vwoTestAttrValue);
18
+ }
13
19
  }
14
20
  }]);
15
21