Community Integration
EvoX doesn't have a native ActiveCampaign integration, but you can build a fully functional setup using two approaches: browser-side Site Tracking and server-side Event Tracking via EvoX webhooks.
What is ActiveCampaign?
ActiveCampaign is a marketing automation platform that lets you track customer behaviour, trigger automated email sequences, and segment your audience based on actions they've taken. It's widely used for B2B and B2C ecommerce to power things like abandoned cart emails, re-engagement campaigns, post-purchase flows, and VIP customer segmentation.
The two core features relevant to an EvoX integration are Site Tracking (passive, browser-based page/session data) and Event Tracking (explicit, named actions like "placed order" or "requested quote").
Two integration methods
Method 1 — Site Tracking
A JavaScript snippet added to your storefront. Tracks page views, sessions, and browsing behaviour automatically for known contacts.
Method 2 — Event Tracking
EvoX webhooks push order, quote, and account events to ActiveCampaign's Event API. Gives you named, structured events for automation triggers.
Most setups benefit from using both together — Site Tracking handles passive browsing data, and Event Tracking handles high-intent commercial actions.
Method 1 — Site Tracking (JavaScript)
ActiveCampaign's Site Tracking works by placing their tracking script on your storefront. Once a contact is identified (e.g. after login), their page views are tied to their ActiveCampaign contact record automatically.
Step 1 — Get your tracking code
In ActiveCampaign, go to Settings → Tracking → Site Tracking. Copy your unique tracking snippet — it looks like this:
Example ONLY
<script type="text/javascript">
(function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n;e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)};e[e.visitorGlobalObjectAlias].l=(new Date).getTime();r=t.createElement("script");r.src=o;r.async=true;i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo");
vgo('setAccount', 'YOUR_ACCOUNT_ID');
vgo('setTrackByDefault', true);
vgo('process');
</script>
Add this to your EvoX storefront via Appearance → Theme Options → Footer Block.
Step 2 — Identify logged-in users
Site Tracking only links data to a contact once their email is known. After a customer logs in on EvoX, use the EvoXLayer object to identify them. The EvoXLayer provides user data in a structured JavaScript object when a user is logged in.
Add this script after the ActiveCampaign tracking snippet in your Footer Block:
<script>
// Identify logged-in users for ActiveCampaign Site Tracking
(function() {
try {
var layer = EvoXLayer();
if (layer && layer.user && layer.user.email) {
vgo('setEmail', layer.user.email);
}
} catch(e) {
// User is not logged in — EvoXLayer is empty for guests
}
})();
</script>
This pulls the logged-in user's email from the EvoX session and injects it into the page. From this point on, all their page views are tracked in ActiveCampaign.
Step 3 — Track specific page types (optional)
You can fire custom page-level tags to help ActiveCampaign segment by what was viewed — useful for product category interest, quote pages, or account pages. EvoX adds CSS classes to the <body> element that indicate the page type (e.g. ex-product for product pages):
<script>
(function() {
try {
var layer = EvoXLayer();
if (layer && layer.user && layer.user.email) {
vgo('setEmail', layer.user.email); // Tag product page views
if (document.body.classList.contains('ex-product')) {
vgo('addTag', 'viewed-product');
} // Tag category page views
if (document.body.classList.contains('ex-category')) {
vgo('addTag', 'browsed-category');
}
}
vgo('process');
} catch(e) {}
})();
</script>
Note: Site Tracking only works for contacts who already exist in ActiveCampaign. If the email doesn't match a known contact, the visit is still recorded but won't be attributed until a contact with that email is created.
Method 2 — Event Tracking via EvoX webhooks
EvoX can fire webhooks when key things happen — orders placed, customers created, and more. You can use these to push named events into ActiveCampaign's Event Tracking API, which lets you trigger automations based on specific commercial actions.
For full details on EvoX webhooks, see Event Driven Webhooks — Start Here.
How it works
Configure a webhook in EvoX to fire on an event (e.g. order placed). Go to Developers → Webhooks in the EvoX Admin and create a new webhook. Enable "Include object record" so the full record (including customer email) is included in the payload.
Point it at a small middleware endpoint you control (a serverless function works well).
The middleware validates the webhook signature, transforms the EvoX payload, and forwards it to the ActiveCampaign Event Tracking API.
ActiveCampaign records the event against the contact's email and can trigger automations.
Webhook request validation
Always validate incoming webhooks to ensure they are genuinely from EvoX. Each webhook includes two headers: HTTP_EVOX_SIGNATURE and HTTP_EVOX_TIME. Concatenate the timestamp and JSON payload (timestamp.payload), compute an HMAC-SHA256 hash using your webhook's Signature Key (found in Developers → Webhooks in the Admin), and compare it to the received signature using a constant-time comparison. See Webhook Request Validation for full details.
ActiveCampaign Event API call
The Event Tracking API accepts a simple POST with an event name, email, and optional data:
// POST https://trackcmp.net/event
{
"actid": "YOUR_ACCOUNT_ID",
"key": "YOUR_EVENT_KEY",
"event": "placed-order",
"eventdata": "Order #1234 — $58.00",
"visit": { "email": "customer@example.com" }
}
Your account ID and event key are found in ActiveCampaign under Settings → Tracking → Event Tracking.
Useful EvoX webhook events to map
Below are the EvoX webhook events most useful for ActiveCampaign. For the full list, see Processing Event Driven Webhooks.
EvoX event | Suggested AC event name | Use case |
order.created | placed-order | Post-purchase flow, order confirmation sequence |
order.updated | order-shipped (check status in payload) | Shipping notification, review request trigger. Filter by status field — e.g. status_id 3 = Dispatched, 6 = Cancelled. |
customer.created | account-registered | Welcome sequence, onboarding flow |
user.created | user-registered | New user welcome, invite follow-up |
newsletter.subscribed | newsletter-signup | Newsletter welcome drip, marketing opt-in |
Important notes on EvoX webhook events:
There is no separate
order.cancelledororder.status_changedevent. Cancellations and shipment updates arrive asorder.updated— check thestatus_idfield in the payload to determine what changed.Use
source_user_typeto filter events. For example, only processorder.createdwheresource_user_type = "storefront"to ignore Admin or API-created orders.Store the
event_idand check for duplicates — webhooks are delivered at least once, so the same event could arrive more than once.Webhooks expect an HTTP 200 response. If they receive anything else, EvoX retries up to 3 times, 15 minutes apart.
Example middleware (Node.js)
This example receives an order.created webhook from EvoX, validates the signature, and forwards a "placed-order" event to ActiveCampaign.
// Serverless function / Express route
const crypto = require('crypto');app.post('/webhook/evox-ac', async (req, res) => {
const body = req.body;
const rawBody = JSON.stringify(body); // 1. Validate webhook signature
const sigKey = process.env.EVOX_SIGNATURE_KEY;
const evoxSig = req.headers['http_evox_signature'];
const evoxTime = req.headers['http_evox_time'];
const expected = crypto
.createHmac('sha256', sigKey)
.update(evoxTime + '.' + rawBody)
.digest('hex'); if (!crypto.timingSafeEqual(Buffer.from(evoxSig), Buffer.from(expected))) {
return res.status(401).send('Invalid signature');
} // 2. Filter: only process storefront orders
if (body.source_user_type !== 'storefront') {
return res.sendStatus(200);
} // 3. Map event to ActiveCampaign
const eventMap = {
'order.created': 'placed-order',
'customer.created': 'account-registered',
'user.created': 'user-registered',
}; const acEvent = eventMap[body.event_type];
if (!acEvent) return res.sendStatus(200); // 4. Get contact email from the included object record
const email = body.data?.object?.customer?.email;
if (!email) return res.sendStatus(200); // 5. Build event data string
let eventData = '';
if (body.event_type === 'order.created') {
const obj = body.data.object;
eventData = 'Order #' + obj.id + ' — $' + obj.total;
} // 6. Send to ActiveCampaign Event Tracking API
await fetch('https://trackcmp.net/event', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
actid: process.env.AC_ACCOUNT_ID,
key: process.env.AC_EVENT_KEY,
event: acEvent,
eventdata: eventData,
'visit%5Bemail%5D': email,
}),
}); res.sendStatus(200);
});
Important: The contact must already exist in ActiveCampaign for the event to be attributed. You can create contacts via the ActiveCampaign Contacts API when a new customer registers in EvoX, or rely on a form/import to pre-populate your list.
Creating contacts automatically
Neither Site Tracking nor Event Tracking will work unless the customer is already a contact in ActiveCampaign. To handle this automatically, use the ActiveCampaign Contacts API to create or update a contact whenever a new customer registers in EvoX:
// POST https://YOUR_ACCOUNT.api-us1.com/api/3/contact/sync
{
"contact": {
"email": "customer@example.com",
"firstName": "Jane",
"lastName": "Smith"
}
}
Trigger this from your EvoX customer.created webhook alongside the event tracking call. Use the syncContact endpoint (upsert) to avoid duplicates. The customer's name and email are available in the webhook payload when "Include object record" is enabled on the webhook.
Summary
Feature | Site Tracking | Event Tracking |
What it captures | Page views, sessions | Named actions (orders, registrations) |
How it's triggered | JS snippet on storefront using EvoXLayer | EvoX webhook → middleware → AC API |
Best for | Browse behaviour, re-targeting | Commercial triggers, automations |
Requires contact first? | Yes | Yes |
EvoX support needed? | Script insertion only (Theme Options) | Webhook config + middleware |
Related EvoX documentation:
