Skip to content

Commit 22b8aad

Browse files
authored
Merge pull request #2104 from segmentio/repo-sync
repo sync
2 parents b14a411 + 8b1daa7 commit 22b8aad

File tree

2 files changed

+28
-2
lines changed
  • src/connections/sources/catalog/libraries

2 files changed

+28
-2
lines changed

src/connections/sources/catalog/libraries/mobile/kotlin-android/index.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ redirect_from:
88
With Analytics-Kotlin, you can send data using Kotlin applications to any analytics or marketing tool without having to learn, test, or implement a new API every time. Analytics-Kotlin enables you to process and track the history of a payload, while Segment controls the API and prevents unintended operations.
99

1010
> info ""
11-
> Analytics Kotlin is in public beta and currently supports [these destinations](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins){:target="_blank"} with Segment actively adding more to the list. Segment's [First-Access and Beta terms](https://segment.com/legal/first-access-beta-preview/) govern this library.
11+
> Analytics Kotlin is in public beta and currently supports [these destinations](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins){:target="_blank"} with Segment actively adding more to the list. If you don't see your destination, you can [build your own](#build-your-own-destination). <br>Segment's [First-Access and Beta terms](https://segment.com/legal/first-access-beta-preview/) govern this library.
1212
1313
> success ""
1414
> You can choose to set up your Analytics Kotlin source on [mobile](/docs/connections/sources/catalog/libraries/mobile/kotlin-android) or on the [server](/docs/connections/sources/catalog/libraries/server/kotlin). Segment doesn’t support device-mode destinations on the server-side.
@@ -413,3 +413,29 @@ analytics.flush("SomePlugin")
413413
```
414414
{% endcodeexampletab %}
415415
{% endcodeexample %}
416+
417+
## Build Your Own Destination
418+
419+
If Segment doesn't support your Kotlin destination, you can build your own with the template Segment provides.
420+
421+
To build your own Kotlin destination using a plugin template:
422+
423+
1. Go to the [Kotlin Destination Plugin Template](https://github.com/segmentio/kotlin-destination-templates){:target="_blank"}.
424+
2. Click **Use this template**.
425+
3. Enter a name for the repository.
426+
4. Click **Create repository from template**.
427+
5. Go to **destination > src > main > java/dmn/your/pkg/destination** in your repository.
428+
6. Click the **ExampleDestination.kt**.
429+
7. Complete the `TODO` sections in the sample code with the appropriate information for your destination. Segment recommends you to change the package name before you finalize your build.
430+
8. Commit your changes.
431+
432+
You can unit test your destination to make sure it works. Segment recommends you to use the testing template as a starter and to build upon it to get test coverage of most scenarios.
433+
434+
To test your destination:
435+
436+
1. Go to **destination > src > test > java/dmn/your/pkg/destination**.
437+
2. Click **ExampleDestinationTests.kt**.
438+
3. Complete the `TODO` sections in the sample code with the appropriate information for your destination.
439+
4. Commit your changes.
440+
441+
Segment recommends you to test your destination implementation end-to-end. Send some sample analytics events and ensure that they reach the destination.

src/connections/sources/catalog/libraries/server/kotlin/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ redirect_from:
77
With Analytics-Kotlin, you can send data using Kotlin applications to any analytics or marketing tool without having to learn, test, or implement a new API every time. Analytics-Kotlin enables you to process and track the history of a payload, while Segment controls the API and prevents unintended operations.
88

99
> info ""
10-
> Analytics-Kotlin is in public beta and currently supports [these destinations](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins){:target="_blank"} with Segment actively adding more to the list. Segment's [First-Access and Beta terms](https://segment.com/legal/first-access-beta-preview/) govern this library.
10+
> Analytics-Kotlin is in public beta and currently supports [these destinations](https://github.com/segmentio/analytics-kotlin/tree/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins){:target="_blank"} with Segment actively adding more to the list. If you don't see your destination, you can [build your own](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/index/#build-your-own-destination). Segment's [First-Access and Beta terms](https://segment.com/legal/first-access-beta-preview/) govern this library.
1111
1212
> success ""
1313
> You can choose to set up your Analytics Kotlin source on [mobile](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/index/) or on the [server](/docs/connections/sources/catalog/libraries/server/kotlin/index/). Segment doesn’t support device-mode destinations on the server-side.

0 commit comments

Comments
 (0)