How does Heap define a pageview?

On the web, a pageview is defined as when the page loads, or when the URL changes.

In native mobile apps, a pageview is defined as when a user navigates to a new screen. Pageview events are captured when a new ViewController is presented to the user in an iOS app, and when a new Activity is presented to the user in an Android app. 

For iOS apps, Heap implements additional logic to define a pageview. ViewControllers are the closest proxy for a “page” on iOS, but not all ViewControllers are pages. For screens with multiple ViewControllers, Heap captures a pageview event for a ViewController if it is the root ViewController for a window.

Additionally, Heap will issue a pageview event for the first screen a user is presented after foregrounding the app.

Pageviews and Single Page Applications (SPAs)

To learn more about Heap and SPAs, see Using Heap With Single Page Application (SPA) Websites.

Last updated