# Segment

Information note **Segment extraction is supported by Stitch**   
This integration is certified by Stitch. For support, contact [Support](https://community.qlik.com/t5/Support/ct-p/qlikSupport).

## Segment feature snapshot

A high-level look at Stitch's Segment (v1) integration, including release status, useful links, and the features supported in Stitch.

| **STITCH** |  |  |  |
| --- | --- | --- | --- |
| **[Release status](https://help.qlik.com/en-US/stitch/integrations/identify-an-integration-version)** | Released | **Supported by**<br><br>the Info icon<br><br>Indicates if the integration is supported by Stitch or the Singer community. | [Stitch](https://community.qlik.com/t5/Support/ct-p/qlikSupport) |
| **Stitch plan**<br><br>the Info icon<br><br>The type of Stitch plan required to use the integration. | Standard | **[API availability](https://help.qlik.com/en-US/stitch/developers/stitch-connect/guides/source-destination-reference)**<br><br>the Info icon<br><br>Indicates if the integration is available as a source in Stitch Connect. | the Remove icon<br><br>This version of the integration isn't available via the API.<br><br><br>Not available |
| **Singer GitHub repository** | Not applicable |  |  |
| **REPLICATION SETTINGS** |  |  |  |
| **[Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling where an integration's Replication Frequency is anchored to a time you select. | the Remove icon<br><br>Anchor Scheduling is not supported for this integration. The only available replication scheduling method is the Replication Frequency setting.<br><br><br>Unsupported | **[Advanced Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling that allows you to specify granular start times for data extraction using cron expressions. | the Remove icon<br><br>Advanced Scheduling is not supported for this integration.<br><br><br>Unsupported |
| **Table-level reset**<br><br>the Info icon<br><br>Indicates if data can be reset at the table level. If unsupported, data can only be reset at the integration level. | the Remove icon<br><br>Table-level resets are not supported for this integration. Resets are only supported at the integration level.<br><br><br>Unsupported | **[Configurable Replication Methods](https://help.qlik.com/en-US/stitch/replication/replication-methods)**<br><br>the Info icon<br><br>Indicates if Replication Methods can be defined by you for tables in the integration. | the Remove icon<br><br>Configurable Replication Methods are not supported for this integration. Stitch will use pre-defined replication methods for tables you set to replicate.<br><br><br>Unsupported |
| **DATA SELECTION** |  |  |  |
| **Table selection**<br><br>the Info icon<br><br>The ability to select individual tables for replication in the Stitch interface. If table selection is unavailable, all tables and all the columns they contain will be set to replicate by default. | the Remove icon<br><br>Table selection is not supported for this integration. All available table and fields will be automatically selected for replication.<br><br><br>Unsupported | **Column selection**<br><br>the Info icon<br><br>The ability to select individual columns for replication in the Stitch interface. If column selection is unavailable, all columns will be set to replicate by default. | the Remove icon<br><br>Column selection is not supported for this integration. All available columns in tables set to replicate will be selected.<br><br><br>Unsupported |
| **Select all**<br><br>the Info icon<br><br>Indicates if the integration supports selecting all available tables and columns. | the Success icon<br><br>Supported<br><br><br>Supported |  |  |
| **TRANSPARENCY** |  |  |  |
| **[Extraction Logs](https://help.qlik.com/en-US/stitch/replication/extractions/integration-extraction-logs)**<br><br>the Info icon<br><br>Logs detailing the Extraction phase of the replication process for a given integration. Includes error info, should an error occur. | the Remove icon<br><br>This feature is not supported for this version of the integration.<br><br><br>Unsupported | **[Loading Reports](https://help.qlik.com/en-US/stitch/replication/integration-loading-reports)**<br><br>the Info icon<br><br>Reports detailing the Loading phase of the replication process for a given integration. Includes the number of rows loaded for each table and error info, should an error occur. | the Remove icon<br><br>This feature is not supported for this version of the integration.<br><br><br>Unsupported |

## Connecting Segment

Connecting your Segment data to Stitch is a three-step process:

1. [Add Stitch as a selective integration](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#stitch-selective-integration)
2. [Add Segment as a Stitch data source](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#add-stitch-data-source)
3. [Authorizing Stitch to access Segment](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#authorize-stitch)

### Add Stitch as a Selective Integration

All data collected by Segment is sent to us by default, but if individual snippets on your site specify which integrations data should be sent to, then these settings will be overridden.

**If you use [selective integration snippets](https://segment.com/docs/libraries/analytics.js/#selecting-integrations)**, you’ll need to add Stitch to the list of integrations before data will flow to your data warehouse.

Here’s an example of a snippet that sends data to Stitch, Mixpanel, and KISSMetrics **only**:

```
}, {
  integrations: {
    'All': false,
    'Stitch': true,            // 'true' indicates if the integration receives data
    'Mixpanel': true,
    'KISSmetrics': true
   }
});
```

When you add Stitch to your snippet, make sure you enter Stitch **exactly** as it appears in the example above.

### Add Segment as a Stitch data source

1. [Sign into your Stitch account](https://app.stitchdata.com/).

2. On the Stitch Dashboard page, click the **Add Integration** button.

3. Click the **Segment** icon.

4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

   For example, the name “Stitch Segment” would create a schema called `stitch_segment` in the destination. **Note**: Schema names cannot be changed after you save the integration.

5. Click **Enable With Segment**.

### Authorize Stitch to Access Segment

Lastly, you’ll be directed to Segment’s website to complete the setup.

1. Enter your Segment credentials and click **Login**.
2. From the dropdown menu, select the **Source** you want to send data from. **Note that Stitch will only ever read your data.**
3. Click **Send Data.**
4. After the authorization process successfully completes, you’ll be redirected back to Stitch.
5. Click **All Done**.

## Replicating Segment Data

Stitch uses what is called a [direct integration](https://segment.com/docs/partners/direct-integration/) to integrate with Segment. This is a webhook-based method of sending your Segment data to integrations. Unlike REST or SOAP APIs, **webhooks deliver data as it happens in real-time**.

In the event that our webhook service experiences downtime, you may notice some lag between an event occurring and the data appearing in your data warehouse.

## Segment Schema

Each of Segment’s endpoints contains a set of fields unique to that endpoint along with a set of common fields. Common fields are the same across all of Segment’s endpoints.

Common fields describe user identity, timestamping, device, network, and so on. For a full list of these fields, check out Segment’s [Common Fields](https://segment.com/docs/spec/common/) Spec.

### Included Tables

Stitch's Segment integration includes these tables:

* [group](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#group)
* [identify](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#identify)
* [page](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#page)
* [screen](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#screen)
* [track](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#track)

identify Replication Method: Incremental (Webhook) Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key. Primary Key: message\_id Contains Nested Structures?: No The identify table contains all user info. Table Info & Attributes

### identify Attributes

While we try to include everything Segment has here, **this may not be a full list of attributes.** Refer to [Segment's documentation](https://segment.com/docs/spec/identify/) for a full list and description of each attribute.

* Message ID (`message_id`)

* [Customer Traits](https://segment.com/docs/spec/identify/#traits)

* [Common Fields](https://segment.com/docs/spec/common/)

#### page

**Replication Method:** Incremental (Webhook)

Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key.

  
**Primary Key:** `message_id`   
**Contains Nested Structures?:** No

The `page` table contains info about page events, along with any data about page properties.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#page-data)

### page Attributes

While we try to include everything Segment has here, **this may not be a full list of attributes.** Refer to [Segment's documentation](https://segment.com/docs/spec/page/) for a full list and description of each attribute.

* Message ID (`message_id`)

* [Page Name](https://segment.com/docs/spec/page#name)

* [Page Properties](https://segment.com/docs/spec/page#properties)

* [Common Fields](https://segment.com/docs/spec/common/)

#### screen

**Replication Method:** Incremental (Webhook)

Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key.

  
**Primary Key:** `message_id`   
**Contains Nested Structures?:** No

The `screen` table contains info about screen events, along with any data about screen properties.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#screen-data)

### screen Attributes

While we try to include everything Segment has here, **this may not be a full list of attributes.** Refer to [Segment's documentation](https://segment.com/docs/spec/screen/) for a full list and description of each attribute.

* Message ID (`message_id`)

* [Screen Name](https://segment.com/docs/spec/screen#name)

* [Screen Properties](https://segment.com/docs/spec/screen#properties)

* [Common Fields](https://segment.com/docs/spec/common/)

#### track

**Replication Method:** Incremental (Webhook)

Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key.

  
**Primary Key:** `message_id`   
**Contains Nested Structures?:** No

The `track` table contains user action info.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#track-data)

### Semantic & Standardized Events

For info on semantic events - or Segment’s standardized event names and properties - [check out their docs](https://segment.com/docs/spec/semantic/).

### track Attributes

While we try to include everything Segment has here, **this may not be a full list of attributes.** Refer to [Segment's documentation](https://segment.com/docs/spec/track/) for a full list and description of each attribute.

* Message ID (`message_id`)

* [Event Name](https://segment.com/docs/spec/track#name)

* [Event Properties](https://segment.com/docs/spec/track#properties)

* [Common Fields](https://segment.com/docs/spec/common/)

#### group

**Replication Method:** Incremental (Webhook)

Key-based Incremental Replication is a replication method in which Stitch identifies new and updated data using a column called a Replication Key.

  
**Primary Key:** `message_id`   
**Contains Nested Structures?:** No

The `group` table contains info about groups, which is how individual users are associated with companies, accounts, projects, teams, and so on.

[Table Info & Attributes](https://help.qlik.com/en-US/stitch/integrations/webhooks/segment#group-data)

### group Attributes

While we try to include everything Segment has here, **this may not be a full list of attributes.** Refer to [Segment's documentation](https://segment.com/docs/spec/track/) for a full list and description of each attribute.

* Message ID (`message_id`)

* [Group Traits](https://segment.com/docs/spec/group/#traits)

* [Common Fields](https://segment.com/docs/spec/common/)