UserMirror + Segment

Prerequisites

End-to-end UserMirror and Segment data flow diagram

There are two simple ways of configuring secure analytics with Segment:

  1. Update api_host option. All of the Segment libraries allow you to call .options({ api_host }) where you can pass in the origin proxy.

  2. Install analytics-encryption plugin. This is a UserMirror-built language-specific wrapper for analytics libraries to manage encryption. Install here

If you're using Analytics.js in the browser, you can add a line to changing api_host from api.segment.io to the URL of the origin proxy. The URL looks like: https://d291lgc8l.execute-api.us-west-2.amazonaws.com/a/

End-to-end UserMirror and Segment data flow diagram

If you're using another language library, look at the configuration options in the Segment docs.

2. Installing analytics-encryption ALPHA

The analytics-encryption library gives you a few options. You can automatically configure Analytics.js to use your origin proxy to encrypt before sending to Segment and other vendors.

Encrypt through UserMirror Origin Proxy

<script
  data-proxy-url="https://USERMIRROR_ORIGIN_PROXY_URL"
  src="https://unpkg.com/[email protected]^1/lib/auto.js"
/>

Alternatively, if you want the enduser's browser to request a key to encrypt the data first, which gets saved in their browser or bundled with your JavaScript.

Encrypt by requesting keys from UserMirror Key Management

<script
  data-use-kms="https://USERMIRROR_KMS_URL"
  src="https://unpkg.com/[email protected]^1/lib/auto.js"
/>

Here are the Segment products we support:

Segment Product
Supported
Core Pipeline
Personas
Connections · S3
Connections · Webhooks
Connections · Redshift
Connections · Postgres
Connections · Intercom
Connections · Mixpanel
SOON
Connecitons · BigQuery
SOON
Connections · Snowflake
SOON
Connections · All
SOON