PHPackages                             axitrace/module-tracking - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. axitrace/module-tracking

ActiveMagento2-module[API Development](/categories/api)

axitrace/module-tracking
========================

AxiTrace server-side tracking for Magento 2 / Adobe Commerce — Facebook CAPI, TikTok Events API, Google Ads offline conversions, GA4. Free module; requires an AxiTrace SaaS account at axitrace.com.

v0.1.2(2w ago)011MITPHPPHP ^8.1 || ^8.2 || ^8.3 || ^8.4

Since May 22Pushed 2w agoCompare

[ Source](https://github.com/axitrace/axitrace-magento-plugin)[ Packagist](https://packagist.org/packages/axitrace/module-tracking)[ Docs](https://axitrace.com/integrations/magento)[ RSS](/packages/axitrace-module-tracking/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (7)Versions (4)Used By (1)

AxiTrace for Magento 2 / Adobe Commerce
=======================================

[](#axitrace-for-magento-2--adobe-commerce)

Server-side tracking module for Magento 2 / Adobe Commerce stores. Forwards order, product-view, add-to-cart, and other 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 dedupe against any client-side pixels you may also be running.

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

- **Magento Open Source**: 2.4.6 / 2.4.7 / 2.4.8
- **Adobe Commerce** (on-prem): same versions
- **PHP**: 8.1 / 8.2 / 8.3 / 8.4 (per Magento version matrix)
- **Themes**: Luma (default), Hyva via the separate [`axitrace/module-tracking-hyva`](https://packagist.org/packages/axitrace/module-tracking-hyva) package
- **Not supported**: Adobe Commerce as Cloud Service (ACCS) — uses App Builder, not PHP modules.

---

Install (Composer — recommended)
--------------------------------

[](#install-composer--recommended)

```
composer require axitrace/module-tracking
# Hyva users:
composer require axitrace/module-tracking-hyva

bin/magento module:enable AxiTrace_Tracking Hyva_AxiTraceTracking
bin/magento setup:upgrade
bin/magento cache:clean
```

Install (ZIP — for hosts without Composer access)
-------------------------------------------------

[](#install-zip--for-hosts-without-composer-access)

1. Download the latest ZIP from [axitrace.com/downloads/axitrace-magento-plugin-latest.zip](https://axitrace.com/downloads/axitrace-magento-plugin-latest.zip).
2. Unzip into `app/code/AxiTrace/Tracking` (and `Hyva/AxiTraceTracking` if you need Hyva support).
3. Run the same `module:enable` / `setup:upgrade` / `cache:clean` sequence.

Install (Adobe Commerce Marketplace)
------------------------------------

[](#install-adobe-commerce-marketplace)

The module is distributed primarily via Composer/Packagist and direct ZIP (above) — no Marketplace account is required to install it. An Adobe Commerce Marketplace listing may be published later for discovery; if/when it is, you will also be able to install with the Marketplace authentication keys from [commercemarketplace.adobe.com/customer/accessKeys/](https://commercemarketplace.adobe.com/customer/accessKeys/).

---

Configure (under 5 minutes)
---------------------------

[](#configure-under-5-minutes)

1. **Get your workspace public key**: sign in at [axitrace.com/dashboard](https://axitrace.com/dashboard). Each workspace has a `pk_live_...` / `pk_test_...` key. Copy it.
2. **Open the Magento admin** → **Stores → Configuration → AxiTrace**.
3. **Enable AxiTrace tracking**: set to **Yes**.
4. **Paste your workspace public key**. The field is encrypted at rest.
5. *(Optional)* **Auto-Detect Domain**: if you have a verified custom tracking domain on AxiTrace, click the button to populate it. Otherwise leave blank to use the default (`stat.axitrace.com`).
6. **Test Connection**: the button issues an AJAX request to AxiTrace and shows a coloured status. Green means you're connected.
7. **Save Config**.
8. **Place a test order** in your storefront. Within 1–2 minutes, the Status indicator turns green ("last event N minutes ago") and AxiTrace's dashboard shows the order on the events feed.

What it captures
----------------

[](#what-it-captures)

EventSource`transaction.charge``sales_order_save_after` observer fires on the first state transition into `processing`. Idempotent via `axitrace_event_log` UNIQUE constraint.`view_content`Storefront pixel on PDP (Luma + Hyva)`view_category`Storefront pixel on category page`product.addToCart`Storefront pixel via Magento cart events`page.view`Off by default (high volume)PII (email, phone) is forwarded in **plain text** server-to-server; Facebook's PHP SDK and TikTok's API hash internally per their requirements.

Operations
----------

[](#operations)

### Logs

[](#logs)

All module activity logs to a dedicated file:

```
var/log/axitrace.log

```

Critical events (`->critical()`) also flow through Magento's central log so they are picked up by any monolog-based alert pipeline.

### Idempotency table

[](#idempotency-table)

The module ships its own table `axitrace_event_log` (declared via `etc/db_schema.xml`):

columnpurpose`event_id_hash`UUID v5 from `magento_order:{increment_id}`; UNIQUE — blocks double-fire on async payment auto-invoice flows`status``pending`, `sent`, `failed`, `skipped``attempts`retry counter — capped at 5 by the retry cron`last_error`truncated error from ingestion-apiYou can inspect it via any DB client; nothing in it should ever be PII.

### Cron jobs

[](#cron-jobs)

Two cron jobs are registered (`etc/crontab.xml`):

nameschedulewhat`axitrace_consumer_runner`every minutespawns the `axitrace_order_consumer` for up to 100 messages`axitrace_retry_failed`every 15 minutesre-publishes `axitrace_event_log` rows with `status=failed` and `attempts
