@griddo/cx 1.74.18 → 1.74.20

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/gatsby-node.js CHANGED
@@ -31,6 +31,8 @@ let createdPages = [];
31
31
  let buildProcessData = {};
32
32
  const componentsVersion = getComponentsVersion();
33
33
 
34
+ const renderId = process.env.RENDERID || new Date().valueOf();
35
+
34
36
  // -----------------------------------------------------------------------------
35
37
  // Component System alias
36
38
  // -----------------------------------------------------------------------------
@@ -184,7 +186,7 @@ exports.createPages = async ({ actions }) => {
184
186
  // Template data with the distributor data added.
185
187
  const distributorTemplate = await DistributorService.getDistributorData(
186
188
  page,
187
- false, /// desactivada de momento la caché en distribuidores
189
+ renderId,
188
190
  );
189
191
 
190
192
  additionalInfo.navigations = NavService.getPageNavigations(page);
@@ -198,27 +200,27 @@ exports.createPages = async ({ actions }) => {
198
200
  // Multi-page (pagination) or single-page
199
201
  isList
200
202
  ? await utils.renderListPages(
201
- {
202
- rootPage: page,
203
- pages: utils.getList(distributorTemplate),
204
- isRoot: false,
205
- defaultLang,
206
- distributorTemplate,
207
- },
208
- additionalInfo,
209
- actions.createPage
210
- )
203
+ {
204
+ rootPage: page,
205
+ pages: utils.getList(distributorTemplate),
206
+ isRoot: false,
207
+ defaultLang,
208
+ distributorTemplate,
209
+ },
210
+ additionalInfo,
211
+ actions.createPage
212
+ )
211
213
  : await utils.renderPage(
212
- {
213
- ...page,
214
- template: distributorTemplate,
215
- isRoot: false,
216
- defaultLang,
217
- multiPageElements,
218
- },
219
- additionalInfo,
220
- actions.createPage
221
- );
214
+ {
215
+ ...page,
216
+ template: distributorTemplate,
217
+ isRoot: false,
218
+ defaultLang,
219
+ multiPageElements,
220
+ },
221
+ additionalInfo,
222
+ actions.createPage
223
+ );
222
224
 
223
225
  buildProcessData[siteId].publishHashes.push(page.hash);
224
226
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/cx",
3
3
  "description": "Griddo SSG based on Gatsby",
4
- "version": "1.74.18",
4
+ "version": "1.74.20",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -65,7 +65,7 @@
65
65
  "react-helmet": "^6.0.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@griddo/eslint-config-back": "^1.74.18",
68
+ "@griddo/eslint-config-back": "^1.74.20",
69
69
  "eslint": "^7.5.0",
70
70
  "eslint-plugin-node": "^11.1.0",
71
71
  "eslint-plugin-react": "7.14.3",
@@ -97,5 +97,5 @@
97
97
  "publishConfig": {
98
98
  "access": "public"
99
99
  },
100
- "gitHead": "6789c32f74d563e6503a793debaa106ba11ca9ac"
100
+ "gitHead": "f3f8927174aa35a0cfb99b25a096efd3065a7442"
101
101
  }
@@ -58,6 +58,7 @@ const runExportDomain = async domain => {
58
58
  const run = getEnvRunner({
59
59
  DOMAIN: domain,
60
60
  ASSET_PREFIX: getAssetPrefix(domain),
61
+ RENDERID: new Date().valueOf(),
61
62
  });
62
63
  const domainDestDirPath = path.resolve(destDirPath, domain);
63
64
 
@@ -104,6 +104,12 @@ export default function SEO(props) {
104
104
  {/* Lang */}
105
105
  <html lang={locale} />
106
106
 
107
+ {/* Data Layer */}
108
+ {/* Solo cuando se ejecuta en el navegador */}
109
+ {typeof window !== 'undefined' && analyticsDimensions && (
110
+ <script>{`const {__HIDDEN, ...newDataLayer} = ${analyticsDimensions};newDataLayer && window.dataLayer && window.dataLayer.push(newDataLayer);`}</script>
111
+ )}
112
+
107
113
  {/* Analytics with UA- */}
108
114
  {analyticsSrc && <script src={analyticsSrc}></script>}
109
115
 
@@ -113,12 +119,6 @@ export default function SEO(props) {
113
119
  {analyticsScriptCode}
114
120
  </script>
115
121
  )}
116
-
117
- {/* Data Layer */}
118
- {/* Solo cuando se ejecuta en el navegador */}
119
- {typeof window !== 'undefined' && analyticsDimensions && (
120
- <script>{`const {__HIDDEN, ...newDataLayer} = ${analyticsDimensions};newDataLayer && window.dataLayer && window.dataLayer.push(newDataLayer);`}</script>
121
- )}
122
122
  </Helmet>
123
123
  </>
124
124
  );