Download the PHP package axitrace/shopware6-tracking without Composer

On this page you can find all versions of the php package axitrace/shopware6-tracking. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shopware6-tracking

AxiTrace for Shopware 6

Server-side tracking plugin for Shopware 6 stores. Forwards order and commerce events to AxiTrace, which relays them to Facebook CAPI, TikTok Events API, Google Ads offline conversions, and GA4 - server-side, with deterministic event IDs that deduplicate against any client-side pixels you may also be running.

The plugin itself is free under the MIT License. AxiTrace bills the SaaS that processes the forwarded events on axitrace.com (Stripe). There is no plugin-level licence check or API call back to AxiTrace for billing purposes.


What is AxiTrace?

AxiTrace is a server-side conversion tracking platform. When a customer completes a purchase in your Shopware store, AxiTrace sends the event directly from your server to advertising platforms (Facebook, TikTok, Google Ads, GA4)

Key benefits:


Requirements

Component Version
Shopware 6.6.8 or newer (< 7.0)
PHP 8.2 / 8.3 / 8.4
Composer 2.x

The plugin targets Shopware 6.6.x (Symfony 7 stack). Shopware 6.5 and below are not supported.


Installation

Composer (recommended)

ZIP (for hosting without Composer access)

  1. Download the latest ZIP from axitrace.com/downloads/axitrace-shopware-plugin-latest.zip.
  2. Extract the contents so that AxitraceShopware6/ lives inside custom/plugins/.
  3. Run:

Configuration

  1. Get your workspace public key: sign in at axitrace.com/dashboard. Each workspace has a pk_live_... / pk_test_... key. Copy it.
  2. In the Shopware Administration go to Extensions → My extensions → AxiTrace Tracking → Configure.
  3. Enable AxiTrace: set to Yes.
  4. Paste your workspace public key into the Public Key field.
  5. (Optional) Enter a custom API base URL if your AxiTrace workspace uses a custom ingestion domain. Leave blank to use the default (api.axitrace.com).
  6. (Optional) Choose the Conversion value basis - which order amount is reported as the purchase value to Facebook, Google Ads, GA4, TikTok and Reddit. Default is the order total incl. VAT and shipping; you can exclude shipping and/or VAT (e.g. Product revenue only - excl. VAT and shipping for margin-based bidding). The setting applies to new orders only; the gross VAT and shipping amounts are always sent alongside for reference.
  7. (Optional) Choose a Pinterest catalog product ID mode when your Pinterest catalog uses Shopware product numbers. The default keeps the existing identifiers. The lowercase option is useful for feeds that normalize product numbers to lowercase. This affects Pinterest only.
  8. (Optional, for profit tracking) Paste your workspace secret key (sk_live_...) into the AxiTrace secret key field. In AxiTrace it is under Settings, in the Container Information card, as Secret Key. With it the plugin sends each order line's net purchase price (the product's purchase price in the order currency; a variant without one uses its parent's) and reports refunds and cancellations, so AxiTrace can show profit and POAS. The key is used server-to-server only and is never placed in the storefront. If AxiTrace rejects the key, purchases are still sent, without costs, and the rejection is logged critical. Leave it empty and the plugin sends neither costs nor refunds.
  9. (Optional) Select Customer groups excluded from tracking, for example your B2B customer group. Customers of those groups are not tracked at all - see Excluding customer groups.
  10. Save the configuration.
  11. Place a test order in your storefront. Within 1-2 minutes the AxiTrace dashboard should show the order on the events feed.

Events Captured

Event Trigger
purchase Shopware OrderStateMachineStateChangeEvent fires when an order transitions to the paid state. Idempotent via the axitrace_failed_event_log unique constraint. Carries the payment method's technical name (data.paymentInfo.method, e.g. payment_paypal), which selects a payment fee rule in AxiTrace profit tracking.
refund Secret key only. A payment transaction enters refunded or refunded_partially. Amounts come from the refunds a payment integration recorded in Shopware, or the whole transaction amount for a full refund. A partial refund with no recorded amount is logged and not sent.
cancellation Secret key only. A paid order enters cancelled, or a paid payment is cancelled. Sends what has not already been refunded. Reduces profit and POAS; ROAS and the purchase already sent to the ad platforms stay unchanged.

The plugin loads the AxiTrace browser SDK and captures ViewContent, AddToCart, InitiateCheckout and AddPaymentInfo. Product and cart data come from Shopware's server-authoritative storefront context. Purchase remains server-only and is sent when the order transaction becomes paid.

PII (email, phone) is forwarded in plain text server-to-server; AxiTrace hashes it internally per each platform's requirements before transmission. Browser checkout identity is returned only after an explicit consent grant and is never embedded in cacheable storefront HTML.


Cookie Consent

Where the decision is made: your AxiTrace workspace (Workspace -> Domains -> Cookie consent -> Respect cookie consent). It is off by default. While it is on, the browser SDK writes nothing and sends nothing until the shopper allows marketing cookies - on every Sales Channel, including one left on Load immediately and a store with no cookie banner at all. The SDK asks AxiTrace for that policy before it boots, so a change made in the admin panel reaches the storefront within 5 minutes and needs no plugin change.

The plugin's Cookie consent mode setting (per Sales Channel, Extensions -> My extensions -> AxiTrace Tracking -> Configure -> Cookie consent) is an extra condition on top of the workspace policy: a Sales Channel can tighten it, never loosen it.

The three modes

Mode Browser SDK Server-side order events
Load immediately (default) loads at once; the AxiTrace workspace policy still applies always sent
Wait for consent - browser tracking only not loaded until a grant signal always sent
Wait for consent - browser tracking and server-side order events not loaded until a grant signal sent only when the shopper consented

The default keeps the plugin's own behaviour from every release before 0.2.0: the plugin gates nothing until you opt in. Changes apply to orders placed after saving.

How a consent grant is detected (all paths always active while gating is on)

  1. Shopware's own cookie consent manager - the plugin registers an axitrace-enabled master entry in its AxiTrace cookie group; accepting the group sets axitrace-enabled=1 and boots the SDK without a reload.
  2. Any consent cookie you configure - enter the cookie name your CMP sets on accept (Acris, Usercentrics, Cookiebot, CCM19, …) under Consent cookie name. A bounded poll picks the cookie up within ~500 ms.
  3. The JavaScript API - the universal escape hatch. One line from any CMP's "on accept" callback:

With both workspace consent checks and plugin gating off, customer enrichment does not require a consent cookie (plugin 0.4.2 and SDK 0.21.2).

When consent checks are enabled, the JavaScript call alone allows tracking, but it does not expose checkout customer fields. Email and address match fields are returned only when the configured consent cookie is also present and valid. CMP integrations that need those fields must set that cookie as part of their accept action before calling grant().

In a Wait for consent mode the SDK is not loaded at all until a grant signal arrives - no cookie, no localStorage entry, no network request. window.axitraceConsent.isGranted() reports the current state.

Withdrawal

A shopper may take their consent back on the same page, and that is honoured in every mode, Load immediately included. Either Shopware's own CookieConfiguration_Update stops carrying the AxiTrace cookie, or your CMP calls one line from its withdrawal callback:

revoke() stops the SDK and deletes the identifiers the grant allowed it to write (vt_vid, vt_sid, vt_uid, their storage mirrors and the queued events). Cookies belonging to other tools, such as Meta's _fbp and _fbc, are left alone - they are not ours to delete. A later grant starts a new visitor rather than restoring the previous one.

What the order reports

Every mode records the shopper's decision on the order and sends it to AxiTrace (data.consent), so the workspace forwarding policy can act on a Shopware purchase too:

Browser events carry the same decision as meta.consent once the SDK is running.

Fail-closed for orders without a storefront session

In the strictest mode, orders created without a storefront session (admin orders, imports, API orders) carry no consent record and are therefore not forwarded - an order with no recorded consent decision is not treated as granted. Every such skip is logged at warning. If you regularly create orders outside the storefront, use Wait for consent - browser tracking only instead.

Full guide

Third-party consent platforms (Cookiebot, Usercentrics, CCM19, …), the workspace-level forwarding policy, and how to verify a gate actually works are covered in axitrace.com/docs/cookie-consent.


Excluding customer groups (e.g. B2B)

Configure -> Excluded customers -> Customer groups excluded from tracking (per Sales Channel, plugin 0.6.0+). Customers of the selected groups are not tracked by AxiTrace at all:

Path What happens for an excluded customer
Orders The purchase is not sent to AxiTrace, so it never appears in AxiTrace and never reaches Meta, Google Ads, GA4 or any other connector. Logged at warning with the order number; never queued for a retry.
Refunds and cancellations Not sent (the purchase never was).
Browsing while logged in The storefront asks /axitrace/tracking-status before it loads the AxiTrace SDK and does not load it for an excluded customer: no page views, product views, add to cart or checkout events.

Rules:


Troubleshooting

Symptom Likely cause Fix
No events appear in the AxiTrace dashboard after a test order Plugin not enabled, or wrong public key Check Extensions → My extensions → AxiTrace → Configure; verify the key starts with pk_live_ or pk_test_
Orders appear but Facebook/TikTok show no conversions Platform connection not configured in AxiTrace Log in to axitrace.com/dashboard and verify your Facebook/TikTok destination is active
Connection refused or cURL error in var/log/axitrace.log Outbound HTTPS blocked from your host Allowlist api.axitrace.com:443 on your firewall / WAF
Upper-funnel events duplicated in the ad platform The browser pixel and AxiTrace server forwarding use different integrations Let the AxiTrace SDK coordinate both legs; it sends the same per-event ID to the browser tag and the ingestion API. Shopware Purchase is server-only and fires on the paid transition.
Plugin not visible after install Shopware plugin cache not cleared bin/console plugin:refresh && bin/console cache:clear

Support


License

MIT - see LICENSE.md.


All versions of shopware6-tracking with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3 || ^8.4
shopware/core Version >=6.6.8 <7.0.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package axitrace/shopware6-tracking contains the following files

Loading the files please wait ...