Add server-side conversion tracking to Shopware 6 with AxiTrace. Recover lost ad-signal from iOS privacy restrictions and ad blockers in under 10 minutes.
Production ready

AxiTrace for Shopware 6

Plugin v0.6.3 · Shopware 6.6+ / 6.7 · PHP 8.2 - 8.4 · Zero external dependencies · MIT licence · Updated 2026-10-28

A start-to-finish walkthrough: install the Composer plugin, paste your workspace public key, select your Sales Channel, and verify the first server-side purchase event lands in your AxiTrace dashboard. About ten minutes from blank to fully wired.

Download AxiTrace for Shopware 6
Plugin v0.6.3 · ZIP · Shopware 6.6+ / 6.7 compatible · zero external dependencies

Before you start

You will need:

  • An AxiTrace account with at least one workspace. Create one for free (10,000 visits/month, no card required).
  • A Shopware 6 store running Shopware 6.6 or later, PHP 8.2, 8.3, or 8.4.
  • SSH / CLI access to run bin/console commands (and Composer if installing via Composer).
  • About 10 minutes.

Compatibility

RequirementSupported versions
Shopware 6.6.x · 6.7.x and later
PHP 8.2 · 8.3 · 8.4
Storefront themes Any theme that inherits from the default Shopware storefront
Headless / API-first Server-side purchase event supported; browser pixel requires manual SDK init
1

Copy your workspace public key

The public key (always starts with pk_live_) identifies your AxiTrace workspace. The Shopware plugin uses it to authenticate every event it sends.

  1. Sign in at axitrace.com/login with your email and password.
  2. You land on the Workspaces page. Click the workspace name you want to connect to your store.
  3. The workspace opens on Overview. Click Workspace settings in the sidebar, open Tracking & domains and find the Container Information card.
  4. Click the small copy icon next to the Public Key field - you should see a “Copied to clipboard!” toast.
Keep the secret key private

The pk_live_-prefixed public key goes into the Public Key field. The Secret Key (sk_live_) goes only into the optional AxiTrace secret key field, and only if you use profit tracking: the plugin uses it server-to-server and never prints it in your storefront. Never paste the Secret Key anywhere else or share it.

2

Install via Composer (recommended)

Run the following commands from your Shopware root directory:

composer require axitrace/shopware6-tracking && bin/console plugin:refresh && bin/console plugin:install --activate AxitraceShopware6 && bin/console cache:clear
No Messenger or pcntl required

The plugin uses synchronous HTTP dispatch from the state_enter.order_transaction.state.paid event - no consumer process, no pcntl dependency, and no cron job is required for purchase events.

3

Install via ZIP (alternative)

For environments without Composer access, download the ZIP and follow these steps:

  1. Download the ZIP from axitrace.com/downloads/axitrace-shopware-plugin-latest.zip (or use the button at the top of this page).
  2. Verify the SHA-256 checksum before extracting (see SHA-256 verification below).
  3. Extract the archive into custom/plugins/AxitraceShopware6/ on your Shopware server. The directory structure must end up as custom/plugins/AxitraceShopware6/composer.json.
  4. From the Shopware root, run:
    bin/console plugin:refresh && bin/console plugin:install --activate AxitraceShopware6 && bin/console cache:clear
File permissions

After uploading, make sure the custom/plugins/AxitraceShopware6 directory is owned by the web-server user (typically www-data) or whichever user runs the Shopware CLI. Incorrect permissions prevent plugin:install from activating the plugin.

SHA-256 verification

Always verify the ZIP integrity before installing. The SHA-256 hash for the current release is published at:

https://axitrace.com/downloads/axitrace-shopware-plugin-latest.zip.sha256

Verify the downloaded file with:

shasum -a 256 axitrace-shopware-plugin-latest.zip

Compare the output against the contents of axitrace-shopware-plugin-latest.zip.sha256. The two hashes must match exactly before you proceed with extraction. If they differ, delete the file and re-download.

4

Configure the plugin

Once the plugin is active, configure it from Shopware Admin:

  1. Open Extensions → My extensions.
  2. Find AxiTrace Tracking in the list, click the 3-dot menu (⋯), and choose Configure.
  3. Select the Sales Channel you want to configure. To apply settings to all Sales Channels, leave the selector on All Sales Channels.
  4. Paste the workspace public key you copied in Step 1 into the Public Key field. The value must start with pk_live_.
  5. Click Save.
ACL permissions

Saving the Public Key field writes to Shopware’s System Configuration. The admin user must hold the system_config:update capability. If you are using a role-restricted account that cannot save the field, ask a store administrator to grant this capability.

Configuration field reference

FieldRequiredNotes
Public Key Required Starts with pk_live_ (production) or pk_test_ (test workspace).
Sales Channel Optional Leave as All Sales Channels to apply the same key to every channel, or select a specific channel to override per-channel.
Custom tracking domain Optional Your own subdomain (e.g. pixel.yourstore.com) CNAME’d to stat.axitrace.com. The browser SDK then loads from your domain and its cookies are first-party (better persistence on Safari/iOS). Leave empty to use stat.axitrace.com.
Conversion value v0.1.8+ Optional Which order amount is reported as the purchase value to every connected platform (Facebook, Google Ads, GA4, TikTok, Reddit): order total incl. VAT and shipping (default), incl. VAT excl. shipping, excl. VAT incl. shipping, or product revenue only - excl. VAT and shipping. Per Sales Channel; applies to new orders only. The gross VAT and shipping amounts are always sent alongside (GA4 tax/shipping).
Pinterest catalog product ID v0.4.0+ Optional Keep legacy identifiers (default), use the product number, or use the product number in lowercase. Match the exact identifier and case in your Pinterest feed. This setting affects Pinterest only, on both browser and server events. A missing product number falls back to the Shopware product ID.
Cookie consent mode v0.2.0+ Optional Whether tracking waits for the shopper’s consent: Load immediately (default), Wait for consent - browser tracking only, or Wait for consent - browser tracking and server-side order events. Per Sales Channel; applies to orders placed after saving. See Cookie consent.
Consent cookie name v0.2.0+ Optional The cookie your consent tool sets once the visitor accepts marketing/statistics. Leave empty to use Shopware’s own AxiTrace cookie group (axitrace-enabled), or have your CMP call window.axitraceConsent.grant(). See Cookie consent.
Customer groups excluded from tracking v0.6.0+ Optional Customers of the selected groups (for example your B2B group) are not tracked at all: no purchase, refund or browser event reaches AxiTrace or any connected platform. Empty by default. See Excluding customer groups.
Debug mode Optional Verbose SDK console output in the storefront for admin previews. Keep off in production.
5

Place a test order

The fastest way to confirm everything is wired up is a real (or staging) order.

  1. Open your storefront in a fresh incognito window (so you are an anonymous visitor, not a logged-in admin).
  2. Browse a product, add it to the cart, proceed to checkout, and complete an order using a test payment method.
  3. Once the order transaction enters the paid state, the plugin fires a server-side transaction.charge event via the state_enter.order_transaction.state.paid subscriber. The status in the AxiTrace dashboard should show “last event N minutes ago” within 1-2 minutes.
Idempotency

Each purchase event carries a deterministic event_id - a UUID v5 derived from the Shopware order ID and the paid order transaction - plus your human-readable order number. AxiTrace deduplicates by event_id, so if the subscriber fires more than once for the same transaction the purchase is stored and forwarded once. Downstream, Google Ads receives the order number as transactionId (Google deduplicates on it within a conversion action) and Meta receives it as custom_data.order_id, so every purchase can be reconciled one-to-one against your shop admin - and looked up by order number on the Data Feed page.

What gets tracked

The plugin fires the following events. All of them propagate to every ad platform you have connected (Facebook CAPI, TikTok Events API, Google Ads, GA4).

EventWhen it firesClientServer
transaction.charge Order transaction enters paid state - state_enter.order_transaction.state.paid subscriber - ✓
product.view Product detail page loads ✓ -
product.addToCart Item added to cart ✓ -
begin_checkout Checkout confirm page loads (with cart value and currency) ✓ -
add_payment_info Payment method selected / confirmed on the confirm page (v0.1.6+) ✓ -
form.submit (Lead) A storefront form containing an e-mail field is submitted ✓ -
page.view Every page load ✓ -

Client-side events (product.view, product.addToCart, begin_checkout, add_payment_info, form.submit, page.view) are fired by the AxiTrace browser SDK, which the plugin injects via the layout_head_javascript_tracking storefront template block, and forwarded server-side by AxiTrace. The transaction.charge event originates from the PHP subscriber and is not affected by ad blockers or iOS privacy restrictions.

Meta browser events & deduplication

The AxiTrace SDK sends every client-side event to Meta twice on purpose when the Meta Pixel is present on the page: once through the browser pixel (fbq('track', …, {eventID})) and once server-side through the Conversions API - both with the same event_id, so Meta counts each event once. This is Meta’s recommended “redundant setup”. What you need to do:

  1. Load the Meta Pixel base code on your storefront (via your theme or a tag manager) with fbq('init', 'YOUR_PIXEL_ID') only. Do not add your own fbq('track', 'PageView'), ViewContent, AddToCart or InitiateCheckout calls - the SDK fires them for you with the shared event_id. A second, hand-written call would create a browser event without that ID and be double-counted.
  2. If the pixel loads only after cookie consent, that is fine: the SDK bridges to fbq whenever it is available on the page.
  3. Purchase is server-side only. The plugin never fires a browser Purchase, so there is nothing to deduplicate - keep any existing browser Purchase tag off to avoid double-counting.

The SDK reads the Meta browser cookies _fbp / _fbc (creating _fbp and deriving _fbc from an fbclid URL parameter when Meta’s pixel is absent) and sends them with every event; the plugin captures the same cookies at order placement, so the server-side Purchase carries the buyer’s fbp/fbc together with the hashed e-mail, phone, name and address.

This section covers the Shopware-specific settings. For the full picture - the workspace-level forwarding policy, third-party consent platforms such as Cookiebot and Usercentrics, and how to verify a gate actually works - see the dedicated Cookie consent guide.

The AxiTrace workspace switch applies here too v0.3.0+

Workspace settings → Privacy & consent → Respect cookie consent in AxiTrace gates the browser SDK on every Shopware store, including one left on Load immediately and one with no cookie banner at all. The SDK asks AxiTrace for that policy before it boots and stays inert until it is allowed to run. The plugin modes below are an extra condition on top of it: a Sales Channel can tighten the workspace policy, never loosen it. A change made in AxiTrace reaches your storefront within 5 minutes and needs no plugin change.

The plugin registers a dedicated AxiTrace cookie group (axitrace-enabled, vt_vid, vt_sid, vt_uid) in Shopware’s built-in cookie consent manager by decorating the CookieProviderInterface, so the cookies are disclosed to your visitors. By default the plugin gates nothing: the browser SDK loads immediately and the group is informational only, while the AxiTrace workspace switch above still decides whether the SDK may run. If your legal setup requires the plugin to gate as well, set Cookie consent mode to Wait for consent in the plugin configuration (see below) - or keep the default and gate the tag yourself with your consent tool.

Consent modes (v0.2.0+)

The Cookie consent card in the plugin configuration (per Sales Channel) offers three modes:

ModeBrowser SDKServer-side order events
Load immediately (default) loads at once always sent
Wait for consent - browser tracking only waits for consent always sent
Wait for consent - browser tracking and server-side order events waits for consent sent only when the shopper consented

The default keeps the behaviour of all releases before v0.2.0 as far as the plugin is concerned; the AxiTrace workspace switch still applies to the browser in every mode. Changes apply to orders placed after saving. 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.

What the order tells AxiTrace v0.3.0+

Every mode records the shopper’s decision on the order and forwards it to AxiTrace, so the workspace forwarding policy can act on a Shopware purchase as well:

  • An AxiTrace consent cookie is present at order placement: the order is reported as granted.
  • Shopware’s own cookie-preference marker proves the shopper answered the banner and the consent cookie is not there: the order is reported as denied.
  • Neither: the order carries no consent key at all. A store with no banner, a shopper who has not answered yet and an order created outside a storefront session all look identical from the server, so the plugin never invents a refusal; the AxiTrace workspace setting Forward events that do not report a consent state decides what happens to that purchase.

How a consent grant is detected

While gating is enabled, all three grant signals are always active - use whichever your consent tool supports:

  1. Shopware’s own cookie consent manager: accepting the AxiTrace group sets axitrace-enabled=1 and the SDK boots without a reload. Declining removes the group’s cookies.
  2. A consent cookie you configure: set Consent cookie name to the cookie your CMP sets on accept (Acris, Usercentrics, Cookiebot, CCM19, …). A bounded poll picks the cookie up within roughly 500 ms.
  3. The JavaScript API: one line from any CMP’s “on accept” callback:
    window.axitraceConsent && window.axitraceConsent.grant();
    In a Wait for consent mode the SDK is not even loaded until a grant signal arrives - no cookie, no localStorage entry, no network request. window.axitraceConsent.isGranted() reports the current state.

Withdrawal v0.3.0+

A shopper who takes their consent back mid-visit is honoured. In a Wait for consent mode, and on any store whose AxiTrace workspace requires consent, a CookieConfiguration_Update that no longer carries the AxiTrace cookie is enough. In every mode, including Load immediately, one line from your CMP’s withdrawal callback works:

window.axitraceConsent && window.axitraceConsent.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. A later grant starts a new visitor rather than restoring the old one.

Upcoming change in Shopware 6.8

The plugin decorates CookieProviderInterface to register its cookie group. Shopware 6.8 deprecates this decoration pattern in favour of CookieGroupCollectEvent. The migration is planned for a future release; the current decoration keeps working on Shopware 6.6 and 6.7.

Excluding customer groups (B2B) v0.6.0+

When the same storefront also serves customers you do not want in your marketing data - typically B2B buyers who log in to a portal - select their customer group under Configure → Excluded customers → Customer groups excluded from tracking (per Sales Channel, several groups allowed). Customers of those groups are not tracked by AxiTrace at all:

WhatFor an excluded customer
Purchases Not sent. The order never appears in AxiTrace and is never forwarded to Meta, Google Ads, GA4, TikTok, Pinterest or any other connector. The shop log records it at warning with the order number.
Refunds and cancellations Not sent - the purchase never was.
Browsing while logged in The AxiTrace script does not start: no page views, product views, add to cart or checkout events.
  • Which group counts: the one the customer had when the order was placed (stored on the order). Orders without it - placed before v0.6.0, or created in the admin or via the API - are judged by the customer’s current group.
  • Before login: a visitor cannot be recognised until they log in, so pages viewed before logging in are collected as an anonymous visit. They contain no order, so they never create a conversion. If B2B buyers must be invisible from the very first request, run the B2B shop on its own Sales Channel or domain.
  • Page cache: Shopware shares page HTML across visitors, so the decision is never part of the page. Before the script loads, the storefront asks a small uncached endpoint (/axitrace/tracking-status) whether the logged-in customer may be tracked. Only Sales Channels with excluded groups make this request.
  • Other tags: tags you run outside AxiTrace (your own Google Tag Manager container, a pixel added by another extension) are not affected and need their own exclusion.

Multi-Sales-Channel stores

AxiTrace fully supports stores with multiple Sales Channels. Each Sales Channel can have its own Public Key, routing events to a separate AxiTrace workspace. To configure per-channel keys:

  1. Open Extensions → My extensions → AxiTrace Tracking → Configure.
  2. Select a specific Sales Channel from the dropdown.
  3. Paste the public key for that channel’s workspace.
  4. Repeat for each additional Sales Channel.

The plugin resolves the correct public key at runtime based on the active Sales Channel context. Channels without an explicit key inherit the value configured for All Sales Channels.

Key rotation

If your Public Key is compromised or you want to rotate it as a security precaution:

  1. Generate a new key at axitrace.com/admin/workspace/keys.
  2. Open Shopware Admin → Extensions → AxiTrace Tracking → Configure, replace the Public Key field with the new key, and click Save.
  3. The old key continues to work for a 24-hour grace period so in-flight events are not dropped. After 24 hours the old key is revoked.
Rotation does not affect tracking continuity

Because Shopware’s System Configuration is cached, run bin/console cache:clear after saving the new key to ensure all workers pick it up immediately.

Profit tracking (product costs)

Plugin 0.5.0 and later can send each order line's net purchase price, and report refunds and cancellations, so AxiTrace can calculate profit and POAS (Profit on Ad Spend). Set AxiTrace secret key (optional, sk_live_...) in the plugin configuration to switch it on; without it no costs and no refunds are sent. Setup and details: Profit and POAS - Shopware.

Troubleshooting

Events are not arriving in the AxiTrace dashboard

Check the following in order:

  • Confirm the Public Key is saved and starts with pk_live_. Open Extensions → AxiTrace Tracking → Configure and check the field.
  • Verify that your server can reach stat.axitrace.com outbound on port 443: curl -I https://stat.axitrace.com/health.
  • Check Shopware logs at var/log/ for any axitrace error entries.
  • Confirm the plugin is active: bin/console plugin:list | grep AxitraceShopware6.
  • Clear caches and retry: bin/console cache:clear.
No purchase event - test order not appearing in the dashboard

The transaction.charge event fires only when the order transaction transitions into the paid state. Check:

  • The payment status of the test order in Orders → [order] → Payment status. It must reach Paid, not just In progress or Open.
  • When using cash on delivery, manually set the payment status to Paid from the order detail view.
  • Search Shopware logs for any subscriber exceptions: grep -i axitrace var/log/*.log.
Browser SDK is not initialising after cookie consent

Two settings can hold the SDK back: Cookie consent mode in the plugin, and Respect cookie consent in your AxiTrace workspace. With the plugin mode on Load immediately and the workspace switch off, the SDK boots on every page. If either gate is on and the SDK still does not boot after the visitor accepted, check these two things first:

  • Is Consent cookie name configured correctly? It must be the exact cookie your consent tool sets on accept - or left empty to use Shopware’s own AxiTrace group (axitrace-enabled).
  • Does your CMP call window.axitraceConsent.grant() from its “on accept” callback? That is the most reliable wiring for third-party banners.

If neither path is wired, the SDK stays unloaded - that is fail-closed by design. A grant stored in a cookie is picked up on the next pageview even if the current page missed it.

Invalid public key error in the logs
The key must start with pk_live_ (or pk_test_ for a test workspace). The most common cause is a leading or trailing whitespace character pasted along with the key. Re-copy from the AxiTrace admin → Workspace settings → Tracking & domains and paste again. After saving, run bin/console cache:clear so the updated value is loaded.
Do I need to install a separate Facebook Pixel or TikTok Pixel tag?
No. Once the Shopware plugin is sending events to AxiTrace, AxiTrace forwards them to every ad platform you have connected in Connections - Facebook CAPI, TikTok Events API, Google Ads offline conversions, and GA4. One plugin, four platforms.

FAQ

Which Shopware versions are supported?
Shopware 6.6 and later (PHP 8.2, 8.3, 8.4). Distribution via Packagist and direct ZIP download.
Does it work with custom Shopware themes?
Yes. The plugin extends layout_head_javascript_tracking in the storefront meta template via , so it composes with any theme that inherits from Shopware’s default storefront. Fully headless or API-first setups require manual browser SDK initialisation; the server-side purchase event works regardless.
Do I need Messenger or pcntl on my server?
No. The plugin uses synchronous HTTP dispatch from the state_enter.order_transaction.state.paid event - no consumer process, no pcntl dependency, and no cron required for purchase events.
Is it GDPR-compliant out of the box?
The plugin discloses its cookies automatically: an AxiTrace group (including the axitrace-enabled master entry) is registered in Shopware’s built-in cookie consent system. Gating is one switch away, and it lives in AxiTrace: Respect cookie consent (Workspace → Settings) holds the browser SDK on every Sales Channel until the visitor accepts marketing cookies. The plugin’s own Cookie consent mode (v0.2.0+) can tighten that further and, in its strictest mode, also holds the server-side purchase back. Both are off by default. Compliance is ultimately the merchant’s determination as data controller - configure the switch and the mode according to what your legal counsel advises.
Does it support multi-Sales-Channel stores?
Yes. Each Sales Channel has its own Public Key field in the plugin configuration; events are routed to the correct AxiTrace workspace automatically. See the Multi-Sales-Channel section above for setup instructions.
Is the plugin free?
The plugin itself is free and MIT-licensed. Billing is handled entirely by the AxiTrace SaaS at axitrace.com. The free tier covers 10,000 visits/month; paid plans start at $99/month billed annually for higher volume.
Where is the source code?
The plugin is open source on GitHub: github.com/axitrace/axitrace-shopware-plugin. Issues and pull requests are welcome.

Source code & support

The plugin is MIT-licensed and open source:

Issues and pull requests are welcome. For direct support, email info@axitrace.com - most installs are working within 10 minutes and we will personally help if yours is not.