Intro to Mobile App Tracking

Review the information in this article before getting started with our integration for native mobile applications. Note that this is an add-on feature, not included in all Chartbeat service plans.

Overview

Our native app SDKs are designed to track user engagement with publishers' content in native mobile applications. Our iOS SDK works for apps built in Objective-C and Swift. Our Android SDK works for apps built in Java and Kotlin. Separately, we also support tracking webview-based mobile apps using our standard JavaScript tracker, as well as hybrid applications with a blend of native and webview-based screens (more information below).

How it works

Use our iOS and Android Mobile SDKs to pull native app traffic data into your team's Real-Time Dashboards and see what’s resonating with your app users on a second-to-second basis — which articles, site sections and authors they’re engaging with, what they’re sharing, and more. With our SDKs integrated in your mobile apps, your Chartbeat customer success rep can enable new app traffic filters in the Real-Time Dashboard for your website, enabling your team to view audience data as a whole (app traffic with website traffic together) or drill down into device-specific app audience data with a one-click breakdown of traffic across iOS and Android apps.

Know before you start

Before your app developer team begins integrating our SDKs (instructions included in the following articles of this guide), check out the sections below to understand (A) importance of page metadata consistency across your Chartbeat tracked platforms, (B) how to test your integration in a sandbox dashboard on your Chartbeat with real-time data, and (C) how to track webview-based pages of your app differently from native views.

Page metadata consistency across platforms

The page property metadata configured to send from pages in your mobile app (page path, title, sections, and authors) should match exactly the data we receive from those same pages on your standard website via our JavaScript tag if you intend to include app audience data within the same Chartbeat Site as your website audience data. Before you start adding our code to your apps, we recommend your team reviews and documents how your website is configured to send these data points to Chartbeat, and ensure that your CMS makes this same data available from each corresponding page of your mobile app.

If your app does not contain the same page metadata sent from your website to Chartbeat, for example canonical web URLs like https://www.mysite.com/news/article-12345.html, your team should consider sending app audience data to a separate Site in your Chartbeat account to avoid creating discrepancies within the dashboard for your website traffic data. Consider creating a separate site in your Chartbeat account with a site ID like app.mysite.com or mysite.app to view your app data separately from your website data.

Test your app integration in a sandbox dashboard

We recommend first adding our code in a test app, and using a corresponding test dashboard in your Chartbeat account to view the data before pushing your app to production with your prod site ID. For example, if your production site ID is mysite.com, your test site ID could be test.mysite.app. In the following instruction articles for our Android and iOS SDK, remember when adding our code to your test app to use test site ID and update it to your production site ID only when your team is finished QA'ing the integration for data accuracy.

Note: The test Site will need to be added to your organization's Chartbeat account to see your data in this sandbox dashboard. If you run into any issues adding this sandbox site to your account, contact your Chartbeat support representatives and we will add it for you.

Native vs web-view or hybrid apps

Our native SDK trackers should not be used to track web-view pages of a mobile app in most cases. Rather, our standard JavaScript code should be used to track these pages by including our JS snippet directly within the requested HTML documents to your website.

To ensure that these pageviews are also registered as app views in your Chartbeat data, use our mobileApp setting to track all web-view pageviews in your app:

_sf_async_config.mobileApp = true;

In a hybrid app where a user can navigate between native and web-view screens, be sure to stop our SDK tracker whenever a user moves from a native page to a web-view page, and resume the SDK tracker as the user navigates back to a native screen.

Limitations

Currently, Chartbeat Video tracking is only supported for our standard website tracking integration. Though we offer unique visitor tracking integrations for native apps (and AMP), we cannot provide video engagement analytics for these separate platform integrations at this time.

If you are a current customer and this functionality is important to your team, we'd like to hear from you! Shoot us a note at feedback@chartbeat.com.

Next steps

Instructions to integrate our Android SDK is up next, or skip to iOS SDK integration steps if your team does not have an Android app.

Last updated