Analytics
/

Router Utils

Utility library for single page app routing


Utilities for listening to route changes in SPA.

Basic Usage

import onRouteChange from '@analytics/router-utils'
import analytics from './analytics'

onRouteChange((newRoutePath) => {
  console.log('new route path', newRoutePath)
  // trigger page view
  analytics.page()
})

See more utils on getanalytics.io