@speedkit/cli 2.86.0 → 2.88.0
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,3 +1,18 @@
|
|
|
1
|
+
# [2.88.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.87.0...v2.88.0) (2025-06-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **customer-config:** suppress ecConversion tracking event for Shopify customers ([bad89dd](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/bad89ddaeca4e535c37ca1f36ab490d03eb2813e))
|
|
7
|
+
|
|
8
|
+
# [2.87.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.86.0...v2.87.0) (2025-06-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **customer-config:** provide return templates for ecAddToCart tracking events ([4b5f502](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/4b5f502afed7cb479665fb8983199963562b070a))
|
|
14
|
+
* **customer-config:** switch ecAddToCart tracking event from set to append ([46d8833](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/46d8833e89d5317969ac72a5c7b846106d3a92ba))
|
|
15
|
+
|
|
1
16
|
# [2.86.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.85.1...v2.86.0) (2025-05-23)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
14
14
|
}
|
|
15
15
|
{{#if hasSoftNavigations}}
|
|
16
16
|
|
|
17
|
+
// Soft Navigation Handling:
|
|
17
18
|
var softLcpPending = false;
|
|
18
19
|
var latestUrl = location.href;
|
|
19
20
|
{{/if}}
|
|
@@ -22,6 +23,8 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
22
23
|
var pageTypeSent = false;
|
|
23
24
|
{{/if}}
|
|
24
25
|
|
|
26
|
+
var defaultCurrency = 'EUR'; // TODO: verify default currency
|
|
27
|
+
|
|
25
28
|
window.SpeedKit = window.SpeedKit || {};
|
|
26
29
|
SpeedKit.rumPlugins = SpeedKit.rumPlugins || [];
|
|
27
30
|
SpeedKit.rumPlugins.push(
|
|
@@ -31,8 +34,10 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
31
34
|
{{/if}}
|
|
32
35
|
{{#if useGATracking}}
|
|
33
36
|
new GAEcommerceTrackingPlugin({
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
defaultCurrency: defaultCurrency,
|
|
38
|
+
{{#if isShopify}}
|
|
39
|
+
trackConfirmation: false, // No ecConversion tracking as it is already handled by the Speed Kit Extension for Shopify
|
|
40
|
+
{{/if}}
|
|
36
41
|
}),
|
|
37
42
|
{{/if}}
|
|
38
43
|
|
|
@@ -270,11 +275,10 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
270
275
|
// // iterate over all added products
|
|
271
276
|
// for (var i = 0; i < ecommerce.add.products.length; i++) {
|
|
272
277
|
// aTCProductsArray.push({
|
|
273
|
-
// id: ecommerce.add.products[i].id
|
|
274
|
-
//
|
|
275
|
-
// currencyCode: currencyCode ? currencyCode : 'EUR',
|
|
278
|
+
// id: ecommerce.add.products[i].id, // optional – remove if no id is available
|
|
279
|
+
// currencyCode: currencyCode || defaultCurrency,
|
|
276
280
|
// price: Number(ecommerce.add.products[i].price),
|
|
277
|
-
// quantity: ecommerce.add.products[i].quantity
|
|
281
|
+
// quantity: Number(ecommerce.add.products[i].quantity) || 1,
|
|
278
282
|
// });
|
|
279
283
|
// }
|
|
280
284
|
//
|
|
@@ -302,8 +306,9 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
302
306
|
// var orderId = purchase.actionField.id;
|
|
303
307
|
// var orderValue = String(purchase.actionField.revenue).replace(',', '.');
|
|
304
308
|
// return {
|
|
305
|
-
//
|
|
306
|
-
//
|
|
309
|
+
// id: String(orderId),
|
|
310
|
+
// currencyCode: defaultCurrency,
|
|
311
|
+
// revenue: Number(orderValue),
|
|
307
312
|
// };
|
|
308
313
|
// },
|
|
309
314
|
// },
|
|
@@ -313,7 +318,7 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
313
318
|
// {
|
|
314
319
|
// key: 'ecAddToCart',
|
|
315
320
|
// on: onAddToCartClick,
|
|
316
|
-
//
|
|
321
|
+
// append: function () {
|
|
317
322
|
// if (window.ShopifyAnalytics?.lib) {
|
|
318
323
|
// var shopifyData = window.ShopifyAnalytics.lib;
|
|
319
324
|
// var product;
|
|
@@ -329,10 +334,9 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
329
334
|
//
|
|
330
335
|
// if (product) {
|
|
331
336
|
// return {
|
|
332
|
-
//
|
|
333
|
-
// variantId: product.variantId,
|
|
337
|
+
// id: product.productId + '_' + product.variantId, // optional – remove if no id is available
|
|
334
338
|
// price: Number(product.price),
|
|
335
|
-
//
|
|
339
|
+
// currencyCode: product.currency || defaultCurrency,
|
|
336
340
|
// quantity: 1,
|
|
337
341
|
// }
|
|
338
342
|
// }
|
|
@@ -340,39 +344,40 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
340
344
|
// }
|
|
341
345
|
// },
|
|
342
346
|
// },
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
on: ShopifyReady,
|
|
346
|
-
set: function() {
|
|
347
|
-
var confirmationPage = location.pathname.indexOf('/thank_you') > -1;
|
|
348
|
-
if (
|
|
349
|
-
confirmationPage &&
|
|
350
|
-
window.Shopify?.checkout
|
|
351
|
-
) {
|
|
352
|
-
var orderId = window.Shopify.checkout.order_id;
|
|
353
|
-
var orderCurrency = window.Shopify.checkout.currency;
|
|
354
|
-
var orderValue = window.Shopify.checkout.total_price;
|
|
355
|
-
|
|
356
|
-
return {
|
|
357
|
-
id: orderId, currencyCode: orderCurrency, revenue: Number(orderValue),
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
},
|
|
347
|
+
|
|
348
|
+
// No custom ecConversion tracking event as it is already handled by the Speed Kit Extension for Shopify
|
|
362
349
|
{{else}}
|
|
363
350
|
|
|
364
351
|
{
|
|
365
352
|
key: 'ecAddToCart',
|
|
366
353
|
// TODO: set proper 'on' event listener
|
|
367
|
-
|
|
368
|
-
//
|
|
354
|
+
append: function() {
|
|
355
|
+
// var itemId = ...;
|
|
356
|
+
// var itemPrice = ...;
|
|
357
|
+
// var itemCurrency = ...;
|
|
358
|
+
// var itemQuantity = ...;
|
|
359
|
+
//
|
|
360
|
+
// return {
|
|
361
|
+
// id: String(itemId), // optional – remove if no id is available
|
|
362
|
+
// price: Number(itemPrice),
|
|
363
|
+
// currencyCode: itemCurrency || defaultCurrency,
|
|
364
|
+
// quantity: Number(itemQuantity) || 1,
|
|
365
|
+
// }
|
|
369
366
|
},
|
|
370
367
|
},
|
|
371
368
|
{
|
|
372
369
|
key: 'ecConversion',
|
|
373
370
|
// TODO: set proper 'on' event listener
|
|
374
371
|
set: function() {
|
|
375
|
-
//
|
|
372
|
+
// var orderId = ...;
|
|
373
|
+
// var orderValue = ...;
|
|
374
|
+
// var orderCurrency = ...;
|
|
375
|
+
//
|
|
376
|
+
// return {
|
|
377
|
+
// id: String(orderId),
|
|
378
|
+
// currencyCode: orderCurrency || defaultCurrency,
|
|
379
|
+
// revenue: Number(orderValue),
|
|
380
|
+
// };
|
|
376
381
|
},
|
|
377
382
|
},
|
|
378
383
|
{{/if}}
|
package/oclif.manifest.json
CHANGED