Skip to content

Page and Product Events

For developers

PAGE_VIEW and PRODUCT_VIEW — the browsing signals that power analytics and recommendations. Business meaning: Event Catalog.

PAGE_VIEW

Method

events.PageView(params)

Runtime payload

{ "name": "PAGE_VIEW", "category": "...", "subCategory": "...", "params": {} }

Parameter details

  • Optional category: page type label (for example Home Page, Category Page)
  • Optional subCategory: second-level grouping (often categoryId)
  • Optional params: route parameters

Runtime source behavior

NavigationObserver.handleScreenChange() builds this event as:

  • category: route page type mapping or 'Unknown Page'
  • subCategory: params.categoryId or empty string
  • params: current route params when present

When to fire

  • first app screen (triggerInitialPageView)
  • each navigation state change (navigationObserver)

Example path in repository

  • example/src/App.tsx (Event Playground: triggerInitialPageView, manual PageView button)
  • example/src/navigation/AppNavigator.tsx (reference stack/tab app; attach navigationObserver on NavigationContainer in your integration—see Quick Start)
  • src/classes/initialize.ts (navigation observer internals)

PRODUCT_VIEW

Method

events.ProductView(params)

Required parameters

  • Required productId

Common optional parameters

  • title, price, oldPrice
  • image, additionalImages
  • brand, category, mainCategory
  • inStock, labels, reviewCount
  • params (custom metadata map)

Runtime transformation

In events.ProductView, every value under params is converted with JSON.stringify before sending.

Practical implication

If you pass objects/arrays under params, they are serialized string values in final payload.

Example path in repository

  • example/src/screens/ProductScreen.tsx sends ProductView in an effect keyed by product identity.
  • src/classes/events.ts applies runtime params stringification.

Emit PRODUCT_VIEW once per genuine detail-page open. Re-render-triggered duplicates will degrade product analytics quality.