Analytics and Reporting
The Airship SDK provides analytics and reporting support.
Our Web SDK comes with analytics support out of the box, and by default, there
are no explicit preferences you need to set in order to enable reporting. The
integration is handled automatically unless you set setDataCollectionEnabled to
true
.
Custom Events
Custom Events are available out of the box and ship with the Web SDK. See the events in our Airship Web SDK Reference for complete details.
Custom Events require Analytics to be enabled, which is the default setting. If you disable analytics, no Custom Events will be recorded.
We provide convenient templates to track common sorts of events. See Custom Event Templates for more information.
Screen Tracking
The Airship SDK gives you the ability to track which screens a user views within the application, how long a user stayed on each screen, and also includes the user’s previous screen. These events then come through Real-Time Data StreamingA service that delivers engagement events in real time via the Data Streaming API or an Airship partner integration., allowing you to see the path a user took through your website or application, or trigger actions based on a user visiting a particular screen.
const sdk = await UA
await sdk.analytics.trackScreen("MainScreen")
Disable Analytics
When the website has disabled analytics in the SDK at the website level or for an individual user, no analytics events will be sent to Airship. Analytics events includes things like sessions, clicks, and custom events.
const sdk = await UA
await sdk.analytics.setEnabled(false)
If it is necessary to disable analytics for an entire install set
disableAnalytics
to true
in both the snippet and push-worker configuration.
disableAnalytics: true
Categories