TrackBee DocsTrackBee Docs
Tracking SDKEvents

page_view

A page was shown. Send one on every page, including the first.

trackbee.track('page_view');

Takes no payload. Anything you pass is ignored.

Send one on every page

The SDK sends nothing by itself, so a page view only happens when you ask for one. Send it once the page is shown, and once you know the visitor's consent.

On a storefront that loads a fresh document per page, that is one call per page load. On a single page app, navigating does not reload the document, so send one on every route change as well as the first render.

router.afterEach(() => {
  trackbee.track('page_view');
});

Send it after you pass consent

The page view carries the ad click that brought the visitor in, and it carries whatever consent the SDK knows about at that moment. Call trackbee.consent(...) first, or the event goes out recording a choice the visitor has not made yet.

What travels with it

Everything the SDK collects on its own: the visitor ID, the page URL, referrer and title, the browser and screen, and any ad click IDs or UTM parameters on the URL.

That last part is why the page view matters even though you pass nothing. It is the event that records which ad brought the visitor in.

On this page