> AI agents: this is one page of nextanalytica's docs. The full index for agents: https://nextanalytica.app/llms.txt

# 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: 2026-12-01

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?

```tsx title="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](/docs/learn/revenue-tracking#what-about-orders-the-browser-never-sees).

## What can you ask your agent?

- "Revenue by channel this month, against last month."
- "Which campaigns brought orders?"

## Next steps

- [Angular analytics](/docs/platforms/angular)
- [Revenue tracking](/docs/learn/revenue-tracking)

Canonical address: https://nextanalytica.app/docs/platforms/angular/orders
