Criteo Event Tracking | Blue Frog Docs

Criteo Event Tracking

Complete guide to Criteo OneTag and conversion tracking

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:

  1. Capture Criteo user ID (from Criteo cookie) on website
  2. Store in CRM with customer record
  3. Export offline conversions with Criteo user ID or hashed email
  4. 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:

  1. Install Criteo OneTag Checker extension
  2. Visit pages with OneTag implementation
  3. 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:

  1. Open Network tab
  2. Filter for "criteo.net"
  3. Check for:
    • ld.js script load
    • Pixel requests to gum.criteo.com
    • Event parameters in request

Tag Status in Criteo Platform

Verify implementation via Criteo dashboard:

  1. Access Criteo Marketing Solutions platform
  2. Navigate to Tag Health section
  3. 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

  1. Install OneTag on all pages for complete user journey
  2. Use consistent product IDs matching catalog feed
  3. Implement email hashing for improved match rates
  4. Set device type dynamically for accurate attribution
  5. Use deduplication parameter on all transactions

Product Catalog

  1. Sync product feed daily or in real-time
  2. Match SKU format exactly between tag and feed
  3. Include all product attributes (price, availability, categories)
  4. Update out-of-stock status promptly
  5. Provide high-quality images for dynamic creative

Data Quality

  1. Pass accurate prices reflecting current promotions
  2. Include quantity for all basket and transaction items
  3. Hash emails using SHA256 before sending
  4. Use new_customer flag for first-time buyer targeting
  5. Implement transaction IDs for deduplication

Privacy & Compliance

  1. Hash all PII (email addresses) before transmission
  2. Respect user consent for GDPR/CCPA compliance
  3. Update privacy policy to disclose Criteo tracking
  4. Use Criteo's opt-out mechanisms
  5. Follow data retention policies

Optimization

  1. Leverage dynamic retargeting with product-level data
  2. Segment audiences by engagement (viewers, carted, converters)
  3. Exclude recent converters from retargeting
  4. Use lookalike audiences from high-value customers
  5. Test different frequency caps to avoid ad fatigue

Creative Strategy

  1. Use dynamic product ads for personalized recommendations
  2. Test different creative formats (single product, carousel, grid)
  3. Include promotions in dynamic creative
  4. Optimize for mobile placement and sizing
  5. Refresh creative regularly to combat banner blindness

Catalog Management

  1. Maintain 95%+ availability for advertised products
  2. Update pricing in real-time or daily
  3. Include seasonal products ahead of peak periods
  4. Remove discontinued items promptly
  5. Enrich product data with categories and attributes

Performance Monitoring

  1. Monitor tag health weekly in Criteo platform
  2. Review product match rates for catalog issues
  3. Track ROAS by product category and audience
  4. Analyze conversion lag to optimize attribution windows
  5. Test incrementality via holdout studies

Testing

  1. Use Criteo OneTag Checker to verify implementation
  2. Test all page types (home, category, product, cart, confirmation)
  3. Verify product IDs match catalog feed
  4. Check email hashing with test emails
  5. Generate test transaction and verify in platform

Retargeting Strategy

  1. Create urgency with limited-time offers
  2. Show related products to cart abandoners
  3. Offer incentives for first-time buyers
  4. Segment by value (high vs low AOV)
  5. Exclude 30-day converters to reduce waste

Multi-Channel Integration

  1. Coordinate with search campaigns for full-funnel strategy
  2. Use Criteo audiences in other platforms
  3. Combine with email for cohesive messaging
  4. Align promotions across all channels
  5. Measure cross-channel impact via attribution tools
// SYS.FOOTER