Google Analytics for iOS - Sending Custom Event Data using Dictionaries as createEventWithCategory allows only 4 parameters to be sent

前端 未结 3 1771
甜味超标
甜味超标 2021-01-04 11:25

I decided to use Google Analytics over Flurry, as Flurry stopped updating tracking Events and nobody from Flurry Support team replied to my query. My requirement is as follo

相关标签:
3条回答
  • 2021-01-04 11:57

    Now there is another solution for Google users.

    There is another solution since Google set Firebase as a default for mobile application solution.

    Firebase is Google's mobile app developer platform and helps developers incorporate Google's mobile app services quickly and easily – including Google Analytics.

    Here is how Google Analytics changed the way of adding new property under Analytics admin page:

    You can use Firebase send events like how in Flurry.

    Try this method to send events:

    [FIRAnalytics logEventWithName:kFIREventSelectContent
                        parameters:@{
                                     kFIRParameterItemID:[NSString stringWithFormat:@"id-%@", self.title],
                                     kFIRParameterItemName:self.title,
                                     kFIRParameterContentType:@"image"
                                     }];
    

    There is no limit on the total volume of events your app logs.

    View events in the dashboard

    You can view aggregrated statistics about your Analytics events in the Firebase console dashboards. These dashboards update periodically throughout the day. For immediate testing, use the debug console output as described in the previous section.

    You can access this data in the Firebase console as follows:

    1. In the Firebase console, open your project.
    2. Select Analytics from the menu to view the Analytics reporting dashboard.

    The Events tab shows the event reports that are automatically created for each distinct type of Analytics event logged by your app. Read more about the Analytics reporting dashboard in the Firebase Help Center.

    You can add Firebase using cocoapods. Add the dependency for Firebase to your Podfile:

    pod 'Firebase/Core'
    

    Run pod install and open the created .xcworkspace file.

    Import the Firebase module in your UIApplicationDelegate subclass:

    import Firebase
    

    Configure a FIRApp shared instance, typically in your application's application:didFinishLaunchingWithOptions: method:

    // Use Firebase library to configure APIs
    FirebaseApp.configure()
    
    0 讨论(0)
  • 2021-01-04 12:15

    I never used custom parameters with GA, anyway I think this can help you.

    1. Open your Analytics in Behavior/Top Events.

    Behavior/Top Events

    1. Select any primary dimension and click over Secondary Dimension.

    Secondary Dimension

    1. Click over Custom Variables to expand it.

    Custom Variables

    1. Finally, select the variables your want to analise.

    Custom Variables

    0 讨论(0)
  • 2021-01-04 12:16

    you can send custom data to google analytics by using custom dimension.

    you need to add custom dimension from your dashboard after adding that you will get the code..

    Just integrate that in your project and follow below link to see the values.

    http://www.lunametrics.com/blog/2013/09/10/access-custom-dimensions-google-analytics/#sr=g&m=o&cp=or&ct=-tmc&st=hpphmf%20dvtupn%20ejnfotjpo&ts=1384845402

    0 讨论(0)
提交回复
热议问题