You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/mobile/apple/live-plugins.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,29 @@ title: Live Plugins
3
3
strat: swift
4
4
---
5
5
6
-
Segment has launched the [Auto-Instrumentation Public Beta](https://segment.com/docs/connections/auto-instrumentation/){:target="_blank"} to Public Beta, which simplifies instrumenting your websites & apps with a simple WYSIWYG interface, directly from your Segment workspace. In addition to creating events remotely, Segment also offers the ability to transform events remotely via Live Plugins.
6
+
Segment has launched the [Auto-Instrumentation](https://segment.com/docs/connections/auto-instrumentation/){:target="_blank"} to Public Beta, which simplifies instrumenting your websites & apps with a simple WYSIWYG interface, directly from your Segment workspace. As part of this launch, Segment also offers the ability to transform events remotely via Live Plugins.
7
7
8
-
Live Plugins are JavaScript code snippets which are published via your Segment source, and then downloaded directly to the mobile devices of end users. Live Plugins let you perform real-time modifications to events, before they leave the mobile device, without having to rebuild & redistribute your apps.
8
+
Live Plugins are JavaScript code snippets which are published from your Segment workspace directly to the devices of your end users. Live Plugins let you perform real-time modifications to events, before they leave the end-user device, without having to rebuild & redistribute your apps.
9
9
10
10
On this page, you'll learn how to set up your mobile app to support Live Plugins, and how to create and deploy your own Live Plugins directly to your end users. You'll also see examples of Live Plugins that address common use cases.
11
11
12
12
> info "Live Plugins is in Public Beta"
13
-
> Live Plugins is currently in Beta and available to select Business Tier Customers only. To enable this feature for your workspace, contact your CSM.
13
+
> Live Plugins is currently in Beta for Swift & Kotlin, and available to select Business Tier Customers only. To enable this feature for your workspace, contact your CSM.
14
14
15
-
## Live plugins overview
15
+
## Live Plugins overview
16
16
17
17
You can use JavaScript live plugins with Analytics-Swift and Analytics-Kotlin to filter and modify data remotely. As a result, you can filter and modify Analytics events without having to deploy updates to the app store for each change, ensuring data quality and consistency for all your mobile users.
18
18
19
-
Because Live Plugins let you modify event data before it leaves a mobile device, you can use the same Javascript code to modify data meant for all your cloud-mode and device-mode destinations, or scope your changes to specific Destinations.
19
+
Because Live Plugins let you modify event data before it leaves a mobile device, you can use the same Javascript code to modify data across all your cloud-mode and device-mode destinations, or you can scope your changes to specific destinations.
20
20
21
21
## Setup
22
22
23
23
To use Live Plugins, you first need to set up your mobile app with a one-time configuration.
24
24
25
25
To configure Live Plugins:
26
26
27
-
1. Include the [AnalyticsLive for Swift plugin](https://github.com/segment-integrations/analytics-swift-live){:target="_blank"}
28
-
and [AnalyticsLive for Kotlin plugin](https://github.com/segment-integrations/analytics-kotlin-live){:target="_blank"}
27
+
1. Include [Analytics-Live for Swift plugin](https://github.com/segment-integrations/analytics-swift-live){:target="_blank"}
28
+
and [Analytics-Live for Kotlin](https://github.com/segment-integrations/analytics-kotlin-live){:target="_blank"}
29
29
in your project.
30
30
2. Add the plugin to your instance of Analytics, using the following code:
31
31
@@ -53,7 +53,7 @@ analytics.add(LivePlugins())
53
53
54
54
After you've completed setup, you can deploy your apps to the Apple App Store and Google Play Store. You can then add new JavaScript plugin code to your mobile apps through the Segment website, and perform updates as often as needed.
55
55
56
-
## Create your own live plugin
56
+
## Create your own Live Plugin
57
57
58
58
To access Live Plugins for you Swift and Kotlin sources
To control when your custom live plugin runs during event processing, you can use `LivePluginType` enums, which define different timing options for your live plugin. Here are the available types:
105
+
To control when your custom Live Plugin runs during the event lifecycle, you can use `LivePluginType` enums, which define different timing options for your Live Plugin. Here are the available types:
106
106
107
107
```js
108
108
constLivePluginType= {
@@ -113,9 +113,9 @@ const LivePluginType = {
113
113
}
114
114
```
115
115
116
-
With these enums, you can select the timing that best fits your custom live plugin's target use case. These types align with categories used for Native Plugins.
116
+
With these enums, you can select the timing that best fits your custom Live Plugin's target use case. These types align with categories used for Native Plugins.
117
117
118
-
## Live plugin examples
118
+
## Live Plugin examples
119
119
120
120
The following live plugin examples address common use cases:
Live plugins follow an interface that let you intercept Segment events and modify their data. This interface includes several functions that you can implement for custom behavior:
255
+
Live Plugins expose an interface that lets you intercept Segment events and modify their data. This interface includes several functions that you can implement for custom behavior:
0 commit comments