gatsby-core-theme 44.4.51 → 44.4.52
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 +7 -0
- package/gatsby-browser.js +16 -21
- package/package.json +1 -1
- package/gatsby-ssr.js +0 -52
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [44.4.52](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.51...v44.4.52) (2025-09-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* revert gtm changes ([4f05ce2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4f05ce26a89137acb82d638f9ffceb29168127a8))
|
|
7
|
+
|
|
1
8
|
## [44.4.51](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.50...v44.4.51) (2025-09-02)
|
|
2
9
|
|
|
3
10
|
|
package/gatsby-browser.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-lonely-if */
|
|
2
1
|
/* eslint-disable no-sequences */
|
|
3
2
|
/* eslint-disable one-var */
|
|
4
3
|
/* eslint-disable no-var */
|
|
@@ -122,21 +121,18 @@ const piguard = () =>{
|
|
|
122
121
|
document.head.appendChild(script);
|
|
123
122
|
}
|
|
124
123
|
|
|
125
|
-
function
|
|
124
|
+
function scrollEvent(event) {
|
|
126
125
|
initGTM();
|
|
127
126
|
|
|
128
127
|
if (!document.getElementById('piguard') && process.env.ENABLE_PIGUARD === 'true') {
|
|
129
128
|
piguard();
|
|
130
129
|
}
|
|
131
130
|
|
|
132
|
-
if (process.env.ENABLE_MICROSOFT === 'true' && !document.getElementById('microsoft-code'))
|
|
131
|
+
if (process.env.ENABLE_MICROSOFT === 'true' && !document.getElementById('microsoft-code'))
|
|
133
132
|
microsoftAdvertising();
|
|
134
|
-
}
|
|
135
133
|
|
|
136
|
-
if (process.env.ENABLE_OPTINMONSTR === 'true' && !document.getElementById('optin-monstr'))
|
|
134
|
+
if (process.env.ENABLE_OPTINMONSTR === 'true' && !document.getElementById('optin-monstr'))
|
|
137
135
|
optinMonster();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
136
|
if (process.env.ENABLE_PIXEL === 'true' && !document.getElementById('pixel-code')) {
|
|
141
137
|
if (
|
|
142
138
|
typeof window !== 'undefined' &&
|
|
@@ -144,25 +140,24 @@ function loadThirdPartyScripts() {
|
|
|
144
140
|
) {
|
|
145
141
|
loadFacebookPixel();
|
|
146
142
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
143
|
+
fbq('init', process.env.PIXEL_ID);
|
|
144
|
+
|
|
145
|
+
// Initialize and track the PageView event
|
|
146
|
+
fbq('track', 'PageView');
|
|
152
147
|
}
|
|
153
148
|
}
|
|
149
|
+
|
|
150
|
+
if (event) {
|
|
151
|
+
event.currentTarget.removeEventListener(event.type, scrollEvent); // remove the event listener that got triggered
|
|
152
|
+
}
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
exports.onClientEntry = () => {
|
|
157
156
|
if (process.env.PPC === 'true') {
|
|
158
|
-
|
|
159
|
-
} else
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
requestIdleCallback(loadScripts, { timeout: 3000 });
|
|
164
|
-
} else {
|
|
165
|
-
window.setTimeout(loadScripts, 3000);
|
|
166
|
-
}
|
|
157
|
+
scrollEvent(null);
|
|
158
|
+
} else {
|
|
159
|
+
document.addEventListener('scroll', scrollEvent, { passive: true });
|
|
160
|
+
document.addEventListener('mousemove', scrollEvent, { passive: true });
|
|
161
|
+
document.addEventListener('touchstart', scrollEvent, { passive: true });
|
|
167
162
|
}
|
|
168
163
|
};
|
package/package.json
CHANGED
package/gatsby-ssr.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
/* eslint-disable react/react-in-jsx-scope */
|
|
3
|
-
/* eslint-disable import/prefer-default-export */
|
|
4
|
-
export const onRenderBody = ({ setHeadComponents }) => {
|
|
5
|
-
const links = [];
|
|
6
|
-
|
|
7
|
-
if (process.env.GA_TRACKING_ID) {
|
|
8
|
-
links.push(
|
|
9
|
-
<link
|
|
10
|
-
rel="preconnect"
|
|
11
|
-
href="https://www.googletagmanager.com"
|
|
12
|
-
crossOrigin="anonymous"
|
|
13
|
-
key="gtm-preconnect"
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (process.env.ENABLE_PIXEL === 'true') {
|
|
19
|
-
links.push(
|
|
20
|
-
<link
|
|
21
|
-
rel="preconnect"
|
|
22
|
-
href="https://connect.facebook.net"
|
|
23
|
-
crossOrigin="anonymous"
|
|
24
|
-
key="fb-preconnect"
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (process.env.ENABLE_OPTINMONSTR === 'true') {
|
|
30
|
-
links.push(
|
|
31
|
-
<link
|
|
32
|
-
rel="preconnect"
|
|
33
|
-
href="https://a.omappapi.com"
|
|
34
|
-
crossOrigin="anonymous"
|
|
35
|
-
key="optin-preconnect"
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (process.env.ENABLE_MICROSOFT === 'true') {
|
|
41
|
-
links.push(
|
|
42
|
-
<link
|
|
43
|
-
rel="preconnect"
|
|
44
|
-
href="https://bat.bing.com"
|
|
45
|
-
crossOrigin="anonymous"
|
|
46
|
-
key="bing-preconnect"
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
setHeadComponents(links);
|
|
52
|
-
};
|