Hybrid Mobile Apps Installation
Target Platforms
This quick start guide shows you how to get Heap setup on a hybrid mobile app, such as one implemented on Capacitator or Cordova.
Heap can be implemented on Capacitor or Cordova using Heap's web installation. With a little extra work, you can capture native events like upgrade/install as well.
Recent versions of Cordova (using cordova-ios@6
or newer) offer strong cookie support and work well with Heapās web installation out of the box.
Capacitor 4.6.0 and later provide effective cookie support via the Capacitor Cookies API, but require a single configuration tweak to enable that support and ensure that Heap's web installation works well in your Capacitor app.
In either case, youāll need to follow the Heap web install instructions and youāll also want to make sure that your CSP has the required directives.
Installing Heap will be enough to capture user interactions like pageviews and clicks, but in order to capture native mobile events like install/upgrade, youāll also need to install the relevant native mobile SDKs for Android and iOS.
Note that installing both the Heap web install and the native mobile SDK will result in two separate users and two separate sessions for each app use: one web user and session, and one iOS or Android user and session. In order to consolidate web and native events from the same physical user, youāll need to call Heapās identify API in both the web and native parts of the app with the same value.
You can use Heapās visual labeling feature to define events for your 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 is a handy way to make sure you see only your own events).
Updated 11 months ago