Tracking
Angular revenue tracking
Record orders in a Angular app, from the browser or from your server, so revenue ties to the visit, channel and campaign it came from.
Updated
In Angular, record an order with order({ ref, value, currency }) when the confirmation component loads. ref makes a repeated call count once.
How does it look?
src/app/order-confirmed.component.ts
import { Component, Input, OnInit } from "@angular/core";
import { order } from "@nextanalytica/tag";
@Component({ selector: "app-order-confirmed", standalone: true, template: `<p>Thanks for your order.</p>` })
export class OrderConfirmedComponent implements OnInit {
@Input({ required: true }) orderRef!: string;
@Input({ required: true }) total!: number;
ngOnInit() {
order({ ref: this.orderRef, value: this.total, currency: "EUR" });
}
}What about payments confirmed later?
Send them from your server 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?"