> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Single Page App (SPA) Support

## Single Page App (SPA) Support

If your website is a Single Page Application (SPA), then by default, MoEngage SDK does not track `MOE_PAGE_VIEWED` event on route change since the whole page does not reload.

In order to get the `MOE_PAGE_VIEWED` event tracked on every route change, pass `enableSPA: true` while [initializing](/developer-guide/web-sdk/web-sdk-integration/basic-integration/web-sdk-integration)

<CodeGroup>
  ```javascript JavaScript lines wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  Moengage = moe({
    app_id: moeAppID,
    debug_logs: 0,
    enableSPA: true
  });
  ```
</CodeGroup>

## Custom Approach

If you want to track `MOE_PAGE_VIEWED` on your own (it may be that the routes are changing even for some functionality and not only on page change, like opening login popup and so on), then please use `Moengage.track_page_view()` whenever you want to track `MOE_PAGE_VIEWED` event.

## Progressive Web Apps (PWA)

Progressive Web Apps (PWAs) are web apps that use service workers, manifests, and other web-platform features in combination with progressive enhancement to give users an experience on par with native apps.

#### Browser Support

As of today, Jan 2023, it is supported in Chrome and Edge Web browsers and all mobile browsers except Opera Mini and Partial support in Safari iOS.\
Ref: ["PWA" | Can I use... Support tables for HTML5, CSS3, etc](https://caniuse.com/?search=PWA)

#### Moengage WebSDK support

All the functionalities will work as they are. As for Web Push, the browser via which the PWA is installed needs to remain open or should be running in the background in order to receive the web push notifications.

Sample Code has been added [here](https://github.com/moengage/webSDK-sample/tree/master/pwa "https://github.com/moengage/webSDK-sample/tree/master/pwa").

For further assistance, please contact your MoEngage Customer Success Manager (CSM) or the Support team.
