Tracking Variables

Pass custom tracking data with orders to measure campaign performance, attribution, and conversion metrics across your marketing channels.

Tracking variables allow you to pass custom data with orders for attribution, analytics, and reporting purposes. You can include up to 20 tracking variables per order to capture any data points relevant to your business.

Common use cases include:

  • UTM parameters for marketing attribution (source, medium, campaign)
  • Affiliate IDs for commission tracking
  • A/B test variants for conversion analysis
  • Custom business data like sales rep names, promo codes, and customer segments

Passing Tracking Variables

Include tracking variables when creating or processing orders by passing tracking1, tracking2, tracking3, etc. up to tracking20:

curl -X "POST" "https://api.vrio.app/orders" \
-H 'X-Api-Key: YOUR_VRIO_API_KEY' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"connection_id": 1,
"campaign_id": 1,
"email": "[email protected]",
"tracking1": "facebook",
"tracking2": "cpc",
"tracking3": "summer_sale",
"tracking4": "AFF123",
"offers": [
  "{\\"offer_id\\":1, \\"order_offer_quantity\\": 1}"
],
"ship_fname": "John",
"ship_lname": "Doe",
"ship_address1": "123 Main St",
"ship_city": "New York",
"ship_state": "NY",
"ship_country": "US",
"ship_zipcode": "10001",
"same_address": true,
"card_type_id": 1,
"payment_method_id": 1,
"card_number": "4111111111111111",
"card_exp_month": 12,
"card_exp_year": 2025,
"card_cvv": 123,
"action": "process"
}'

Tracking Variable Limits

  • Maximum variables per order: 20 (tracking1 through tracking20)
  • Character limits:
    • tracking1 - tracking10: 255 characters max
    • tracking11 - tracking20: 100 characters max
  • Value format: String, supports alphanumeric and special characters
  • Best practice: Use consistent tracking slots across orders for easier reporting (e.g., always use tracking1 for UTM source)

Naming Tracking Variables

Before using tracking variables, you can define custom names for them in SettingsConfigurationSearchTracking Names. This allows you to give descriptive labels to each tracking variable slot (e.g., "UTM Source" for tracking1, "Campaign Name" for tracking3) which makes them easier to identify in reports and customer records.

Note: Custom names are for display and readability only. When passing tracking data via API, you must always use tracking1 through tracking20 as the field names.



Accessing Tracking Data

Customer Records

Tracking variables are visible on customer records in the Acquisition section:

  1. Navigate to a customer record
  2. Scroll to the Acquisition section
  3. View all tracking variables with their custom names (if configured) and values. This will show the tracking variables for the first order associated with the customer.

Order Records

You can also view tracking variables on order records to see attribution data for specific purchases.


Reports & Analytics

Tracking variables are available as dimensions in the Analytics report builder:

  1. Navigate to Analytics

  2. When building a report, click Add Dimension

  3. Select from tracking variables on the report.

  4. Use tracking data to segment and analyze performance across campaigns, sources, and custom attributes


Learn how to build reports with tracking data →

Search & Filtering

Use tracking variables to search and filter customers:

  1. Navigate to SearchCustomers
  2. Apply filters based on tracking variable values


Postback Pixels

Tracking variables are available in all postback pixel URLs across campaign, offer, and transaction levels. You can include tracking data using {tracking1} through {tracking20} merge tags in your postback URLs to pass attribution information to external systems.

Campaign Level Conditional Postbacks: At the campaign level specifically, you can configure conditional postback pixels that fire based on tracking variable values. This allows you to send different conversion data to different systems based on traffic source, affiliate partner, or other tracking criteria.

Use Cases:

  • Send affiliate-specific conversion data to different affiliate networks
  • Route conversion data based on traffic source (Google Ads, Facebook, etc.)
  • Trigger different postbacks for A/B test variants
  • Include tracking attribution in all postback notifications

Example Postback URL:

https://affiliate-network.com/postback?order_id={order_id}&amount={ordertotal}&source={tracking1}&campaign={tracking2}

Learn more about postback pixels →

Via API

Retrieve tracking variables when fetching order or customer data:

GET /orders/{order_id}

Response includes tracking fields:

{
  "order_id": 123456,
  "tracking1": "facebook",
  "tracking2": "cpc",
  "tracking3": "summer_sale",
  ...
}

Best Practices

Define tracking names first Before passing tracking data, configure custom names in Settings → Tracking Names to make your data easier to understand and report on.

Use consistent tracking slots Standardize which tracking variable numbers you use for specific data types across all orders (e.g., always use tracking1 for UTM source, tracking2 for UTM medium, etc.)

Capture data at checkout Pass tracking variables from URL parameters or cookies when creating orders to ensure accurate attribution

Document your tracking schema Maintain documentation of which tracking variable slots you use and their purposes

Avoid sensitive data Don't store PII or sensitive information in tracking variables

Plan for reporting Consider what metrics you'll want to analyze when deciding which tracking variables to implement


Related Resources