Tracking
SvelteKit revenue tracking
Record orders in a SvelteKit app, from the browser or from your server, so revenue ties to the visit, channel and campaign it came from.
Updated
In SvelteKit, record an order with order({ ref, value, currency }) in the component the confirmation page renders. ref makes a repeated call count once.
How does it look?
src/lib/OrderConfirmed.svelte
<script>
import { onMount } from 'svelte'
import { order } from '@nextanalytica/tag'
export let orderRef
export let total
onMount(() => order({ ref: orderRef, value: total, currency: 'EUR' }))
</script>
<p>Thanks for your order.</p>What about payments confirmed later?
Send them from a server endpoint as order events with a server key: see Revenue tracking.
What can you ask your agent?
- "Revenue by channel this month, against last month."
- "Which campaigns brought orders?"