Other eCommerce platforms
This guide provides detailed instructions for integrating any eCommerce platform with AnyTrack to utilize comprehensive tracking and attribution features.
This guide shows you how to integrate any eCommerce platform with AnyTrack and leverage comprehensive tracking and attribution features.
Developer RequiredThese guidelines require implementation by a skilled developer with access to your platform's codebase or API. Do not attempt to implement these guidelines without the appropriate knowledge and skillset.
If you don't have access to development resources, or if your developer is not up to the task, contact us for a referral to a vetted developer.
Requirements
Before starting, you'll need:
- An AnyTrack account with a Personal or Advanced plan
- Access to your platform back-end and API
- Access to your website code
- Recommended: Google Tag Manager
Integration Overview
Key Components
To integrate your eCommerce platform with AnyTrack, you'll need to implement:
1. AnyTrack Tracking Tag
The Tracking Tag must be installed on all pages of your shop to capture events, collect data, and enable attribution.
2. Click ID Parameter
The click_id is a unique identifier that AnyTrack auto-generates for every visitor. This enables AnyTrack to:
- Attribute events to specific visitors
- Identify customers across sessions
- Tie first-party data collected through the customer journey
- Connect conversions to marketing channels and campaigns
3. Customer Data
Collect and send customer attributes such as:
- Email, name, phone number
- Billing and shipping address
- City, state, country, zipcode
4. Product Data
Capture product attributes including:
- Product ID (SKU)
- Product name
- Price and currency
- Quantity
- Brand and category
5. Purchase Activity
Track purchase events with complete order details and transaction data.
Good to knowAll events sent to AnyTrack (via JS or server-side API) are automatically formatted and standardized according to ad pixel, API, and analytics requirements.
Tracking Methods: Client-Side vs Server-Side
AnyTrack supports two complementary tracking methods. Understanding when to use each ensures the highest attribution and data collection quality.
Client-Side Tracking (JavaScript Tag)
Use the AnyTrack Tag to track customer journey events:
RememberThe AnyTrack Tracking tag must be in the
<head>section of the page for Event Snippets to work.
| Event Name | When to Track | Code Example |
|---|---|---|
ViewContent | Customer views a product | AnyTrack('trigger', 'ViewContent'); |
AddToCart | Customer adds a product to cart | AnyTrack('trigger', 'AddToCart'); |
InitiateCheckout | Customer starts checkout | AnyTrack('trigger', 'InitiateCheckout'); |
Purchase | Customer completes purchase | AnyTrack('trigger', 'Purchase'); |
Server-Side Tracking (Webhooks)
Use server-side tracking for events triggered on your back-end:
When to Use Server-Side:
- Purchase events from your order processing system
- Customer creation in your platform
- Newsletter subscription confirmations
How Server-Side Works:
- Visitor adds product to cart → AnyTrack Tag triggers event and generates
click_id - Your cart stores the
click_idparameter - Purchase triggers on your server → Platform calls AnyTrack webhook with purchase data INCLUDING THE
click_id - AnyTrack ingests the data and sends conversion to ad platforms
CriticalThe
click_idparameter generated during website events must be passed back to AnyTrack in the webhook payload. Without theclick_id, AnyTrack cannot attribute the conversion to the correct campaign.
Learn more in the Server-Side Tracking guide.
Implementation Guide
Step 1: Install AnyTrack Tracking Tag
Install the AnyTrack Tag in the <head> section of all pages:
<!-- AnyTrack Tracking Code -->
<script>!function(e,t,n,s,a){(a=t.createElement(n)).async=!0,a.src="https://assets.anytrack.io/:PROPERTYID.js",(t=t.getElementsByTagName(n)[0]).parentNode.insertBefore(a,t),e[s]=e[s]||function(){(e[s].q=e[s].q||[]).push(arguments)}}(window,document,"script","AnyTrack");</script>
<!-- End AnyTrack Tracking Code -->Replace :PROPERTYID with your actual Property ID from the AnyTrack dashboard.
Step 2: Track Customer Journey Events
Implement JavaScript event tracking for customer journey milestones.
ViewContent Event
Track when customers view product pages:
AnyTrack('trigger', 'ViewContent', {
items: [{
id: '20291',
name: 'Sony MDRZX110/BLK ZX Series Stereo Headphones',
price: 19.9,
currency: 'USD',
brand: 'Sony',
quantity: 1
}]
});AddToCart Event
Track when customers add products to their cart:
AnyTrack('trigger', 'AddToCart', {
items: [{
id: '20291',
name: 'Sony MDRZX110/BLK ZX Series Stereo Headphones',
price: 19.9,
currency: 'USD',
brand: 'Sony',
quantity: 1
}]
});InitiateCheckout Event
Track when customers start the checkout process:
AnyTrack('trigger', 'InitiateCheckout', {
cartId: 'cart_abc123',
quantity: 3,
cartSubTotal: 30.00,
currency: 'USD',
orderTotal: 30.00,
items: [{
id: '20291',
name: 'Sony MDRZX110/BLK',
price: 10.00,
currency: 'USD',
brand: 'Sony',
quantity: 1
}, {
id: '20292',
name: 'Beats Headphones',
price: 10.00,
currency: 'USD',
brand: 'Beats',
quantity: 2
}]
});AddPaymentInfo Event
Track when customers enter payment information:
AnyTrack('trigger', 'AddPaymentInfo', {
customerId: 'cus12389',
email: '[email protected]',
fullName: 'John Smith',
paymentMethod: {
type: 'card',
gateway: 'stripe',
provider: 'visa',
digits: '1984',
expiry: '01/24',
zipcode: '91908'
},
billingAddress: {
address: 'Sunset Blvd 1',
city: 'Los Angeles',
zipcode: '91908',
country: 'US'
},
shippingAddress: {
address: 'Via Milano 1',
city: 'Roma',
zipcode: '829876',
country: 'Italy'
},
cartId: 'cart_abc123',
quantity: 3,
cartTotal: 30.00,
currency: 'USD',
tax: 5.00,
shipping: 37.00,
orderTotal: 72.00,
items: [{
id: '20291',
name: 'Sony MDRZX110/BLK',
price: 10.00,
currency: 'USD',
brand: 'Sony',
quantity: 1
}, {
id: '20292',
name: 'Beats Headphones',
price: 10.00,
currency: 'USD',
brand: 'Beats',
quantity: 2
}]
});Step 3: Track Purchase Events (Server-Side)
Purchase events should be sent via server-side tracking from your back-end.
Create Custom Integration
- Navigate to AnyTrack Dashboard → Integrations → Create Custom Integration
- Enter required fields (you can use placeholder values initially)
- Save the integration to generate your postback URL
- Copy the postback URL (format:
https://t1.anytrack.io/:ACCOUNTID/collect/custom-integration) - Remove query parameters from the URL (keep only up to
/custom-integration)
Server-Side Purchase Event
Send purchase data from your server to AnyTrack:
Method 1: Direct HTTP POST
Send a POST request to your postback URL with this JSON payload:
{
"event_name": "Purchase",
"click_id": "f8e3bf8dfba8b51ce3340",
"email": "[email protected]",
"fullName": "John Smith",
"phone": "+1919875666",
"country": "US",
"city": "Los Angeles",
"state": "CA",
"zipcode": "91908",
"address": "Sunset Blvd 1",
"items": [{
"id": "20291",
"name": "Sony MDRZX110/BLK",
"quantity": 1,
"price": 20.00,
"brand": "Sony"
}, {
"id": "49292",
"name": "Beats Headphones",
"quantity": 1,
"price": 100.00,
"brand": "Beats"
}],
"currency": "USD",
"value": 120.00,
"taxPrice": 10.00,
"shippingPrice": 0.00,
"transactionId": "order_24356562534585",
"timestamp": 1689982766
}Method 2: JavaScript Postback (Client-Side)
If you need to send purchase data from the browser:
<script>
AnyTrack('postback', 'https://t1.anytrack.io/:ACCOUNTID/collect/custom-integration?click_id=--CLICK-ID--', {
event_name: "Purchase",
cartId: "cart_abc123",
timestamp: 1689982766,
customerId: "cus12389",
email: "[email protected]",
fullName: "John Smith",
order_id: "oid1763",
transactionId: "order_as8d7f8asd7fa8sdf7", // Required for deduplication
billingAddress: {
address: "Sunset Blvd 1",
city: "Los Angeles",
zipcode: "91908",
country: "US"
},
shippingAddress: {
address: "Via Milano 1",
city: "Roma",
zipcode: "829876",
country: "Italy"
},
quantity: 3,
cartTotal: 30.00,
currency: "USD",
orderTotal: 72.00,
tax: 5.00,
shipping: 37.00,
items: [{
id: "20291",
name: "Sony MDRZX110/BLK",
price: 10.00,
currency: "USD",
brand: "Sony",
quantity: 1
}, {
id: "20292",
name: "Beats Headphones",
price: 10.00,
currency: "USD",
brand: "Beats",
quantity: 2
}]
});
</script>
Important Notes
- Remove attributes you don't have access to (e.g., if you don't have a
cartId, remove it from the payload)- The snippet will not work unless the AnyTrack tracking tag fires first
- If using Google Tag Manager, add sequential trigger ordering to ensure AnyTrack tag fires before the postback
Event Attributes Reference
For complete details on all supported parameters, see the Event Attributes documentation.
Key attribute categories:
- Customer Data - Email, phone, name, location
- Product Data - SKU, price, quantity, brand
- Event Data - Transaction ID, timestamp, currency
Verification
After implementing tracking, verify your integration is working:
1. Check Event Log
Go to AnyTrack Dashboard → Integrations → Your Custom Integration → Event Log
You should see events flowing in real-time with all event parameters.
2. Test Purchase Flow
- Complete a test purchase on your site
- Check the Event Log for the Purchase event
- Verify all parameters are present (email, revenue, products, click_id)
- Confirm event appears in Conversions Report
3. Verify Ad Platform Sync
- Wait 15-20 minutes after test purchase
- Check Facebook Events Manager or Google Ads for the conversion
- Verify Event Match Quality shows high match rate
Alternative Integration Methods
Using Google Tag Manager
If you've already mapped eCommerce dataLayer through Google Tag Manager, you can use these variables with AnyTrack event snippets:
Supported Platforms:
- Shopware
- BigCommerce
- CommerceOne
- Adobe Commerce (Magento)
- Other platforms with GTM dataLayer
Google Tag Manager Setup Guide →
Using Zapier Webhooks
For simpler webhook setup without custom development:
- Create a Zap with your eCommerce platform as the trigger
- Use Webhooks by Zapier as the action
- Set webhook URL:
https://t1.anytrack.io/:ACCOUNTID/collect/custom-integration - Map form fields to AnyTrack event parameters
Common Questions
Common Questions
Next Steps
Connect Ad Platforms: Send conversions to your advertising accounts:
Advanced Tracking:
- UTM Parameters - Campaign attribution setup
- Cross-Domain Tracking - Track across multiple domains
- Event Mapping - Customize event names per platform
Need Help?
Updated about 8 hours ago
