Features
Revenue Tracking
Track sales, purchases, and transactions with full attribution to marketing channels.
What is Revenue Tracking?
Revenue tracking allows you to measure sales, purchases, and transactions on your website with full attribution to traffic sources, UTM campaigns, and landing pages. This helps you understand which marketing channels drive actual revenue.
Full Attribution
See which traffic sources, campaigns, and landing pages generate revenue.
Transaction Details
Track individual items, quantities, and transaction IDs for detailed analysis.
Basic Revenue Tracking
Use the window.invoker.trackRevenue() function to track revenue events:
Simple Revenue Tracking
Track a transaction with basic information
// Track revenue
window.invoker.trackRevenue({
amount: 99.99,
currency: 'USD',
transaction_id: 'ORDER-12345'
});E-commerce Implementation
For e-commerce sites, track detailed transaction information including individual items:
Complete Transaction Tracking
Track order with item details
// On order confirmation page
window.invoker.trackRevenue({
amount: 249.97,
currency: 'USD',
transaction_id: 'ORD-2026-05-11-8429',
items: [
{
name: 'Concert Ticket - VIP',
product_id: 'TKT-VIP-001',
quantity: 2,
price: 99.99
},
{
name: 'Parking Pass',
product_id: 'PARK-001',
quantity: 1,
price: 49.99
}
]
});Implementation Examples
<!-- On your order confirmation page -->
<script>
// Get order data from your backend
const orderData = {
id: '<?php echo $order->id; ?>',
total: <?php echo $order->total; ?>,
currency: '<?php echo $order->currency; ?>',
items: <?php echo json_encode($order->items); ?>
};
// Track revenue
window.invoker.trackRevenue({
amount: orderData.total,
currency: orderData.currency,
transaction_id: orderData.id,
items: orderData.items
});
</script>Revenue Attribution
Revenue is automatically attributed to:
- Traffic Source: Direct, Referral, Social, Search, etc.
- UTM Parameters: utm_source, utm_medium, utm_campaign
- Referrer: Which website sent the visitor
- Landing Page: First page of the session
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in currency units (e.g., 99.99) |
currency | string | No | Currency code (default: "USD") |
transaction_id | string | No | Unique transaction ID to prevent duplicates |
items | array | No | Array of purchased items |
Item Object Properties
| Property | Type | Description |
|---|---|---|
name | string | Product name |
product_id | string | Product SKU or ID |
quantity | number | Quantity purchased |
price | number | Unit price |
Viewing Revenue Data
Revenue data is available in the Revenue section of your dashboard:
- Navigate to your site dashboard
- Click "Revenue" in the sidebar
- View total revenue, transaction count, and average order value
- See revenue by traffic source, UTM campaign, and landing page
Best Practices
- Use Transaction IDs: Always include unique transaction IDs to prevent duplicate tracking if users refresh the confirmation page
- Track on Confirmation Page: Only track revenue on the final order confirmation page after payment is complete
- Include Currency: Always specify currency for international businesses
- Add Item Details: Track individual items for product performance analysis
- Test Thoroughly: Test revenue tracking on a staging environment before deploying to production
Common Use Cases
SaaS Subscriptions
Track subscription sign-ups and renewals:
window.invoker.trackRevenue({
amount: 99.00,
currency: 'USD',
transaction_id: 'SUB-' + subscriptionId,
items: [{
name: 'Pro Plan - Annual',
product_id: 'PLAN-PRO-ANNUAL',
quantity: 1,
price: 99.00
}]
});Event Tickets
Track ticket sales for events:
window.invoker.trackRevenue({
amount: 150.00,
currency: 'USD',
transaction_id: ticketOrderId,
items: [{
name: 'Concert - General Admission',
product_id: 'EVENT-CONCERT-GA',
quantity: 2,
price: 75.00,
event_date: '2026-06-15'
}]
});Digital Products
Track downloads and digital product sales:
window.invoker.trackRevenue({
amount: 29.99,
currency: 'USD',
transaction_id: downloadId,
items: [{
name: 'eBook: Web Analytics Guide',
product_id: 'EBOOK-001',
quantity: 1,
price: 29.99,
format: 'PDF'
}]
});