Client-Side Revenue Tracking
Track revenue events directly from your website's frontend using JavaScript. This method is quick, although it may be less reliable than server-side tracking due to potential ad-blockers or browser restrictions.
Use the versatailor
function to track payment events. Simply call it when a purchase is completed:
// Track a payment event
window?.versatailor("payment", {
email: "customer@example.com",
amnt: 2999, // Amount in cents ($29.99)
});
Required Parameters
Customer's email address. Use "dummy@example.com"
as a placeholder if you prefer not to include real emails.
amnt
Payment amount in cents (not dollars). For example: $29.99 = 2999, $5.00 = 500
Implementation Examples
E-commerce Checkout
// After successful payment
function onPaymentSuccess(paymentData) {
window?.versatailor("payment", {
email: paymentData.customerEmail,
amnt: paymentData.totalAmountInCents,
});
// Redirect to success page
window.location.href = "/thank-you";
}
⚠️ Important Notes
- Always provide amounts in cents, not dollars
- The event type must be exactly
"payment"
- Both email and amnt parameters are required
- Call this function only after payment is confirmed
Troubleshooting
Revenue not appearing?
- Please contact us at support@versatailor.com
Need help? Contact us for assistance.
Suggest features? We'd love your feedback