Search code examples
iosswiftmixpanel

Store app version by default in Mixpanel


I need to make Mixpanel to store my app version.

It is storing all other things like Operating System, OS Version, Model and Manufacturer by default.

But it's not storing app version.


Solution

  • Mixpanel sends a number of parameters by default, such as the device model, operating system version and time zone. But sometimes you may want to have some properties that you want to include in each event you send. Mixpanel has Super Properties for this purpose. You can register the properties as Super Properties and then Mixpanel will include it in all events you send.

    To register a property as super property, you just need to call Mixpanel.mainInstance().registerSuperProperties()

    for e.g

    Mixpanel.mainInstance().registerSuperProperties(["App Language" : "English","app_version_string" : Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString")])
    

    you get the output as

    enter image description here