Screen Tracking

The mParticle SDKs allow you to track user navigation through your app. Developers can leverage this feature for engagement and funnel optimization, or generically to associate a dictionary or map of attributes to a given screen.

Screen views are a type of event useful for tracking navigation. Some integrations require that you send navigation events as Screen Views. Reference the documentation for your integrations to confirm if you need to send Screen Views.

Many Output services are only interested in the Screen Name, but if you wish, you can include a set of attributes with a Screen View event.

The JavaScript SDK’s logPageView method takes three arguments:

  • Page Name (string)
  • Attributes (object)
  • Custom Flags (object)
    If you do not include any arguments, the SDK will use the value of window.location.pathname as the page name and will include the page title and hostname as attributes. If you have any querystring params in your URL you are likely to quickly exceed unique event name limitations in your Output Services. Always explicitly log a screen name.
//log the page view with details
mParticle.logPageView("Awesome Screen", {modal: "false", background: "green"}, {"Google.Label": "search"});