Criteo Event Tracking
Overview
Criteo uses the Criteo OneTag (Universal Tag) for tracking user behavior, product interactions, and conversions across retail and ecommerce websites. As a commerce media platform specializing in retargeting and product recommendations, Criteo's tracking focuses on detailed product-level data, catalog integration, and dynamic creative optimization.
Standard Events
Criteo OneTag tracks specific events for commerce retargeting:
Ecommerce Events
- viewHome - Homepage visit
- viewList - Category or product list page
- viewProduct - Product detail page view
- viewBasket - Shopping cart page view
- trackTransaction - Purchase completion
User Events
- viewSearch - Search results page
- setAccount - User login or account identification
- setEmail - Email address capture (hashed)
Lead Generation (for non-retail)
- viewItem - Content or service page view
- viewBasket - Lead form or quote page
- trackTransaction - Lead submission or conversion
Custom Events
Product View Tracking
Track product interactions with detailed attributes:
// Product detail page view
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setEmail", email: "user@example.com", hash_method: "sha256" },
{ event: "setSiteType", type: "d" }, // d=desktop, m=mobile, t=tablet
{ event: "viewProduct", product: "SKU_123" }
);
Category Page Tracking
Track category browsing with product arrays:
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setSiteType", type: "d" },
{
event: "viewList",
product: ["SKU_001", "SKU_002", "SKU_003"] // Products on page
}
);
Custom Parameters
Add custom data for advanced targeting:
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setCustomerId", id: "USER_12345" },
{ event: "setZipcode", zipcode: "94102" },
{
event: "viewProduct",
product: "SKU_123",
// Custom data deduplication ID
deduplication: "1"
}
);
Ecommerce Events
Purchase Tracking
Complete transaction tracking with line items:
<!-- Criteo OneTag (on all pages) -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<!-- Purchase Event (on confirmation page) -->
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setEmail", email: "user@example.com", hash_method: "sha256" },
{ event: "setSiteType", type: deviceType },
{
event: "trackTransaction",
id: "ORDER_12345", // Unique order ID
new_customer: 0, // 1 for new customer, 0 for returning
deduplication: "1", // Prevents duplicate tracking
item: [
{
id: "SKU_123",
price: 99.99,
quantity: 1
},
{
id: "SKU_456",
price: 49.99,
quantity: 2
}
]
}
);
</script>
Shopping Cart Tracking
Track basket contents for abandoned cart retargeting:
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setSiteType", type: "d" },
{
event: "viewBasket",
item: [
{ id: "SKU_123", price: 99.99, quantity: 1 },
{ id: "SKU_456", price: 49.99, quantity: 2 }
]
}
);
Homepage Tracking
Track homepage visits for user journey:
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setSiteType", type: "d" },
{ event: "viewHome" }
);
Conversion Tracking
Implementation Methods
1. Criteo OneTag (Standard)
Universal tag implementation:
<!-- Load Criteo Library (all pages, in <head> or before </body>) -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<!-- Page-Specific Events -->
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
// Homepage
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setSiteType", type: deviceType },
{ event: "viewHome" }
);
// Product Page
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setSiteType", type: deviceType },
{ event: "viewProduct", product: "PRODUCT_ID" }
);
</script>
2. Google Tag Manager
Deploy Criteo OneTag via GTM:
Universal Variable - Device Type:
// GTM Custom JavaScript Variable
function() {
return /iPad/.test(navigator.userAgent) ? "t" :
/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
}
Base Tag - All Pages:
<!-- GTM Custom HTML Tag -->
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ event: "setAccount", account: {{Criteo Account ID}} },
{ event: "setSiteType", type: {{Device Type}} }
);
</script>
Purchase Event Tag:
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ event: "setAccount", account: {{Criteo Account ID}} },
{ event: "setSiteType", type: {{Device Type}} },
{
event: "trackTransaction",
id: {{Transaction ID}},
new_customer: {{Is New Customer}},
deduplication: "1",
item: {{Transaction Items}} // Array from dataLayer
}
);
</script>
3. Server-Side Tracking
For server-to-server conversion tracking:
import requests
import hashlib
def hash_email(email):
return hashlib.sha256(email.lower().strip().encode()).hexdigest()
# Server-side transaction event
event_data = {
"account": YOUR_ACCOUNT_ID,
"events": [{
"event": "trackTransaction",
"id": "ORDER_12345",
"new_customer": 0,
"email": hash_email("customer@example.com"),
"item": [
{"id": "SKU_123", "price": 99.99, "quantity": 1},
{"id": "SKU_456", "price": 49.99, "quantity": 2}
]
}]
}
response = requests.post(
"https://gum.criteo.com/rum",
json=event_data,
headers={"Content-Type": "application/json"}
)
4. Mobile App Integration
Track in-app events via Criteo SDK:
iOS (Swift):
import CriteoPublisherSdk
// Product view
CriteoEvents.trackProductView(productId: "SKU_123")
// Basket view
let basketItems = [
CRTOBasketProduct(productId: "SKU_123", price: 99.99, quantity: 1)
]
CriteoEvents.trackBasketView(basketItems: basketItems)
// Purchase
let purchaseItems = [
CRTOTransactionProduct(productId: "SKU_123", price: 99.99, quantity: 1)
]
CriteoEvents.trackTransaction(id: "ORDER_12345", basketProducts: purchaseItems)
Android (Java):
import com.criteo.publisher.CriteoEvents;
// Product view
CriteoEvents.trackProductView("SKU_123");
// Purchase
List<TransactionProduct> products = new ArrayList<>();
products.add(new TransactionProduct("SKU_123", 99.99, 1));
CriteoEvents.trackTransaction("ORDER_12345", products);
Email Hashing
Implement privacy-safe email tracking:
// SHA256 email hashing
function hashEmail(email) {
return CryptoJS.SHA256(email.toLowerCase().trim()).toString();
}
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{
event: "setEmail",
email: hashEmail("user@example.com"),
hash_method: "sha256"
},
{ event: "setSiteType", type: "d" },
{ event: "viewProduct", product: "SKU_123" }
);
Deduplication
Prevent duplicate conversion tracking:
window.criteo_q.push(
{ event: "setAccount", account: YOUR_ACCOUNT_ID },
{ event: "setSiteType", type: "d" },
{
event: "trackTransaction",
id: "ORDER_12345",
deduplication: "1", // Required for deduplication
item: [{ id: "SKU_123", price: 99.99, quantity: 1 }]
}
);
Offline Conversions
Server-Side Transaction Upload
Upload offline or delayed conversions:
// Node.js server-side implementation
const axios = require('axios');
const offlineConversion = {
account: YOUR_ACCOUNT_ID,
events: [{
event: "trackTransaction",
id: "OFFLINE_ORDER_12345",
timestamp: Date.now(),
email: hashedEmail, // SHA256 hashed
item: [
{ id: "SKU_123", price: 149.99, quantity: 1 }
]
}]
};
await axios.post('https://gum.criteo.com/rum', offlineConversion);
CRM Integration
Connect CRM data for offline attribution:
Implementation Steps:
- Capture Criteo user ID (from Criteo cookie) on website
- Store in CRM with customer record
- Export offline conversions with Criteo user ID or hashed email
- Upload via server-side API
Attribution
Attribution Windows
Criteo uses post-click and post-view attribution:
Default Windows:
- Post-click: 30 days
- Post-view: 7 days
Note: Attribution windows are configured at account level and may vary by advertiser agreement.
Attribution Models
Criteo uses last-touch attribution:
- Last Criteo click gets 100% credit
- If no click, last Criteo impression gets credit (within view window)
Cross-Device Attribution
Automatic cross-device tracking via Criteo's user graph:
- Deterministic matching (logged-in users)
- Probabilistic matching (anonymous users)
- Unified user identification across devices
Product-Level Attribution
Track attribution at SKU level:
- Which products drove conversions
- Product recommendation performance
- Dynamic creative effectiveness by product
Debugging & Validation
Criteo OneTag Checker
Chrome extension for tag validation:
- Install Criteo OneTag Checker extension
- Visit pages with OneTag implementation
- Review:
- Account ID detected
- Events fired
- Product IDs passed
- Email hashing status
- Errors or warnings
Browser Console Verification
Check tag implementation in console:
// View Criteo queue
console.log(window.criteo_q);
// Check if Criteo loaded
if (typeof window.criteo_q !== 'undefined') {
console.log('Criteo OneTag loaded');
} else {
console.error('Criteo OneTag not found');
}
Network Tab Inspection
Verify Criteo calls in browser DevTools:
- Open Network tab
- Filter for "criteo.net"
- Check for:
Tag Status in Criteo Platform
Verify implementation via Criteo dashboard:
- Access Criteo Marketing Solutions platform
- Navigate to Tag Health section
- Review:
- Tag active status
- Events received
- Product catalog match rate
- Implementation errors
Common Issues
Tag not firing:
- Verify account ID is correct
- Check criteo_q queue is defined before events
- Ensure ld.js loads successfully
- Test without ad blockers
Products not matching:
- Verify product IDs match catalog exactly
- Check for leading/trailing spaces
- Confirm SKU format consistency
- Review catalog feed status
Low email match rates:
- Implement email hashing (SHA256)
- Pass email on all applicable pages
- Verify hash_method parameter
- Check email format (lowercase, trimmed)
Best Practices
Implementation
- Install OneTag on all pages for complete user journey
- Use consistent product IDs matching catalog feed
- Implement email hashing for improved match rates
- Set device type dynamically for accurate attribution
- Use deduplication parameter on all transactions
Product Catalog
- Sync product feed daily or in real-time
- Match SKU format exactly between tag and feed
- Include all product attributes (price, availability, categories)
- Update out-of-stock status promptly
- Provide high-quality images for dynamic creative
Data Quality
- Pass accurate prices reflecting current promotions
- Include quantity for all basket and transaction items
- Hash emails using SHA256 before sending
- Use new_customer flag for first-time buyer targeting
- Implement transaction IDs for deduplication
Privacy & Compliance
- Hash all PII (email addresses) before transmission
- Respect user consent for GDPR/CCPA compliance
- Update privacy policy to disclose Criteo tracking
- Use Criteo's opt-out mechanisms
- Follow data retention policies
Optimization
- Leverage dynamic retargeting with product-level data
- Segment audiences by engagement (viewers, carted, converters)
- Exclude recent converters from retargeting
- Use lookalike audiences from high-value customers
- Test different frequency caps to avoid ad fatigue
Creative Strategy
- Use dynamic product ads for personalized recommendations
- Test different creative formats (single product, carousel, grid)
- Include promotions in dynamic creative
- Optimize for mobile placement and sizing
- Refresh creative regularly to combat banner blindness
Catalog Management
- Maintain 95%+ availability for advertised products
- Update pricing in real-time or daily
- Include seasonal products ahead of peak periods
- Remove discontinued items promptly
- Enrich product data with categories and attributes
Performance Monitoring
- Monitor tag health weekly in Criteo platform
- Review product match rates for catalog issues
- Track ROAS by product category and audience
- Analyze conversion lag to optimize attribution windows
- Test incrementality via holdout studies
Testing
- Use Criteo OneTag Checker to verify implementation
- Test all page types (home, category, product, cart, confirmation)
- Verify product IDs match catalog feed
- Check email hashing with test emails
- Generate test transaction and verify in platform
Retargeting Strategy
- Create urgency with limited-time offers
- Show related products to cart abandoners
- Offer incentives for first-time buyers
- Segment by value (high vs low AOV)
- Exclude 30-day converters to reduce waste
Multi-Channel Integration
- Coordinate with search campaigns for full-funnel strategy
- Use Criteo audiences in other platforms
- Combine with email for cohesive messaging
- Align promotions across all channels
- Measure cross-channel impact via attribution tools