PRE-REQUISITES

Depending on your jurisdiction or the jurisdiction of your app’s users, you may be required to comply with data protection and privacy laws such as GDPR. Please ensure you acquire all necessary consents before recording user data and are compliant with the relevant legislation.

You can add analytics to your Fliplet app in a few ways.

  • Fliplet provides you with some key metrics in Fliplet Studio’s Publish tab (such as number of users and screen views)
  • You can use third party analytics dashboards such as Google Analytics (which now incorporates Firebase analytics)
  • You can create your own custom event trackers with Fliplet and include these in the Fliplet Studio analytics

Adding Fliplet Analytics to your app

You can activate Fliplet Analytics from the ‘Publish’ tab in Fliplet Studio. You first need to publish your app (via a URL or via a public app store). Once this is done, new options for managing your app appear at the top of the page. One of these is “App Analytics”. Click this and you’ll be shown the Fliplet Analytics for your app.

Adding Google Analytics to your app

To add Google Analytics to your app please see here.

Adding custom Fliplet analytics to your app

If you’d like to create custom analytics (on top of Fliplet’s standard analytics), you can do this by creating custom events that are tracked in your app. The analytics of these custom events can then be viewed alongside the standard Fliplet Analytics (they will be listed alongside the other Fliplet Analytics events. You can search, sort and export these if you need).

To record a custom event you need to use the following code. Here we’re tracking an event and giving it the name of “My custom event”

Fliplet.App.Analytics.track('event', {
    label: 'My custom event'
 });

Taking this example a step further, you could record an event every time a user clicked a certain button. The code below listens for any clicks on the button with a class name of ‘.news-item’ (to learn how to add class names use this link). When a click is detected, an event is created in the analytics with the name of ‘Click on News Item’. An event will be registered every time the button is clicked.

$('.news-item').on('click', function () {
  // Track an event
  Fliplet.App.Analytics.track('event', {
    label: 'Click on News Item'
  });
});

Was this article helpful?
YesNo