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/destination-plugins/localytics-swift.md
+33-24Lines changed: 33 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,33 +4,46 @@ id: 54521fd925e721e32a72eed0
4
4
---
5
5
6
6
Our Analytics-Swift Localytics Destination Plugin is open sourced on GitHub. Feel free to
7
-
[check it out here](https://github.com/segment-integrations/analytics-swift-localytics).
7
+
[check it out here](https://github.com/segment-integrations/analytics-swift-localytics){:target="_blank”}.
8
8
9
-
## Getting Started
10
9
11
-
The Analytics-Swift Localytics Session Plugin provides session tracking support to your applications via this plugin for [Analytics-Swift](https://github.com/segmentio/analytics-swift)
10
+
## Getting started
12
11
13
-
# Getting Started
12
+
Once the Segment library is integrated with your site or app, toggle Localytics
13
+
on in your Segment destinations, and add your application's **App Key** which
14
+
you can find in your Localytics app settings. These new settings will take up to
15
+
an hour to propogate to all of your existing users. For new users it'll be
16
+
instanteneous!
17
+
18
+
If you are using version 1.3.0 or higher of the Segment-Localytics Android SDK,
19
+
you can include a `localytics.xml` file in your Android project's `res/values`
20
+
folder to define your settings. Note that any settings entered in the Segment UI
21
+
will override the equivalent values defined in your `localytics.xml` file. You
22
+
can read more about the `localytics.xml` file in [Localytics's documentation
1. From the Segment Destinations page click **Add Destination**.
16
-
2. Search for `Localytics` and select it in the results that appear.
17
-
3. Choose which Source to connect `Localytics` to.
18
-
4. Add your `Localytics` App Key to the Destination setting.
19
25
26
+
1. From the Segment Destinations page click **Add Destination**.
27
+
2. Search for Localytics and select it in the results that appear.
28
+
3. Choose which source to connect to your Localytics destination.
29
+
4. Add your Localytics **App Key** to the destination's settings tab.
20
30
21
31
## Adding the dependency
22
32
23
-
### via Xcode
24
-
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.
33
+
***Note:*** the `Localytics` library itself will be installed as an additional dependency.
34
+
35
+
### Using Xcode
36
+
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 for this repo:
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.
42
+
You then have the option to pin to a version or specific branch and select which project in your workspace to add the package to. Once you've made your selections, click the **Add Package** button.
30
43
31
-
### via Package.swift
44
+
### Using Package.swift
32
45
33
-
Open your Package.swift file and add the following do your the `dependencies` section:
46
+
Open the file where you set up and configured the Analytics-Swift library. Add this plugin to the list of imports.
34
47
35
48
```
36
49
.package(
@@ -41,7 +54,7 @@ Open your Package.swift file and add the following do your the `dependencies` se
41
54
```
42
55
43
56
44
-
## Using the Plugin in your App
57
+
## Using the plugin in your app
45
58
46
59
Open the file where you setup and configure the Analytics-Swift library. Add this plugin to the list of imports.
47
60
@@ -58,20 +71,16 @@ let analytics = Analytics(configuration: Configuration(writeKey: "<YOUR WRITE KE
58
71
.trackApplicationLifecycleEvents(true))
59
72
analytics.add(plugin: LocalyticsDestination())
60
73
```
61
-
Your events will now be given Localytics session data and start flowing to Localytics via Cloud Mode.
62
-
74
+
Your events will now be given Localytics session data and start flowing to Localytics via device-mode.
63
75
64
76
## Identify
65
77
66
-
When you call [`identify`](/docs/connections/spec/identify/), we'll set the Localytics
67
-
customer Id, and set any special Localytics traits you provide, such as`name`,
68
-
or `email`, and any custom traits as well.
78
+
When you make an [Identify](/docs/connections/spec/identify/) call, Segment sets the Localytics
79
+
customerId and any special Localytics traits you provide, like`name`,
80
+
`email`, or custom traits.
69
81
70
-
## Track
71
82
72
-
Whenever you call [`track`](/docs/connections/spec/track/), we'll log an event with
73
-
Localytics. [`track`](/docs/connections/spec/track/) takes the name of the event and any
74
-
optional properties you want to associate with the event.
83
+
## Track
75
84
76
-
- - -
85
+
When you make a [Track](/docs/connections/spec/track/) call, Segment logs an event with Localytics containing the name of the event and any optional event properties.
0 commit comments