Segmentの統合(レガシー)

Optimizelyマニュアル|顧客データとイベントをOptimizely Data Platformにインポートするためのレガシーセグメント統合ガイド。

注記

これはレガシー統合です。 新しい Twilio Segmentのパススルー統合については、 「Twilio Segmentの統合」を参照してください

Optimizely Data Platform (ODP) とSegmentの統合により、Segmentで収集されたイベントやその他の顧客データを ODP にインポートできます。

Segmentの構成

ODP Segment統合を有効にします。

  1. [Account設定] > [統合] > [Segment]に移動します。

  2. [Segmentを有効にする]をオンに切り替えます。

  3. [サインイン]を選択し、Segmentのプロンプトに従います。

注記

ブラウザに広告ブロックまたはコンテンツブロック ソフトウェアがインストールされている場合は、「サインイン」のオプションが表示されない場合があります。 表示されない場合は、ブロック技術をオフにしてページを更新してください。

データ詳細

ODP は、Segment.io の次のイベント タイプと各イベント タイプに関連付けられた標準フィールドを使用して、対応する ODP イベントを自動的に作成します。

以下の表は、Segment.io の共通フィールドと、ODP イベントの対応するフィールドの概要を示しています。

Segmentフィールド

ODPフィールド

anonymousID

segment_anonymous_id

userID

segment_user_id

timestamp

ts

context.locale

language

context.page.path

page

context.referrer.url

referrer

context.page.search

search_term

context.page.title

title

context.page.url

hostname

context.ip

ip

context.user_agent

ua

context.timezone

timezone

context.campaign.name

campaign

context.campaign.source

source

context.campaign.medium

medium

context.campaign.term

keywords

context.campaign.content

content

識別する

Identify は、Segment anonymousIdを使用して匿名ユーザーを追跡します。 ユーザーが電子メール アドレスまたは別の顧客 ID で識別されるとすぐに、Segment はこのデータ セットを匿名のアクティビティと自動的にマージします。 ODP は同じアプローチを使用しており、Segment統合によりこれら 2 つのデータ セットが統合されます。

Segmentには、識別イベント用の次の標準フィールドもあり、ODP はそれらを対応するフィールドにマップします。

Segmentフィールド

ODPフィールド

traits.firstName

first_name

traits.lastName

last_name

traits.name

name

traits.email

email

traits.address.county

country

traits.address.state

state

traits.address.city

city

traits.address.postalCode

zip

traits.address.street

street1

traits.avatar

image_url

traits.phone

phone

traits.gender

gender

ODP は、Segmentの識別イベントで見つかった他のフィールドをカスタム フィールドとして適用します。

追跡

Segment トラック イベントとプロパティを処理できます。 さらに、ODP は次の特別なセマンティック イベントを実装しています。その構造はSegmentのサイトで確認できます。

これらのセマンティック イベントは、標準の ODP イベントにある特定の ODP event_typeとアクションのペアに対応します。 以下は、各Segmentのセマンティック イベントから ODP のイベント タイプとアクションまでを詳細に示した表です。

Segmentイベント

ODP イベントの種類

ODP アクション

navigation

search

navigation

list

navigation

filter

promotion

view

promotion

click

product

click

product

detail

product

add_to_cart/ remove_from_cart

cart

view

checkout

start

checkout

step_view

checkout

step_complete

checkout

payment_info_enter

order

purchase

order

purchase

order

refund

order

cancel

checkout

coupon_enter

checkout

coupon_apply

checkout

coupon_deny

checkout

coupon_remove

product

add_to_wishlist/ remove_from_wishlist

product

share

cart

share

product

review

email

soft_bounce

email

open

email

click

email

spamreport

email

unsubscribe

navigation

category

product

detail

product

add_to_cart/ remove_from_cart

order

purchase

リストにないイベントを追跡する

Segment イベントが提供されたセマンティクスのいずれにも適合しない場合、ODP はイベントを次のようにマップします。

  • イベントタイプ:「トラック」

  • アクション: 「あなたのイベント」

ODP イベント タイプの順序に対応するSegment イベントには、ODP フィールドに対応する特別なプロパティがあります。

Segmentフィールド

ODPフィールド

properties.order_id

order.order_id

properties.total

order.order_total

properties.revenue

order.order_subtotal

properties.discount

order.order_discount

properties.tax

order.order_tax

properties.coupon

order.coupon_code

注文イベントのプロパティには、各製品のフィールドがリストされる場合もあります。 以下は、注文のSegment製品プロパティと対応する ODP フィールドのリストです。

Segmentフィールド

ODPフィールド

properties.products.$.id

order.items.$.product_id

properties.products.$.product_id

order.items.$.product_id

properties.products.$.sku

order.items.$.sku

properties.products.$.price

order.items.$.item_price

properties.products.$.quantity

order.items.$.item_quantity

N/A

order.items.$.item_subtotal*

注文品目小計

Segmentには、特定の注文の品目ごとに小計を表示するフィールドがありません。 ODP は、このフィールドをorder_item.price * order_item.quantityとして計算します。

ページ/画面

Segment ページ イベントは、 ODP ではページビュー イベント タイプとして表示されます。 以下は、ページ イベントの標準Segment フィールドと対応する ODP フィールドのリストです。

Segmentフィールド

ODPフィールド

properties.path

page

properties.name

name

properties.referrer

referrer

properties.search

search_term

properties.title

title

Eメール

すべてのSegment イベントの標準フィールドは、電子メール イベントの ODP フィールドにマップされます。

すでに電子メール サービス プロバイダー (ESP) を直接統合している場合は、電子メールのセマンティック イベントは ESP から直接キャプチャされるため、送信する必要はありません。

カスタムフィールドのサポート

ODP はSegment イベントのカスタム フィールドをサポートします。 カスタム フィールドは、特定のSegment イベントの特性オブジェクトまたはプロパティ オブジェクトに配置する必要があります。

例: Segment.io イベント (プロパティ オブジェクトの「myCustomField」キーに注意してください)

{

"anonymousId": "23adfd82-aa0f-45a7-a756-24f2a7a4c895",

"context": {

"library": {

"name": "analytics.js",

"version": "2.11.1"

},

"page": {

"path": "/academy/",

"referrer": "",

"search": "",

"title": "Analytics Academy",

"url": "https://segment.com/academy/"

},

"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36",

"ip": "108.0.78.21"

},

"event": "Course Clicked",

"integrations": {},

"messageId": "ajs-f8ca1e4de5024d9430b3928bd8ac6b96",

"properties": {

"title": "Intro to Analytics",

"myCustomField": "my_custom_field_value"

},

"receivedAt": "2015-12-12T19:11:01.266Z",

"sentAt": "2015-12-12T19:11:01.169Z",

"timestamp": "2015-12-12T19:11:01.249Z",

"type": "track",

"userId": "AiUGstSDIg",

"originalTimestamp": "2015-12-12T19:11:01.152Z"

}