When debug mode is enabled, exceptions will be thrown when the tracker is not started properly.
For iOS, you can switch between logging tiers to see output from the tracker to help you with integration. There are four logging tiers:
verbose: output everything
debug: output debug related info, warning and error
warning: output warnings and errors
error: output errors (see property
All log output has the format
[CBTracker sharedTracker].debugMode = true;[CBTracker sharedTracker].logLevel = CBTrackerLogLevelVerbose;i
CBTracker.shared().debugMode = trueCBTracker.shared().logLevel = .verbose
com.chartbeat.androidsdk.DEBUG to true before your first call to
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.
Once you've added our code to your test app and added the test Site to your Chartbeat account, you can now watch real-time traffic data populate your test dashboard as your team interacts with different pages of your test app.
To view your test dashboard:
Sign in to your Chartbeat account.
From the Sites page, find your test Site and hover over the site entry to reveal the 'Real-Time' button.
Click the 'Real-Time' button.
Requests to ping.chartbeat.net are made from all pages of the app where our SDK is implemented and the
trackView function is called
viewId (page path) values are sent from every tracked view within your app
viewId values should be consistent for each unique screen across your iOS and Android apps, and you can check the value being sent to our servers in the "p=" parameter included in the outbound heartbeat requests to ping.chartbeat.net
viewId values should also match the canonical web URLs we receive from corresponding pages on your website if you intend to view app and web traffic data in the same dashboard
For views unique to the app without corresponding pages on your website, we recommend passing placeholder web URLs such as
Each in-app page with a corresponding page on your website should also pass section, author, and title values which match exactly the sections, authors and titles we receive from the webpage
For the Android SDK,
userInteracted calls should be made each time a visitor touches the screen
In the Cheartbeat requests to ping.chartbeat.net, the following query string parameters can be reviewed to see how data is being passed from each page via your team's code implementation:
The domain (site ID) value set in your SDK implementation
The viewId (page path) value your app is sending for the current view
The section value(s) for the current view
The author value(s) for the current view
Page title for the current view
Total engaged seconds so far for each page session
The p, g0, g1 & i parameters should update with new values as you navigate to new views within the app, containing the unique page path, section, author, and title for each tracked view.
Mobile App SDKs ✅