mod-build 3.6.53 → 3.6.54

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.6.54
4
+
5
+ - swapping out `modUtils.getHeapCookieData()` in the old (but still used) mod-form-contractor.js
6
+
3
7
  ## 3.6.53
4
8
 
5
9
  - Since we moved our footer modal templates to live in /quote/resources/shared-resources/, we needed to update `grab-cdn` gulp task to copy them from the updated path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.53",
3
+ "version": "3.6.54",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -137,17 +137,21 @@ modForm.mapProjectValue = function(trade) {
137
137
  */
138
138
  modForm.preprocessContractorFormData = function(formData, currentStep) {
139
139
  if (currentStep === 0) {
140
- var heapCookieData = modUtils.getHeapCookieData(),
140
+ var heapCookie = window.heap && window.heap.appid ? window.modUtils.getCookie('_hp2_id.' + window.heap.appid) : null,
141
141
  attributionKeys = modUtils.getSupportedTrackingParams();
142
142
 
143
143
  formData.primaryProjectClass = this.mapProjectValue(formData.primaryProjectClass);
144
144
 
145
- // Check heap cookie for tracking params and append to form
146
- $.each(heapCookieData, function(name, value) {
147
- if (attributionKeys.indexOf(name) > -1) {
148
- formData[name] = value;
149
- }
150
- });
145
+ if (heapCookie) {
146
+ var heapCookieData = JSON.parse(decodeURIComponent(heapCookie));
147
+
148
+ // Check heap cookie for tracking params and append to form
149
+ $.each(heapCookieData, function(name, value) {
150
+ if (attributionKeys.indexOf(name) > -1) {
151
+ formData[name] = value;
152
+ }
153
+ });
154
+ }
151
155
 
152
156
  // Check Eloqua GUID cookie value and add it to formData
153
157
  var elqGUID = this.elqGetGuidCookieValue();