Analytics Integration Guide

Step-by-step instructions to get up and running with any 3rd party analytics service.

Overview

The Nami SDK offers support for custom 3rd-party analytics integrations that will work with all your favorite analytics providers including:

  • Adobe Analytics
  • Amplitude
  • Ensighten Pulse
  • Google Analytics / Firebase
  • Heap
  • KISSmetrics
  • Mixpanel
  • mParticle
  • and any others!

Paywall Interaction Events

When you launch a campaign to show users a paywall, Nami provides a wide variety of insights that you can listen for and send to your analytics service.

It takes just a few simple steps to listen for these events, and send metadata to your analytics service.

  1. Register for paywallActionHandler callbacks from NamiCampaignManager.launch.
  1. Add analytics calls for each type of Nami action you wish to track.
  2. Append any Nami provided metadata to each of your analytics calls.

Action Types

The paywallActionHandler supports the following actions types:

  • Show Paywall - the paywall is shown to the user
  • Close Paywall - the paywall is closed through the close control (if available), or by using the operating system to dismiss the view. For instance, through a hardware back button on Android or Connected TV remote or swiping the modal view away on iOS.
  • Sign In - the user invokes the paywall's sign in control
  • Restore Purchases - the user invokes the paywall's restore purchases control
  • Buy Sku - the user starts the purchase flow by choosing a sku. This action is triggered on paywalls where the product sku is a button itself that initiates the purchase flow.
  • Select Sku - the user selects a sku. This action is triggered for paywalls where the product sku is decoupled from the call to action button that initiates the purchase flow
  • Purchase Selected Sku - the user starts the purchase flow from the selected sku. For paywalls where the product sku is decoupled from the call to action button that initiates the purchase flow
  • Deeplink - if the user invokes a button on the paywall that initiates a deep link action
  • Toggle Change - if the paywall has a toggle control, this action will be called when the user switches the toggle
  • Page Change - if the paywall is multi-page, this action will be called when the page changes
  • Slide Change - if the paywall has a carousel, this action will be called when the slide changes

Additional action types when Nami purchase management is in use.

  • Purchase Success - the purchase was successful
  • Purchase Pending - the purchase is pending (Android only)
  • Purchase Deferred - the purchase was deferred (Apple only)
  • Purchase Failed - the purchase failed
  • Purchase Cancelled - the purchase was cancelled
  • Purchase Unknown - An unknown purchase flow event occurred

Action Metadata

When any of the four action types in the previous section occur, the Nami SDK provides several items of metadata that you may attach to the event. Some action types have different metadata available.

For all action types

  • campaignId - unique identifier for the campaign rule
  • campaignName - the campaign rule's friendly name
  • campaignLabel - the campaign rule's placement label
  • campaignType- the campaign rule type (label or url)
  • paywallId- unique identifier for the paywall
  • paywallName- the paywall's friendly name
  • segmentId - the segment the end-user's device falls in. If a campaign rule has an active test, there will be a segment id for each split in the test
  • externalSegmentId - if an external audience segment is used for campaign targeting, that identifier is populated here

For the Deeplink action

  • deeplinkUrl - the url to be called by a deeplink action

For the Page Change, Slide Change, and Toggle Change actions

  • componentChangeId - invoked by the Page Change, Toggle Change, or Slide Change actions with the id of the component, if available
  • componentChangeName - invoked by the Page Change, Toggle Change, or Slide Change actions with the name of the component after the change. E.g. page1, if available

For Buy Sku, Select Sku, and Purchase Selected Sku actions

  • sku - the NamiSKU associated with the event, if applicable

For purchase actions , when customers are using Nami purchase management

📘

Additional Purchase Actions

Only customers using Nami for purchase management will receive purchase activity action types and purchase activity metadata from paywallActionHandler callbacks.

  • purchases - a list of NamiPurchase associated with the event, if applicable
  • purchaseError - any errors encountered from the store payment flow, if applicable