@shoppexio/storefront 1.0.81 → 1.0.84
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 +12 -0
- package/README.md +2 -0
- package/dist/{chunk-QNHOMMRG.js → chunk-ROQI7BO6.js} +7259 -2105
- package/dist/chunk-ROQI7BO6.js.map +1 -0
- package/dist/customer.cjs +7225 -2071
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.js +1 -1
- package/dist/index.cjs +7364 -2108
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +103 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-QNHOMMRG.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.84
|
|
4
|
+
|
|
5
|
+
- `touchStorefrontPresence()` sends `event_type: "presence"`. The server refreshes the live session but no longer counts the ping as a shop view, so an idle tab with `sx-online-users` (or any theme that touches presence on a timer) stops adding a view every few minutes.
|
|
6
|
+
- New `trackCartActivity(cartValue, itemCount)`: reports a cart change for the live visitor map as a presence ping, without counting a page view. A cart state that any tab of the shop already reported is not sent again, so the cross-tab `storage` echo of one change is not a second ping.
|
|
7
|
+
- On code storefronts (platform page tracker active), `trackPageView(cartValue, itemCount)` sends the cart as cart activity instead of a second counted view.
|
|
8
|
+
- `trackPageView()` is otherwise unchanged: one call counts one view.
|
|
9
|
+
|
|
10
|
+
## 1.0.82
|
|
11
|
+
|
|
12
|
+
- Page views and presence send the page path (query and fragment dropped, long paths capped), so the dashboard can show the top live page.
|
|
13
|
+
- On code storefronts the platform injects a page tracker. While it runs, `trackPageView()` without cart data and `touchStorefrontPresence()` stand down so a view is not counted twice. `trackPageView(cartValue, itemCount)` still reports the cart activity the tracker cannot see.
|
|
14
|
+
|
|
3
15
|
## 1.0.81
|
|
4
16
|
|
|
5
17
|
- `ProductCategory` carries `sort_order`, the merchant's category position from the dashboard. Product-level category references arrive sorted by it, so a theme can order its filter row and grouped sections the way the merchant arranged them instead of alphabetically.
|
package/README.md
CHANGED
|
@@ -151,6 +151,8 @@ await refreshLiveUsers();
|
|
|
151
151
|
setInterval(refreshLiveUsers, 30_000);
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
+
`touchStorefrontPresence()` keeps the visitor online but never counts as a page view, so it is safe on a timer. Report page views with `trackPageView()` (once per page load or navigation) and later cart changes with `trackCartActivity(cartValue, itemCount)`, which updates the live visitor map without counting a view.
|
|
155
|
+
|
|
154
156
|
## Not this package
|
|
155
157
|
|
|
156
158
|
If you want the authenticated Developer API wrapper for backend integrations, use `@shoppexio/sdk`. Do not ship `@shoppexio/sdk` in a browser bundle; use this Storefront SDK for headless storefronts.
|