mod-build 3.6.56-beta.1 → 3.6.56
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 +5 -0
- package/gulp-tasks/templates.js +2 -2
- package/package.json +1 -1
- package/src/scripts/vendor/google-tag-manager-head.js +3 -3
- package/src/scripts/vendor/heap-addeventproperties-identify.js +3 -1
- package/src/scripts/vendor/heap-tracking.js +5 -3
- package/src/scripts/vendor/heap-vwo.js +4 -2
- package/src/templates/_partials/scripts/analytics.html +0 -12
- package/src/templates/_partials/scripts/vwo-redirect-callback.html +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.6.56
|
|
4
|
+
|
|
5
|
+
- `noheap` + `nogtm` conditionals no longer needed (those variables will & have been set to "true" for all sites in our shared components / configs)
|
|
6
|
+
- adding `!window.Modalytics.privacyPreferencesDetected` conditional to check privacy settings to not load Heap for modernize.com
|
|
7
|
+
|
|
3
8
|
## 3.6.55
|
|
4
9
|
- Added conditional to check if `siteData` is empty — so our `fetchTcpaFromSitegenie()` and `getDefaultFormFieldConfig()` functions won't try to run on modify.modernize.com
|
|
5
10
|
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -231,7 +231,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
231
231
|
throw new Error(`${xhr.statusCode}: Error while fetching TCPA`);
|
|
232
232
|
}
|
|
233
233
|
const responseJson = await JSON.parse(response);
|
|
234
|
-
const finalTCPA = await
|
|
234
|
+
const finalTCPA = await company === 'Modernize' ? responseJson.tcpa.replace(/QuinStreet/g, 'Modernize') : responseJson.tcpa;
|
|
235
235
|
|
|
236
236
|
templatesData.tcpaText = await finalTCPA;
|
|
237
237
|
|
|
@@ -246,7 +246,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
|
|
|
246
246
|
if (!templatesData.doNotUseDefaultFieldConfig && !templatesData.defaultConfigCompleted) {
|
|
247
247
|
await getDefaultFormFieldConfig();
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
|
|
250
250
|
if (!templatesData.tcpaText && templatesData.primary_trade) {
|
|
251
251
|
await fetchTcpaFromSitegenie();
|
|
252
252
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var gtm_container_ID = (window.isQSPage && '{{qs_gtm_container_ID}}'.length > 0) ? '{{qs_gtm_container_ID}}' : '{{gtm_container_ID}}';
|
|
2
2
|
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
4
|
+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
5
|
+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
6
6
|
})(window,document,'script','dataLayer',gtm_container_ID);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
if (window.Modalytics && !window.Modalytics.privacyPreferencesDetected) {
|
|
2
|
+
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=(r?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+e+".js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n);for(var o=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],c=0;c<p.length;c++)heap[p[c]]=o(p[c])};
|
|
2
3
|
|
|
3
|
-
var heapIsDevEnv = window.location.host.match(new RegExp('(' + ['qa.', 'staging.', 'localhost', '.local', '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}'].join('|') + ')', 'i'));
|
|
4
|
+
var heapIsDevEnv = window.location.host.match(new RegExp('(' + ['qa.', 'staging.', 'localhost', '.local', '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}'].join('|') + ')', 'i'));
|
|
4
5
|
|
|
5
|
-
heap.load(heapIsDevEnv ? "3986615799" : "3246578271"); // dynamic tracker ID based on env
|
|
6
|
+
heap.load(heapIsDevEnv ? "3986615799" : "3246578271"); // dynamic tracker ID based on env
|
|
7
|
+
}
|
|
@@ -20,8 +20,10 @@ _vis_opt_queue.push(function() {
|
|
|
20
20
|
// Use the _vis_data object created above to fetch the data,
|
|
21
21
|
// key of the object is the Test ID and the value is Variation Name
|
|
22
22
|
if (_vis_counter) {
|
|
23
|
-
|
|
23
|
+
if (window.Modalytics && !window.Modalytics.privacyPreferencesDetected) {
|
|
24
|
+
heap.addUserProperties(window._vis_data);
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
} catch (err) {};
|
|
27
|
-
});
|
|
29
|
+
});
|
|
@@ -1,16 +1,4 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
{{ fileInclude 'node_modules/mod-build/src/scripts/has-qs-params.js' }}
|
|
3
3
|
{{ fileInclude 'node_modules/mod-build/src/scripts/url-cleaner.js' }}
|
|
4
|
-
{{#unless noheap}}
|
|
5
|
-
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/heap-tracking.js' }}
|
|
6
|
-
if(window.Modalytics) {
|
|
7
|
-
Modalytics.init();
|
|
8
|
-
} else {
|
|
9
|
-
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/heap-addeventproperties-identify.js' }}
|
|
10
|
-
}
|
|
11
|
-
{{/unless}}
|
|
12
|
-
|
|
13
|
-
{{#unless nogtm}}
|
|
14
|
-
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/google-tag-manager-head.js' }}
|
|
15
|
-
{{/unless}}
|
|
16
4
|
</script>
|
|
@@ -32,19 +32,6 @@
|
|
|
32
32
|
try {
|
|
33
33
|
// flag to call Modalytics.initHeapVwo() method in site level js
|
|
34
34
|
window.initHeapVwo = true;
|
|
35
|
-
|
|
36
|
-
{{#unless noheap}}
|
|
37
|
-
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/heap-tracking.js' }}
|
|
38
|
-
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/heap-vwo.js' }}
|
|
39
|
-
if(window.Modalytics) {
|
|
40
|
-
Modalytics.init();
|
|
41
|
-
} else {
|
|
42
|
-
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/heap-addeventproperties-identify.js' }}
|
|
43
|
-
}
|
|
44
|
-
{{/unless}}
|
|
45
|
-
{{#unless nogtm}}
|
|
46
|
-
{{ fileInclude 'node_modules/mod-build/src/scripts/vendor/google-tag-manager-head.js' }}
|
|
47
|
-
{{/unless}}
|
|
48
35
|
} catch (e) {}
|
|
49
36
|
return;
|
|
50
37
|
}
|