|
1 | 1 | ---
|
2 |
| -title: 1Flow (Actions) Destination |
| 2 | +title: 1Flow Mobile Plugin Destination |
3 | 3 | ---
|
4 | 4 |
|
5 | 5 | [1Flow](https://1flow.ai/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners) is a leading in-app user survey and messaging platform for Mobile app and SaaS businesses.
|
6 | 6 |
|
7 | 7 | Using 1Flow, you can reach users _in-the-moment_ while they are interacting with your website or application, to collect highly contextual user insights that help you improve your product offering and customer experience
|
8 | 8 |
|
9 |
| -This destination is maintained by 1Flow. For any issues with the destination, [contact their Support team ](mailto:[email protected]). |
| 9 | +The 1Flow Mobile Plugin Destination is open-source and available on GitHub. You can view these repositories here: |
| 10 | + |
| 11 | +- [iOS](https://github.com/1Flow-Inc/Segment1Flow.git){:target="_blank"} |
| 12 | +- [Android](https://github.com/1Flow-Inc/1flow-segment-tool.git){:target="_blank"} |
| 13 | + |
| 14 | +This destination is maintained by 1Flow. For any issues with the destination, [contact Support team ](mailto:[email protected]). |
10 | 15 |
|
11 | 16 | ## Getting started
|
12 | 17 |
|
13 |
| -1. From the Segment web app, click **Catalog**, then click **1Flow**. |
14 |
| -2. Find the Destinations Actions item in the left navigation, and click it. |
15 |
| -3. Click **Configure 1Flow**. |
16 |
| -4. Select an existing Source to connect to 1Flow (Actions). |
17 |
| -5. Go to 1flow.ai -> Settings -> Project Settings -> Copy 1Flow project key and paste it into the Connection Settings in Segment. |
| 18 | +1. From the Segment web app, click **Catalog**, then search for **1Flow Mobile Plugin**. |
| 19 | +2. Click **Add Destination**. |
| 20 | +4. Select an existing Source to connect to 1Flow Mobile Plugin. |
| 21 | +5. Go to 1flow.ai -> Settings -> Project Settings, copy the 1Flow project key, and paste it into the Destination Settings in Segment. |
| 22 | +6. Depending on the mobile source you’ve selected, include 1Flow's library by adding the following lines to your dependency configuration. |
| 23 | + |
| 24 | +## iOS |
| 25 | + |
| 26 | +### Step 1: Add Segment1Flow Package using Swift Package Manager |
| 27 | + |
| 28 | +In the Xcode File menu, click Add Packages. You'll see a dialog where you can search for Swift packages. In the search field, enter the URL to this repo. |
| 29 | + |
| 30 | +https://github.com/1Flow-Inc/Segment1Flow |
| 31 | + |
| 32 | +You'll then have the option to pin to a version, or specific branch, as well as which project in your workspace to add it to. Once you've made your selections, click the Add Package button. |
| 33 | + |
| 34 | +### Step 2: Initialise Segment and Add 1Fow Destination |
| 35 | + |
| 36 | +``` |
| 37 | + let config = Configuration(writeKey: "YOUR_WRITE_KEY_HERE") |
| 38 | + let analytics = Analytics(configuration: config) |
| 39 | + analytics.add(plugin: OneFlowDestination()) |
| 40 | +``` |
| 41 | + |
| 42 | +## Android |
| 43 | + |
| 44 | +### Step 1: Install 1Flow-Segment-Tool |
| 45 | + |
| 46 | +- If gradle version is 6.5 or lower, include the below repository in your project's build.gradle file: |
18 | 47 |
|
| 48 | +``` |
| 49 | +allprojects{ |
| 50 | + repositories{ |
| 51 | + google() |
| 52 | + jcenter() |
| 53 | + maven{url 'https://jitpack.io'} |
| 54 | + } |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | +- If gradle version is higher than 6.5, add the below code in settings.gradle. |
| 59 | + |
| 60 | +``` |
| 61 | +dependencyResolutionManagement { |
| 62 | + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) |
| 63 | + repositories { |
| 64 | + google() |
| 65 | + mavenCentral() |
| 66 | + maven{url 'https://jitpack.io'} |
| 67 | + } |
| 68 | +} |
| 69 | +``` |
| 70 | + |
| 71 | +- Add dependency in your app's build.gradle file: |
| 72 | + |
| 73 | +``` |
| 74 | +compileSdkVersion 34 |
| 75 | +.... |
| 76 | +defaultConfig { |
| 77 | + .... |
| 78 | + minSdkVersion 21 |
| 79 | + } |
| 80 | +dependencies { |
| 81 | + .... |
| 82 | + implementation 'com.segment.analytics.android:analytics:4.11.3' |
| 83 | + implementation "com.github.1Flow-Inc:1flow-segment-tool:2023.09.14" |
| 84 | +} |
| 85 | +``` |
| 86 | + |
| 87 | +### Step 2: Initialize Segment and add 1Flow Destination |
| 88 | +``` |
| 89 | +Analytics analytics = new Analytics.Builder(context, "YOUR_WRITE_KEY_HERE") |
| 90 | + .use(OneFlowIntegration.FACTORY) |
| 91 | + ... |
| 92 | + .build(); |
| 93 | + ... |
| 94 | + Analytics.setSingletonInstance(analytics); |
| 95 | +
|
| 96 | +``` |
19 | 97 |
|
20 | 98 | ## Supported methods
|
21 | 99 |
|
|
0 commit comments