Track page transitions within your community

Last updated: October, 2026

Track page transitions within your community to gain valuable insights into how users interact and what they find most engaging. You can capture URL change events when users navigate from one page to another in your community and send them to your analytics.

To listen to URL changes within your community, you can use the following snippet:

document.addEventListener('circle:route-change', e => {
  console.log('circle:route-change', e.detail)
});

The event provides output containing the pathName. For example, if a member navigates to the Welcome space in your community, it would give:

circle:route-change {path: '/welcome'}

For example, if you want to send the page path to Google Analytics, you can use the following code snippet:

document.addEventListener('circle:route-change', e => {
  gtag('config', GA_TRACKING_ID, {
    'page_path': e.detail.path
     // add any other config you would like to pass here
  });
});

To add custom tracking snippets to your community

  1. Click Website in the left sidebar, then select Code snippets.

  2. Add your code snippet in the JavaScript code snippets field.

  3. Click Save changes.