# Kitemetrics Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Kitemetrics** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.

[Kitemetrics](https://kitemetrics.com/?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) provides keyword level attribution for Apple Search Ads and associates them with In-App Purchases. Kitemetrics allows you to use automation to easily manage and optimize Apple Search Ads campaigns and bids.

This destination is maintained by Kitemetrics. For any issues with the destination, [contact the Kitemetrics Support team](mailto:support@kitemetrics.com).

## Getting Started

1. From the Segment web app, click **Catalog**.
2. Search for "Kitemetrics" in the Catalog, select it, and choose which of your sources to connect the destination to.
3. Enter the "API Key" into your Segment Settings UI which you can find from your [Kitemetrics Account Settings -> Applications page](https://cloud.kitemetrics.com/applications).
4. Once data is flowing from your source to the Kitemetrics destination, you will need to refresh your browser to view the latest data in your Kitemetrics analytics or keywords dashboard.

## Track

If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/segment/connections/spec/track/) does.

In order to track Apple Search Ads attribution events you will need to include the [Analytics-iAds-Attribution](https://github.com/segmentio/analytics-ios-iads-attribution) middleware library in your iOS source application.

If you are using Cocoa Pods, ensure the following two lines are included:

```ruby
pod "Analytics"
pod "Analytics-iAds-Attribution"
```

Segment and Kitemetrics can automatically record the following events: "Application Installed", "Application Opened", "Application Updated" and "In-App Purchases". In order to capture those events you need to enable automatic tracking. Ensure you set up [SEGAnalyticsConfiguration](/docs/segment/connections/sources/catalog/libraries/mobile/ios/) as shown below:

Swift

```swift
let configuration = SEGAnalyticsConfiguration(writeKey: "YOUR_WRITE_KEY")
configuration.trackApplicationLifecycleEvents = true
configuration.trackInAppPurchases = true
configuration.middlewares = [SEGADTracker.middleware()]
SEGAnalytics.setup(with: configuration)
```

Objective-C

```objc
SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
configuration.trackApplicationLifecycleEvents = YES;
configuration.trackInAppPurchases = YES;
configuration.middlewares = @[ [SEGADTracker middleware] ];
[SEGAnalytics setupWithConfiguration:configuration];
```

Kitemetrics will show the device installs, sessions and purchases on the Analytics Dashboard. Apple Search Ads keyword attribution and average revenue per user will show up at the Keywords page.

## Screen

If you're not familiar with the Segment Specs, take a look to understand what the [Screen method](/docs/segment/connections/spec/screen/) does. You can turn on automatic screen tracking and/or call it manually. An example manual call would look like:

Swift

```swift
SEGAnalytics.shared().screen("Screen Title")
```

Objective-C

```objc
[[SEGAnalytics sharedAnalytics] screen:@"Screen Title"];
```

To turn on automatic screen tracking, set the SEGAnalyticsConfiguration, recordScreenViews property to true.

Swift

```swift
configuration.recordScreenViews = true
```

Objective-C

```objc
configuration.recordScreenViews = YES;
```

Screen calls will be sent to Kitemetrics as a `custom event`. They are available for selection as a KPI in Settings -> KPI. Screen calls can be a maximum of 255 characters. Do not include personally identifiable information. Omit parameters or attributes from the Screen Call.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Kitemetrics  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field   | Description                                                                                         | Required | Type   |
| ------- | --------------------------------------------------------------------------------------------------- | -------- | ------ |
| API Key | You can find your API key on your Kitemetrics Account Settings -> Applications -> Application page. | Yes      | string |
