LogoLogo
HomeDashboardProduct Docs
  • Introduction
  • Core Concepts
    • Events
    • Sessions
    • User/Customer Profile
  • PLATFORM INTEGRATIONS
    • Shopify Integration
  • Sdk Integrations
    • Browser SDK
      • Integrate SDK
      • Track Events
      • Track Users
      • Configure Web Push
      • Reading Session Identifer
      • Syncing Cart Items
    • Android SDK (Coming Soon)
      • Install Android Sdk
      • Identify Customers
      • Push Notification Integration
    • iOS SDK
      • Install iOS Sdk
      • Tracking User
      • Tracking Events
      • Push Notification Settings
        • Configure APNS In Growlytics
        • Configure Mobile App For Push
        • Handling Push Click
    • Other
      • Upload Customers using CSV
  • Channel Integrations
    • Email
      • Amazon SES
      • SendGrid
      • Custom SMTP
    • Mobile Push Notifications
      • Configure FCM Channel
    • Web Push Notifications
    • Ad Networks
      • Facebook Audiences
      • Google Ad Audiences
  • REST APIs
    • Overview
    • Tracking Users (Shopify Only)
    • Tracking Users (Non-shopify)
    • Tracking Events (Shopify Only)
    • Tracking Events (Non-shopify)
    • Syncing Products
    • Mobile App Apis
  • Webhooks
    • Coupon Webhook
    • Connector Webhooks
Powered by GitBook
On this page
  • Tracking Custom Events
  • Guidelines

Was this helpful?

  1. Sdk Integrations
  2. iOS SDK

Tracking Events

PreviousTracking UserNextPush Notification Settings

Last updated 1 year ago

Was this helpful?

Growlytics starts tracking some events as soon as you . These are called System Events and track some generic user interactions with your app and campaigns. that are automatically tracked by us.

You can create Custom Events to track any other user interactions that are crucial for your business. Each Custom Event can further be defined by Event Attributes like price, quantity, category, etc. Such granular data enables you to engage users through highly contextual and personalized campaigns through all engagement channels.

Tracking Custom Events

Here's how you can track custom events in Growlytics iOS SDK.

import Growlytics

class MyController: UIViewController {

    func myfunction() {
    
        /**
            Your Login Logic
        **/
        
        let eventAttributes: [String:Any]  = [
            "Product ID": 1337,
            "Price": 39.80,
            "Quantity": 1,
            "Product": "Givenchy Pour Homme Cologne",
            "Category": "Fragrance",
            "Currency": "USD",
            "Is Premium": true
        ]
        Analytics.getInstance().track("Product Purchased", eventAttributes)
        
    }
}

Guidelines

Here are a few things to keep in mind:

  • Growlytics sends all events data periodically in batches to minimize network usage and maximize mobile battery life for your users.

  • Custom Event and Custom Event Attribute names are case sensitive and must be less than 50 characters long. String attribute values must be less than 1000 characters long.

  • You can create a maximum of 25 Event Attributes of each data type for a Custom Event.

  • The first datapoint synced to Growlytics defines the data type for that event attribute. Thus, data types must be consistent with the value that you want to store against the attribute. If the data type is changed at a later date, then Custom Event Attribute data will stop flowing to your Growlytics dashboard.

integrate the SDK
Here's a list of the System Events