Quick way to integrate Liquid basic analytics using your current Localytics or Mixpanel integration.
With this Pod installed, all events being tracked by Localytics or Mixpanel will also be automatically tracked by Liquid, as well as user attributes.
-
Install CocoaPods in your system.
-
Open your Xcode project folder and create/edit a file called
Podfile
with the following content, depending on the analytics service you're already using. Use only one of them:pod 'LiquidEventsInterceptor/Localytics' pod 'LiquidEventsInterceptor/Mixapanel' pod 'LiquidEventsInterceptor/GoogleAnalytics'
-
Run
pod install
and wait for CocoaPod to install Liquid SDK. -
Open your
AppDelegate.m
, and initialize Liquid, before initializing your current analytics service:
If your using Localytics:
// AppDelegate.m
#import "AppDelegate.h"
#import <Localytics/Localytics.h>
#import <Liquid/Liquid.h>
#import "LiquidLocalyticsInterceptor.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Liquid sharedInstanceWithToken:@"YOUR-LIQUID-TOKEN"]; // before Localytics
[Localytics autoIntegrate:@"YOUR-LOCALYTICS-APP-KEY" launchOptions:launchOptions];
return YES;
}
If you're using Mixpanel:
// AppDelegate.m
#import "AppDelegate.h"
#import <Mixpanel/Mixpanel.h>
#import <Liquid/Liquid.h>
#import "LiquidMixpanelInterceptor.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Liquid sharedInstanceWithToken:@"YOUR-LIQUID-TOKEN"]; // before Mixpanel
[Mixpanel sharedInstanceWithToken:@"YOUR-MIXPANEL-TOKEN"];
return YES;
}
If you're using Google Analytics:
// AppDelegate.m
#import "AppDelegate.h"
#import <Google/Analytics.h>
#import <Liquid/Liquid.h>
#import "LiquidMixpanelInterceptor.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Liquid sharedInstanceWithToken:@"YOUR-LIQUID-TOKEN"]; // before Google Analytics
// Configure tracker from GoogleService-Info.plist.
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);
GAI *gai = [GAI sharedInstance];
gai.trackUncaughtExceptions = NO;
gai.logger.logLevel = kGAILogLevelError;
return YES;
}
To use all the Liquid features please integrate our SDK.
We recommend you to read the full documentation.
Liquid Data Intelligence, S.A.
Liquid is available under the Apache license. See the LICENSE file for more info.