同意の管理
ユーザー同意を追跡することは、GDPRやCCPAなどの規制を遵守するために非常に重要であり、ユーザーの満足度を維持するための良い慣行です。私たちは、きめ細やかな同意追跡に対して広範なサポートを提供しています。
ユーザーのプロファイルデータに対するオペレーションは、メッセージタイプ consent
を使用します。
オペレーション
operations
パラメータは、オペレーションの配列を受け取ります。これらは次のタイプになります。
- set - タイプと値に対して同意を追加する
- unset - タイプと値に対して同意を削除する
設定
シンプルな同意
以下の例のように基本的なユーザー同意を設定できます。これは、ユーザーが person@example.com
というアドレスで email
に同意したことを示します。
{
"type": "consent",
// オペレーション
"operations": [{
"type": "set",
"key": "email",
"value": "person@example.com"
}],
// メッセージの一般的なプロパティ
"writeKey": "<WRITE_KEY>",
"messageId": "213d7f53-ffac-4a58-a20b-5d609455d64c",
"timestamp": "2022-11-15T04:31:44Z",
"userId": "5.wBOQ7hKNVgIUcJn5IbX.1670273082",
"sessionId": "28eef5c8-1098-4f76-abe9-58a921cabfaf",
"pageId": "eca34e0f-4802-4fa4-8db1-11c727839dbd"
"context": {
"page": {
"url": "https://www.weather-station.com/",
"path": "/",
"referrer": "",
"title": "Weather Station - Get Weather"
},
}
}
"operations": [
{
"type": "set",
"key": "email",
"value": "person@example.com",
"purpose": [
{
"type": "marketing",
"topics": [
"Men's Clothing",
"Men's Accessories"
]
}
]
}
]
}
]
目的の追加
ユーザーは特定の目的(例:「マーケティング」)にのみ同意を与える場合があります。これらの詳細を purpose
属性を追加することでsetオペレーションに追加できます。これはオブジェクトの配列であり、目的の type
が提供されます。
この例は、「マーケティング」と「トランザクション」の両方のEメールに対する同意を追加します。
{
"type": "consent",
// オペレーション
"operations": [{
"type": "set",
"key": "email",
"value": "person@example.com",
"purpose": [
{
"type": "marketing"
},
{
"type": "transactional"
}
]
}],
// メッセージの一般的なプロパティ
"writeKey": "<WRITE_KEY>",
"messageId": "213d7f53-ffac-4a58-a20b-5d609455d64c",
"timestamp": "2022-11-15T04:31:44Z",
"userId": "5.wBOQ7hKNVgIUcJn5IbX.1670273082",
"sessionId": "28eef5c8-1098-4f76-abe9-58a921cabfaf",
"pageId": "eca34e0f-4802-4fa4-8db1-11c727839dbd"
"context": {
"page": {
"url": "https://www.weather-station.com/",
"path": "/",
"referrer": "",
"title": "Weather Station - Get Weather"
},
}
}
トピックの追加
ユーザーは、特定の目的について特定のトピックでのみ連絡を受けることを希望する場合があります。例えば、ユーザーは「紳士靴」や「ブライダルウェア」に関する「マーケティング」資料のみを受け取りたい場合があります。
この例は、「マーケティング」の目的にトピックを追加します。
{
"type": "consent",
// オペレーション
"operations": [{
"type": "set",
"key": "email",
"value": "person@example.com",
"purpose": [
{
"type": "marketing",
"topics": ["Men's Shoes", "Bridal wear"]
},
{
"type": "transactional"
}
]
}],
// メッセージの一般的なプロパティ
"writeKey": "<WRITE_KEY>",
"messageId": "213d7f53-ffac-4a58-a20b-5d609455d64c",
"timestamp": "2022-11-15T04:31:44Z",
"userId": "5.wBOQ7hKNVgIUcJn5IbX.1670273082",
"sessionId": "28eef5c8-1098-4f76-abe9-58a921cabfaf",
"pageId": "eca34e0f-4802-4fa4-8db1-11c727839dbd"
"context": {
"page": {
"url": "https://www.weather-station.com/",
"path": "/",
"referrer": "",
"title": "Weather Station - Get Weather"
},
}
}
WARNING
トピックが提供された場合、特定の目的の既存のトピックは上書きされます。ただし、空の配列(例:topics: []
)を送信してすべてのトピックを削除することはできません。
解除
この例は、メールアドレス person@example.com
の email
同意を削除します。Unsetは purpose
や topics
を受け付けず、これらは set
タイプを使用した場合にのみ変更できます。
{
"type": "consent",
// オペレーション
"operations": [{
"type": "unset",
"key": "email",
"value": "person@example.com"
}],
// メッセージの一般的なプロパティ
"writeKey": "<WRITE_KEY>",
"messageId": "213d7f53-ffac-4a58-a20b-5d609455d64c",
"timestamp": "2022-11-15T04:31:44Z",
"userId": "5.wBOQ7hKNVgIUcJn5IbX.1670273082",
"sessionId": "28eef5c8-1098-4f76-abe9-58a921cabfaf",
"pageId": "eca34e0f-4802-4fa4-8db1-11c727839dbd"
"context": {
"page": {
"url": "https://www.weather-station.com/",
"path": "/",
"referrer": "",
"title": "Weather Station - Get Weather"
},
}
}