Hybrid Mobile Apps Installation
Target Platforms
This quick start guide shows you how to get Heap set up on a hybrid mobile app, such as one implemented with Capacitor or Cordova.
Heap can be implemented in a Capacitor- or Cordova-powered hybrid mobile app by following the Heap web installation instructions for the web app bundle contained in your Capacitor or Cordova app. If using a Content Security Policy, make sure to add the required directives.
Because certain Capacitor and Cordova configurations can change how cookies behave in ways that prevent Heap from working as expected, we strongly recommend setting the eventPropertiesStorage
and metadataStorage
options to localStorage
as described in the Advanced Configuration section for best results.
Installing Heap will be enough to capture user interactions like pageviews and clicks. You can also take advantage of Heap's client-side APIs to identify users and enrich events from your hybrid mobile app with additional properties like "Hybrid App Name" and "Hybrid App Version". One additional option to consider is using the app version value to detect when the app has been updated between launches and send a custom "App Upgraded" event using Heap's track API.
You can use Heapās visual labeling feature to define events for your hybrid mobile app in a desktop browser using cordova run browser
, ionic serve
, or a similar command depending on your stack. Alternatively, you can define events by viewing your own in-app events in Heapās live data feed. Filtering by IP address (or City, if you have IP address capture turned off) is a handy way to make sure you see only your own events.
Updated 29 days ago