Tracking revenue

Revenue tracking allows you to measure the monetary value of conversions and goals. This is essential for understanding the ROI of your marketing campaigns and optimizing your conversion funnel.

Basic Revenue Tracking

To track revenue with a conversion, add the revenue parameter to your conversion event:

window._pgnt.push({
    kind: "conversion",
    label: "purchase",
    revenue: 999
});

Configuring Custom Goals

Before you can track revenue with custom goals, you need to configure them in your Pagent dashboard:

1. Create Goals in Tracking Section

  1. Navigate to the Tracking section in your Pagent dashboard
  2. Click “Add Goal”.
  3. Enter a unique label for your goal (e.g., purchase, subscription_monthly, lead_enterprise)
  4. Configure any additional settings for the goal
  5. Save the goal configuration

2. Add Goals to Tests

After creating goals in the Tracking section, you need to add them to each test where you want to track revenue:

  1. Open your test in the Editor
  2. Under the settings icon, open Manage conversion goals.
  3. Add your newly created goal to the test.

Important: Custom goals must be configured in the Tracking section before they can be used in tests. The label parameter in your tracking code must exactly match the goal label you configured.

Revenue Format

Important: Revenue values must be provided as integers representing cents, not dollars.

  • Correct: revenue: 999 (represents $9.99)
  • Incorrect: revenue: 9.99 (will be treated as 9 cents)

Examples

Dollar AmountRevenue Value
$1.00100
$9.99999
$25.502550
$100.0010000

Common Use Cases

E-commerce Purchases

Track completed purchases with their value:

// When a purchase is completed
window._pgnt.push({
    kind: "conversion",
    label: "purchase",
    revenue: 2499  // $24.99
});

Subscription Signups

Track subscription revenue:

// Monthly subscription
window._pgnt.push({
    kind: "conversion",
    label: "subscription_monthly",
    revenue: 2900  // $29.00
});

// Annual subscription
window._pgnt.push({
    kind: "conversion",
    label: "subscription_annual",
    revenue: 29900  // $299.00
});

Lead Generation

Track high-value leads:

// Enterprise lead
window._pgnt.push({
    kind: "conversion",
    label: "enterprise_lead",
    revenue: 5000  // $50.00 estimated value
});

Service Bookings

Track appointment or service bookings:

// Consultation booking
window._pgnt.push({
    kind: "conversion",
    label: "consultation_booking",
    revenue: 15000  // $150.00
});

Dynamic Revenue Values

You can calculate revenue dynamically based on your application’s data:

// Calculate revenue from cart total
const cartTotal = calculateCartTotal(); // Returns dollars
const revenueInCents = Math.round(cartTotal * 100);

window._pgnt.push({
    kind: "conversion",
    label: "purchase",
    revenue: revenueInCents
});

Best Practices

  1. Always use cents: Convert dollar amounts to cents before sending
  2. Be consistent: Use the same revenue format across all your tracking
  3. Track meaningful conversions: Only track revenue for actual monetary transactions
  4. Validate data: Ensure revenue values are positive numbers
  5. Test thoroughly: Verify revenue tracking in your analytics dashboard

Troubleshooting

Revenue Not Showing

  • Check that you’re using integers (cents) not decimals
  • Verify the conversion event is being sent correctly
  • Ensure the goal is properly configured in your dashboard

Incorrect Revenue Values

  • Double-check your conversion from dollars to cents
  • Verify the label parameter is spelled correctly
  • Test with a small value first to confirm it’s working