Repository navigation
ECTO-2583 - Add tracking for IAP checkout - #154
Conversation
There was a problem hiding this comment.
Pull request overview
Adds frontend telemetry tracking for the In-App Purchase (IAP) checkout flow in the Shopware administration extension. A new helper utility emits events through Shopware.Telemetry, tagged with a source identifier and the extension's version (read at build time from composer.json and injected via Vite define). The checkout component now emits iap_checkout_initiated|confirmed|successful|failed|cancelled events, and the overview template gains data-analytics-* attributes on the GTC/conditions links. A pre-existing typo ("foud" → "found") is also corrected.
Changes:
- Inject
__SWAG_EXTENSION_STORE_VERSION__via Vite fromcomposer.json, with corresponding global type and Jest stub. - Introduce
trackExtensionStoreEventhelper and wire it into the IAP checkout lifecycle (initiated/confirmed/successful/failed/cancelled). - Add analytics data attributes to GTC/conditions links in the checkout overview template.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Resources/app/administration/src/vite.config.ts | Reads composer.json and exposes the extension version as a build-time define. |
| src/Resources/app/administration/src/global.types.ts | Declares the new __SWAG_EXTENSION_STORE_VERSION__ global. |
| src/Resources/app/administration/jest.config.js | Provides a stub value for the global in tests. |
| src/Resources/app/administration/src/util/telemetry.ts | New helper wrapping Shopware.Telemetry.track with default event data. |
| src/Resources/app/administration/src/module/.../sw-in-app-purchase-checkout/index.ts | Emits checkout lifecycle events; fixes "foud" typo. |
| src/Resources/app/administration/src/module/.../sw-in-app-purchase-checkout-overview/sw-in-app-purchase-checkout-overview.html.twig | Adds analytics data attributes to GTC/conditions links. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9c95890 to
ebe98f1
Compare
ebe98f1 to
d2145fd
Compare
|
@shopware/product-cc-checkout Hey, could someone please have a look here? :) |
d2145fd to
6e526b7
Compare
No description provided.