From ca3a8d30ba2bae7c44ae182bf300add8354759bb Mon Sep 17 00:00:00 2001 From: Rohan Moradiya Date: Mon, 11 Sep 2023 16:28:26 +0530 Subject: [PATCH 1/4] 1Flow iOS doc update --- .../destinations/catalog/test-flow/index.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/connections/destinations/catalog/test-flow/index.md diff --git a/src/connections/destinations/catalog/test-flow/index.md b/src/connections/destinations/catalog/test-flow/index.md new file mode 100644 index 0000000000..475ea02e08 --- /dev/null +++ b/src/connections/destinations/catalog/test-flow/index.md @@ -0,0 +1,50 @@ +--- +title: 1Flow (Actions) Destination +--- + +[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. + +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 + +This destination is maintained by 1Flow. For any issues with the destination, [contact their Support team](mailto:support@1flow.app). + +## Getting started + +1. From the Segment web app, click **Catalog**, then click **1Flow**. +2. Find the Destinations Actions item in the left navigation, and click it. +3. Click **Configure 1Flow**. +4. Select an existing Source to connect to 1Flow (Actions). +5. Copy 1Flow project key and paste it into the Connection Settings in Segment. + + +## Supported methods + +### Identify +If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call would look like: + +```swift +analytics.identify(userId: "peter@example.com", traits: [ + "name": "Peter Gibbons", + "email": "peter@example.com", + "mobile": 1234567890 +]) +``` +When you call identify method of segment, it will be equivalent to `logUser` of 1Flow. `userId` will be `userID` and `traits` will be `userDetails`. + +### Track +If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like: + +```swift +analytics.track(name: "ButtonClicked") +``` +Any value passed in `name`, will be eventName and if you have passed any event property, then it will be event `parameters`. + +### Screen + +Send [Screen](/docs/connections/spec/screen) calls to record which mobile app screens users have viewed. For example: + +```swift +analytics.screen(title: "Home") +``` + +Segment sends Screen calls to 1Flow as a `screen_[name]` event (or `screen_view` if a screen name isn't provided). From 518003d821ab2296a2e9964032f3f855eebcbdf0 Mon Sep 17 00:00:00 2001 From: Rohan Moradiya Date: Tue, 12 Sep 2023 10:05:55 +0530 Subject: [PATCH 2/4] Specified where to find 1flow project key --- src/connections/destinations/catalog/test-flow/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/test-flow/index.md b/src/connections/destinations/catalog/test-flow/index.md index 475ea02e08..0f7ae50350 100644 --- a/src/connections/destinations/catalog/test-flow/index.md +++ b/src/connections/destinations/catalog/test-flow/index.md @@ -14,7 +14,7 @@ This destination is maintained by 1Flow. For any issues with the destination, [c 2. Find the Destinations Actions item in the left navigation, and click it. 3. Click **Configure 1Flow**. 4. Select an existing Source to connect to 1Flow (Actions). -5. Copy 1Flow project key and paste it into the Connection Settings in Segment. +5. Go to 1flow.ai -> Settings -> Project Settings -> Copy 1Flow project key and paste it into the Connection Settings in Segment. ## Supported methods From b62a21cbe1276c2f4460c269dee988c96031d5e2 Mon Sep 17 00:00:00 2001 From: Rohan Moradiya Date: Thu, 14 Sep 2023 19:08:19 +0530 Subject: [PATCH 3/4] Added installation instruction for both platform --- .../destinations/catalog/test-flow/index.md | 92 +++++++++++++++++-- 1 file changed, 85 insertions(+), 7 deletions(-) diff --git a/src/connections/destinations/catalog/test-flow/index.md b/src/connections/destinations/catalog/test-flow/index.md index 0f7ae50350..f551c37d7b 100644 --- a/src/connections/destinations/catalog/test-flow/index.md +++ b/src/connections/destinations/catalog/test-flow/index.md @@ -1,21 +1,99 @@ --- -title: 1Flow (Actions) Destination +title: 1Flow Mobile Plugin Destination --- [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. 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 -This destination is maintained by 1Flow. For any issues with the destination, [contact their Support team](mailto:support@1flow.app). +The 1Flow Mobile Plugin Destination is open-source and available on GitHub. You can view these repositories here: + +- [iOS](https://github.com/1Flow-Inc/Segment1Flow.git){:target="_blank"} +- [Android](https://github.com/1Flow-Inc/1flow-segment-tool.git){:target="_blank"} + +This destination is maintained by 1Flow. For any issues with the destination, [contact Support team](mailto:support@1flow.app). ## Getting started -1. From the Segment web app, click **Catalog**, then click **1Flow**. -2. Find the Destinations Actions item in the left navigation, and click it. -3. Click **Configure 1Flow**. -4. Select an existing Source to connect to 1Flow (Actions). -5. Go to 1flow.ai -> Settings -> Project Settings -> Copy 1Flow project key and paste it into the Connection Settings in Segment. +1. From the Segment web app, click **Catalog**, then search for **1Flow Mobile Plugin**. +2. Click **Add Destination**. +4. Select an existing Source to connect to 1Flow Mobile Plugin. +5. Go to 1flow.ai -> Settings -> Project Settings, copy the 1Flow project key, and paste it into the Destination Settings in Segment. +6. Depending on the mobile source you’ve selected, include 1Flow's library by adding the following lines to your dependency configuration. + +## iOS + +### Step 1: Add Segment1Flow Package using Swift Package Manager + +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. + +https://github.com/1Flow-Inc/Segment1Flow + +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. + +### Step 2: Initialise Segment and Add 1Fow Destination + +``` + let config = Configuration(writeKey: "YOUR_WRITE_KEY_HERE") + let analytics = Analytics(configuration: config) + analytics.add(plugin: OneFlowDestination()) +``` + +## Android + +### Step 1: Install 1Flow-Segment-Tool + +- If gradle version is 6.5 or lower, include the below repository in your project's build.gradle file: +``` +allprojects{ + repositories{ + google() + jcenter() + maven{url 'https://jitpack.io'} + } +} +``` + +- If gradle version is higher than 6.5, add the below code in settings.gradle. + +``` +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + maven{url 'https://jitpack.io'} + } +} +``` + +- Add dependency in your app's build.gradle file: + +``` +compileSdkVersion 34 +.... +defaultConfig { + .... + minSdkVersion 21 + } +dependencies { + .... + implementation 'com.segment.analytics.android:analytics:4.11.3' + implementation "com.github.1Flow-Inc:1flow-segment-tool:2023.09.14" +} +``` + +### Step 2: Initialize Segment and add 1Flow Destination +``` +Analytics analytics = new Analytics.Builder(context, "YOUR_WRITE_KEY_HERE") + .use(OneFlowIntegration.FACTORY) + ... + .build(); + ... + Analytics.setSingletonInstance(analytics); + +``` ## Supported methods From 4986aadecdacccdf4d8bbf8706581202a20caf18 Mon Sep 17 00:00:00 2001 From: Rohan Moradiya Date: Fri, 15 Sep 2023 00:02:23 +0530 Subject: [PATCH 4/4] Address requested changes --- src/connections/destinations/catalog/test-flow/index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/test-flow/index.md b/src/connections/destinations/catalog/test-flow/index.md index f551c37d7b..5d20e748b4 100644 --- a/src/connections/destinations/catalog/test-flow/index.md +++ b/src/connections/destinations/catalog/test-flow/index.md @@ -1,8 +1,11 @@ --- title: 1Flow Mobile Plugin Destination +id: 64dd07c1fed86b6866cd93f5 +beta: true +hidden: true --- -[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. +[1Flow](https://1flow.ai/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank"} is a leading in-app user survey and messaging platform for Mobile app and SaaS businesses. 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