Skip to content

Commit 51b6062

Browse files
committed
resolve localytics-swift edits
1 parent eeba049 commit 51b6062

File tree

1 file changed

+33
-24
lines changed

1 file changed

+33
-24
lines changed

src/connections/sources/catalog/libraries/mobile/apple/destination-plugins/localytics-swift.md

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,46 @@ id: 54521fd925e721e32a72eed0
44
---
55

66
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”}.
88

9-
## Getting Started
109

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
1211

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
23+
here](https://docs.localytics.com/dev/android.html#include-localytics-xml-file){:target="_blank"}.
1424

15-
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.
1925

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.
2030

2131
## Adding the dependency
2232

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:
37+
2538
```
2639
https://github.com/segment-integrations/analytics-swift-localytics
2740
```
2841

29-
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.
3043

31-
### via Package.swift
44+
### Using Package.swift
3245

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.
3447

3548
```
3649
.package(
@@ -41,7 +54,7 @@ Open your Package.swift file and add the following do your the `dependencies` se
4154
```
4255

4356

44-
## Using the Plugin in your App
57+
## Using the plugin in your app
4558

4659
Open the file where you setup and configure the Analytics-Swift library. Add this plugin to the list of imports.
4760

@@ -58,20 +71,16 @@ let analytics = Analytics(configuration: Configuration(writeKey: "<YOUR WRITE KE
5871
.trackApplicationLifecycleEvents(true))
5972
analytics.add(plugin: LocalyticsDestination())
6073
```
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.
6375

6476
## Identify
6577

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.
6981

70-
## Track
7182

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
7584

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.
7786

0 commit comments

Comments
 (0)