{"id":30048304,"url":"https://github.com/segmentio/analytics-swift","last_synced_at":"2026-03-17T23:22:56.112Z","repository":{"id":796961,"uuid":"313759082","full_name":"segmentio/analytics-swift","owner":"segmentio","description":"The hassle-free way to add Segment analytics to your Swift app (iOS/tvOS/watchOS/macOS/Linux).","archived":false,"fork":false,"pushed_at":"2025-07-30T16:56:47.000Z","size":1156,"stargazers_count":125,"open_issues_count":4,"forks_count":101,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-07-30T19:16:47.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/segmentio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-17T22:30:24.000Z","updated_at":"2025-07-30T16:56:50.000Z","dependencies_parsed_at":"2023-07-05T21:16:12.836Z","dependency_job_id":"578a32f6-a36c-49c0-ae6a-a88c5a68c344","html_url":"https://github.com/segmentio/analytics-swift","commit_stats":{"total_commits":161,"total_committers":21,"mean_commits":7.666666666666667,"dds":0.5527950310559007,"last_synced_commit":"2c80798c09e08171452b6df1d8e7e4e2104d90d9"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/segmentio/analytics-swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fanalytics-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fanalytics-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fanalytics-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fanalytics-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/segmentio","download_url":"https://codeload.github.com/segmentio/analytics-swift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fanalytics-swift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269238081,"owners_count":24383470,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-07T10:09:05.695Z","updated_at":"2026-03-17T23:22:51.069Z","avatar_url":"https://github.com/segmentio.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Analytics-Swift\n![](https://github.com/segmentio/analytics-swift/actions/workflows/swift.yml/badge.svg)\n![](https://img.shields.io/github/license/segmentio/analytics-swift)\n\n### 🎉 Flagship 🎉\nThis library is one of Segment’s most popular Flagship libraries. It is actively maintained by Segment, benefitting from new feature releases and ongoing support.\n\nThe hassle-free way to add Segment analytics to your Swift app (iOS/tvOS/visionOS/watchOS/macOS/Linux/iPadOS). Analytics helps you measure your users, product, and business. It unlocks insights into your app's funnel, core business metrics, and whether you have product-market fit.\n\n## How to get started\n1. **Collect analytics data** from your app(s).\n  - The top 200 Segment companies collect data from 5+ source types (web, mobile, server, CRM, etc.).\n2. **Send the data to analytics tools** (for example, Google Analytics, Amplitude, Mixpanel).\n  - Over 250+ Segment companies send data to eight categories of destinations such as analytics tools, warehouses, email marketing and remarketing systems, session recording, and more.\n3. **Explore your data** by creating metrics (for example, new signups, retention cohorts, and revenue generation).\n  - The best Segment companies use retention cohorts to measure product market fit. Netflix has 70% paid retention after 12 months, 30% after 7 years.\n\n[Segment](https://segment.com) collects analytics data and allows you to send it to more than 250 apps (such as Google Analytics, Mixpanel, Optimizely, Facebook Ads, Slack, Sentry) just by flipping a switch. You only need one Segment code snippet, and you can turn integrations on and off at will, with no additional code. [Sign up with Segment today](https://app.segment.com/signup).\n\n### Why?\n1. **Power all your analytics apps with the same data**. Instead of writing code to integrate all of your tools individually, send data to Segment, once.\n\n2. **Install tracking for the last time**. We're the last integration you'll ever need to write. You only need to instrument Segment once. Reduce all of your tracking code and advertising tags into a single set of API calls.\n\n3. **Send data from anywhere**. Send Segment data from any device, and we'll transform and send it on to any tool.\n\n4. **Query your data in SQL**. Slice, dice, and analyze your data in detail with Segment SQL. We'll transform and load your customer behavioral data directly from your apps into Amazon Redshift, Google BigQuery, or Postgres. Save weeks of engineering time by not having to invent your own data warehouse and ETL pipeline.\n\n   For example, you can capture data on any app:\n    ```swift\n    struct TrackProperties: Codable {\n        let price: Double\n    }\n\n    // ...\n\n    analytics.track(name: \"Order Completed\", properties: TrackProperties(price: 99.84))\n    ```\n   Then, query the resulting data in SQL:\n    ```sql\n    select * from app.order_completed\n    order by price desc\n    ```\n\n## Supported Device Mode Destinations\n\n| Partner | Package |\n| --- | --- |\n| Amplitude | https://github.com/segment-integrations/analytics-swift-amplitude |\n| AppsFlyer | https://github.com/segment-integrations/analytics-swift-appsflyer |\n| Braze    | https://github.com/segment-integrations/analytics-swift-braze |\n| Facebook | https://github.com/segment-integrations/analytics-swift-facebook-app-events |\n| Firebase | https://github.com/segment-integrations/analytics-swift-firebase |\n| Mixpanel | https://github.com/segment-integrations/analytics-swift-mixpanel |\n| Survicate | https://github.com/Survicate/analytics-swift-survicate |\n\n## Documentation\n\nYou can find usage documentation at [Segment Docs, Analytics-Swift](https://segment.com/docs/connections/sources/catalog/libraries/mobile/apple/).\n\nExplore more via the [example projects](Examples) which showcase analytics instrumentation on different platforms/languages and usage of plugins. These projects contain sample [plugins](Examples/other_plugins) and [destination plugins](Examples/destination_plugins).\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## Integrating with Segment\n\nInterested in integrating your service with us? Check out our [Partners page](https://segment.com/partners/) for more details.\n\n## Code of Conduct\n\nBefore contributing, please also see our [code of conduct](CODE_OF_CONDUCT.md).\n\n## License\n```\nMIT License\n\nCopyright (c) 2021 Segment\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegmentio%2Fanalytics-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegmentio%2Fanalytics-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegmentio%2Fanalytics-swift/lists"}