Push notifications play a key role in achieving in good customer retention and engagement. Sending relevant push notifications can boost your retention or increase the time spent by the user on the app, whereas sending improper push or sending push notifications at odd times may also result in uninstalling of the app.
But how do we track open rate in push notification in iPhone or iOS app? We have many platforms like Localytics, MixPanel which can be used to send push notifications and track open rates too. But this post will be helpful to track open rates of push notification using Google Analytics. Here are things that you need to do to know the open rate for push notifications:
1. Create a new google analytics property for Mobile application and generate a tracking id like this “UA-*****”.
2. Once you have GA tracking code, integrate Google Analytics SDK in your app using this link.
3. Once you have integrated Google Analytics SDK, include these headers in AppDelegate:
4. Add the following code snippet in function showed in AppDelegate.m file:
-(BOOL)application: (UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
[GAI sharedInstance].trackUncaughtExceptions = YES;
[[GAI sharedInstance].logger setLogLevel:10];
[GAI sharedInstance].dispatchInterval = 20;
id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:@”UA-XXXXXXX-Y”];
[tracker set:1 value:@”your_event_name”];
[tracker send:[[GAIDictionaryBuilder createAppView] build]];.....
This event will trigger whenever app launches from push notifications. And when this event triggers, it will call send the values to Google Analytics and we can track the number of notifications opened based on the event name.
Thanks for dropping by!! Feel free to comment to this post or you can also drop me an email at firstname.lastname@example.org