Appflow.ai
Visit our websitePricingSign up for freeLog in
  • GET STARTED
    • What is Appflow.ai?
    • Quickstart - How to start working with Appflow.ai?
    • FAQ
    • Ownership and other roles
  • SDK Set-up Instructions
    • Android SDK
      • Google Play Store Credentials
        • Google Service Account Key
        • Google real-time developer notifications(RTDN)
        • FCM server key(optional)(to be updated)
      • Events (Custom events)
      • Purchases
      • Visual constructor
      • User info
      • Push notifications
    • iOS SDK
      • Specify Apple Store Keys
      • Purchases and User Info
      • Event tracking (Custom events)
      • Push Notifications Configuration
      • Visual constructor
  • IN-APP PURCHASE
    • SKU adding
  • METRICS & EVENTS
    • Calculations of Analytics
    • Terms and Descriptions
    • Purchase Events
    • In-app Events
    • Events Structure
    • End-users Attributes
    • Users' statuses
  • SUBSCRIPTION ANALYTICS
    • Dashboard
    • Configurator
    • Reports
    • A/B Testing
    • Integrations
    • Create Push-notifications
    • In-app Messages
    • Return of Advertisement
    • Funnels
    • Funnel 2.0 BETA
    • Entitlements
    • Visual Constructor
  • INTEGRATIONS
    • Adjust
    • Appsflyer
    • Mixpanel
    • Webhooks
    • Apple Search Ads Attributions
    • Branch
    • Amplitude
  • OTHERS
    • Pricing plans and important information about your payments
    • Storing your data
    • Privacy Policy
    • Terms of Use
    • Unsubscribe from Appflow.ai
Powered by GitBook
On this page
  • First installation
  • The App launched
  • The App current uv
  • Ads click
  • Ads show
  • ev_User_Engagement

Was this helpful?

  1. SDK Set-up Instructions
  2. iOS SDK

Event tracking (Custom events)

Add custom events to track a better users' journey


First installation

Appflow.shared.analytics.uploadBigDataWithType(eventType: .firstOpen, params: nil)

The App launched

Appflow.shared.analytics.uploadBigDataWithType(eventType: .appStart, params: nil)

The App current uv

Appflow.shared.analytics.uploadBigDataWithType(eventType: .screenView, params: [
    kScreenViewName: kHomepage
])
or
let model = ParamModel()
model.screenType = ParamScreenHome
Appflow.shared.analytics.uploadBigDataWithType(eventType: .screenView, paramModel: model)

Ads click

Appflow.shared.analytics.uploadBigDataWithType(eventType: .adsClick, params: [
    kPlacement: kQuickClean,
    kFormat: kBanner
])
or 
let model = ParamModel()
model.placeType = ParamPlaceClean
model.formatType = ParamFormatBanner
Appflow.shared.analytics.uploadBigDataWithType(eventType: .adsClick, paramModel: model)

Ads show

Appflow.shared.analytics.uploadBigDataWithType(eventType: .adsShow, params: [
    kPlacement: kQuickClean,
    kFormat: kBanner
])

let model = ParamModel()
model.placeType = ParamPlaceClean
model.formatType = ParamFormatBanner
Appflow.shared.analytics.uploadBigDataWithType(eventType: .adsShow, paramModel: model)

ev_User_Engagement

let tMSimestamp = "\(IMDeviceInfoManager.shared().getCurrentMSimestamp())"
Appflow.shared.analytics.uploadBigDataWithType(eventType: .userEngagement, params: [
    kEngagementTimeMsec: tMSimestamp,
    kScreenViewName: kHomepage
])
or
let tMSimestamp = "\(IMDeviceInfoManager.shared().getCurrentMSimestamp())"
let model = ParamModel()
model.screenType = ParamScreenHome
model.otherData = [
    kEngagementTimeMsec: tMSimestamp
]
Appflow.shared.analytics.uploadBigData(eventType: .userEngagement, paramModel: model)

**If you need a callback in the above method, do something like this

Appflow.shared.analytics.uploadBigDataWithType(eventType: .userEngagement, params: [
    kEngagementTimeMsec: tMSimestamp,
    kScreenViewName: kHomepage
], successBlock: { obj in

}) { obj in

}

**If the above enumeration does not meet the requirements, extend it as follows

Swift

Appflow.shared.analytics.uploadBigDataWithEvent(
    eventName: "event_name",
    params: [
        "name": "123",
        "time": "456"
    ])

For now, we have limited the number of Custom events you can send to Appflow.ai. The current limit is 10 custom events per app. To register them you need to go to Settings=> Apps=> Edit app=> Add custom events

PreviousPurchases and User InfoNextPush Notifications Configuration

Last updated 1 year ago

Was this helpful?