{"id":21762050,"url":"https://github.com/segment-integrations/analytics-ios-integration-optimizely-x","last_synced_at":"2025-09-06T15:46:00.256Z","repository":{"id":46976406,"uuid":"100652540","full_name":"segment-integrations/analytics-ios-integration-optimizely-x","owner":"segment-integrations","description":"The Optimizely-X analytics-ios integration. ","archived":false,"fork":false,"pushed_at":"2020-10-07T22:40:23.000Z","size":48,"stargazers_count":1,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T04:33:26.254Z","etag":null,"topics":["ios"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/segment-integrations.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-17T23:13:39.000Z","updated_at":"2022-08-28T22:48:09.000Z","dependencies_parsed_at":"2022-07-26T16:30:09.606Z","dependency_job_id":null,"html_url":"https://github.com/segment-integrations/analytics-ios-integration-optimizely-x","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-ios-integration-optimizely-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-ios-integration-optimizely-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-ios-integration-optimizely-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-ios-integration-optimizely-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/segment-integrations","download_url":"https://codeload.github.com/segment-integrations/analytics-ios-integration-optimizely-x/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690990,"owners_count":21146247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios"],"created_at":"2024-11-26T12:10:45.545Z","updated_at":"2025-04-13T13:32:43.485Z","avatar_url":"https://github.com/segment-integrations.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Segment-Optimizely-X\n\n[![CircleCI](https://circleci.com/gh/segment-integrations/analytics-ios-integration-optimizely-x.svg?style=svg)](https://circleci.com/gh/segment-integrations/analytics-ios-integration-optimizely-x)\n[![Version](https://img.shields.io/cocoapods/v/Segment-Optimizely-X.svg?style=flat)](http://cocoapods.org/pods/Segment-Optimizely-X)\n[![License](https://img.shields.io/cocoapods/l/Segment-Optimizely-X.svg?style=flat)](http://cocoapods.org/pods/Segment-Optimizely-X)\n[![Platform](https://img.shields.io/cocoapods/p/Segment-Optimizely-X.svg?style=flat)](http://cocoapods.org/pods/Segment-Optimizely-X)\n\n**This SDK supports Optimizely iOS v1.1.9. Segment supports newer versions of Optimizely via Segment cloud mode. Read more about integrating with Optimizely via Segment cloud mode in [our documentation here](https://segment.com/docs/destinations/optimizely-full-stack/#ios-cloud-mode-implementation).**\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n## Installation\n\nSegment-Optimizely-X is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"Segment-Optimizely-X\"\n```\n\n## Usage\n\nObjective-C:\n```obj-c\n    SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@\"\u003cYOUR_WRITE_KEY\u003e\"];\n    configuration.trackApplicationLifecycleEvents = YES;\n    configuration.recordScreenViews = YES;\n\n    // Setup optimizely logger.\n    OPTLYLoggerDefault *optlyLogger = [[OPTLYLoggerDefault alloc] initWithLogLevel:OptimizelyLogLevelError];\n    // Create an Optimizely manager.\n    self.optlyManager = [OPTLYManager init:^(OPTLYManagerBuilder *_Nullable builder) {\n        builder.projectId = @\"\u003cYOUR_PROJECT_ID\u003e\";\n        builder.logger = optlyLogger;\n    }];\n    \n    // Initialize an Optimizely client by asynchronously downloading the datafile.\n    [self.optlyManager initializeWithCallback:^(NSError *_Nullable error, OPTLYClient *_Nullable client) {\n       // Optimizely is now up and running.  You can now configure any experiments, etc.\n    }];\n\n    [configuration use:[SEGOptimizelyXIntegrationFactory instanceWithOptimizely:self.optlyManager]];\n    [SEGAnalytics setupWithConfiguration:configuration];\n```\n\nSwift:\n```swift\n    let configuration = SEGAnalyticsConfiguration(writeKey: \"\u003cYOUR_WRITE_KEY\u003e\")\n    configuration.trackApplicationLifecycleEvents = true\n    configuration.recordScreenViews = true\n\n    let optlyLogger = OPTLYLoggerDefault(logLevel: .error)\n    optlyManager = OPTLYManager.instance(builderBlock: { (builder) in\n        builder?.projectId = \"\u003cYOUR_PROJECT_ID\u003e\"\n        builder?.logger = optlyLogger\n    })\n\n    optlyManager?.initialize(callback: { (error, optlyClient) in\n        // Optimizely is now up and running.  You can now configure any experiments, etc.\n    })\n\n    configuration.use(SEGOptimizelyXIntegrationFactory.instance(withOptimizely: optlyManager))\n\n    SEGAnalytics.setup(with: configuration)\n```\n\n## License\n\nSegment-Optimizely-X is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegment-integrations%2Fanalytics-ios-integration-optimizely-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegment-integrations%2Fanalytics-ios-integration-optimizely-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegment-integrations%2Fanalytics-ios-integration-optimizely-x/lists"}