Skip to content

Instantly share code, notes, and snippets.

@louismullie
Created July 17, 2020 00:17
Show Gist options
  • Save louismullie/6cc021009180dcb7cd2d3dc9f23538d0 to your computer and use it in GitHub Desktop.
Save louismullie/6cc021009180dcb7cd2d3dc9f23538d0 to your computer and use it in GitHub Desktop.
Add segment to pathway app
#Step 1. Add the Analytics dependency to your Podfile
# The recommended way to install Analytics for iOS is via Cocoapods, since it means you can create a build with specific integrations, and because it makes it dead simple to install and upgrade.
pod 'Analytics', '~> 3.0'
# Step 2. Initialize the Client
# Add this snippet to your application delegate’s - application:didFinishLaunchingWithOptions: method.
SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"fvOmVqVIrSuOiJclgSWOFtUtD36Vksqd"];
# Enable this to record certain application events automatically!
configuration.trackApplicationLifecycleEvents = YES;
# Enable this to record screen views automatically!
configuration.recordScreenViews = YES;
[SEGAnalytics setupWithConfiguration:configuration];
# Step 3. Import the SDK in the files that you use it with
#import <Analytics/SEGAnalytics.h>
@louismullie
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment