Skip to content

Latest commit

 

History

History
175 lines (124 loc) · 6.73 KB

File metadata and controls

175 lines (124 loc) · 6.73 KB

usertrax for Shopware 6

Official Shopware 6 plugin for usertrax — cookieless conversion tracking, channel attribution, offline conversion export, A/B testing, and an optional feedback widget.

Built by Splintnet. Compatible with Shopware 6.7.


What it does

The plugin wires your storefront into the usertrax tracker so you get a clean ecommerce funnel without cookies or a consent banner for usertrax itself.

Capability Details
Tracker script Loads cvs.js in <head> (page views are automatic)
Ecommerce funnel GA4-shaped events from product view through purchase
Feedback widget Optional feedback.js (enabled by default)
Identity identify + user_data on the order confirmation page
Attribution Click IDs / UTMs are handled by the tracker (advanced tracking)

usertrax can then export conversions back to ad platforms — see Conversion export overview, Google Ads, Meta Ads, Microsoft Ads, LinkedIn Ads.


Requirements

  • Shopware 6.7 (shopware/core, shopware/storefront)
  • A usertrax domain + API key from the dashboard (quick start)
  • Feedback widget: Pro plan or higher, and Feedback enabled for the domain in the dashboard (feedback docs)

Installation

Via Composer (recommended)

composer require splintnet/usertrax-shopware
bin/console plugin:refresh
bin/console plugin:install Usertrax --activate
bin/build-storefront.sh
bin/console cache:clear

Manual / path install

Copy this repository into custom/plugins/Usertrax, then run the same plugin:refresh / plugin:install / build-storefront steps as above.

Then open Admin → Extensions → usertrax → Configuration and set your API key from the usertrax dashboard.


Configuration

Namespace: Usertrax.config.*
Plugin class: Splintnet\Usertrax\Usertrax

Key Description Default
active Load tracker + fire ecommerce events true
apiKey Domain data-key from the usertrax dashboard your domain key
feedbackWidget Load feedback.js true
debugMode Sets usertraxConfig.debugMode (console logging) false

Tracking and feedback can be toggled independently; both share the same API key.


Ecommerce events

Events use the GA4 ecommerce shape documented in Advanced Tracking. The plugin also sends compatibility fields (total, id) expected by the current tracker contract.

Event When it fires
view_item Product detail page
add_to_cart Add-to-cart form submit
remove_from_cart Line-item remove
view_cart Cart page + offcanvas cart
begin_checkout Checkout CTA (cart / offcanvas)
add_shipping_info Confirm page (shipping methods present)
add_payment_info Confirm page
purchase Order finish / thank-you page

item_id prefers the product number (SKU) so Meta/Google catalog matching works. See Meta Ads export and Advanced Tracking → Meta forwarding.

Example purchase payload

usertrax.push({
  event: "purchase",
  event_id: "purchase_10001",
  id: "purchase_10001",       // dedupe / CAPI eventID
  currency: "EUR",
  value: 99.99,
  total: 99.99,               // tracker contract
  transaction_id: "10001",    // order number
  tax: 15.96,
  shipping: 5.90,
  items: [{
    item_id: "SKU-123",
    item_name: "Climate tree …",
    item_brand: "von Ehren",
    item_category: "Trees",
    price: 47.05,
    quantity: 2,
    index: 0
  }],
  user_data: {
    email: "customer@example.com",
    customer_id: "…",
    first_name: "…",
    last_name: "…"
  }
});

On the finish page the plugin also calls usertrax.identify() so later conversions and the feedback widget share the same person context.


How scripts are loaded

When enabled, the plugin extends Shopware’s analytics head template and injects:

  1. https://usertrax.io/cvs.js — conversion tracker (quick start)
  2. https://usertrax.io/feedback.js — feedback widget (feedback)

Both use the same data-key. Page views and session/attribution are handled inside the tracker; this plugin focuses on ecommerce conversions.

For first-party / proxy setups, see the proxy guides.


Ads forwarding (tracker-side)

With usertraxConfig.ga4 / tagManager / facebook (or legacy ads: true), the tracker can forward events to GA4, GTM, and Meta — including standard Meta events (Purchase, AddToCart, …), items[], and eventID for Pixel ↔ CAPI deduplication.

Details: Advanced Tracking → Ads forwarding.

Related platform docs:


Development notes

  • Storefront JS entry: src/Resources/app/storefront/src/main.js
  • Ecommerce plugin: src/Resources/app/storefront/src/plugin/usertrax/
  • After JS changes in a Shopware project: bin/build-storefront.sh
  • Repository: splintnet/usertrax-shopware

Documentation

Topic Link
Documentation home https://usertrax.io/en/docs/
Quick start https://usertrax.io/en/docs/getting-started/quick-start/
Advanced tracking https://usertrax.io/en/docs/features/advanced-tracking/
Feedback widget https://usertrax.io/en/docs/features/feedback/
A/B testing https://usertrax.io/en/docs/features/ab-testing/
Conversion exports https://usertrax.io/en/docs/exports/
Product website https://usertrax.io

License

Proprietary — Splintnet / usertrax.