サポートされているベンダー統合
この記事では、Tealium iQ Consent IntegrationsでサポートされているCMPについて説明し、Consent Integrationsの構成を完了するために必要なベンダー固有の情報を簡単に収集する方法について説明します。
仕組み
Tealium iQ Consent Integrationsは、様々な同意管理プラットフォーム(CMP)との統合をサポートしています。サポートされている同意管理プラットフォーム(CMP)のユーザーインターフェースまたはウェブページから、関連するベンダー固有の情報にアクセスできます。このドキュメントを信頼性が高くユーザーフレンドリーに保つために、このセクションではウェブページからベンダー固有の情報を取得する手順のみをカバーしています。各パートナーCMPのユーザーインターフェースでベンダーIDと目的を取得する手順については、各CMPのドキュメントを参照してください。
ウェブページから関連情報を取得するには、以下の手順に従ってください:
- CMPが実装されているウェブサイトを訪問します。
- すべてのトラッキングを受け入れます。
- 開発者ツールのJavaScriptコンソールを開きます。
- 下記のコードスニペットからCMP固有のコードを開発者ツールのJavaScriptコンソールに貼り付けます。
- 表示されたベンダーID、目的キー、および目的名をあなたのConsent Integrationに入力します。
同意決定を更新した後、最新の解釈を確認するためにコードを再度貼り付けてください。
統合固有の指示とコードスニペット
Cookiebot
cookiebot.comまたはあなたのウェブサイトでこのスニペットをテストし、仕組みセクションの指示に従って互換性を確認し、統合に必要な情報を取得してください。
;(function cookiebotIntegration (window) {
window.tealiumCmpIntegration = window.tealiumCmpIntegration || {}
window.tealiumCmpIntegration.cmpName = 'Cookiebot'
window.tealiumCmpIntegration.cmpIntegrationVersion = 'v1.0.0'
window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision = cmpFetchCurrentConsentDecision
window.tealiumCmpIntegration.cmpFetchCurrentLookupKey = cmpFetchCurrentLookupKey
window.tealiumCmpIntegration.cmpCheckIfOptInModel = cmpCheckIfOptInModel
window.tealiumCmpIntegration.cmpCheckForWellFormedDecision = cmpCheckForWellFormedDecision
window.tealiumCmpIntegration.cmpCheckForExplicitConsentDecision = cmpCheckForExplicitConsentDecision
window.tealiumCmpIntegration.cmpCheckForTiqConsent = cmpCheckForTiqConsent
window.tealiumCmpIntegration.cmpConvertResponseToGroupList = cmpConvertResponseToGroupList
// GDPRスタイルの「オプトイン」モデルを実行しているかどうかを真偽値で返す必要があります
function cmpCheckIfOptInModel () {
if (!window.Cookiebot || !window.Cookiebot.regulations || typeof window.Cookiebot.regulations.gdprApplies !== 'boolean') return false
return Cookiebot.regulations.gdprApplies
}
// 必要な情報についてのCMP固有の生オブジェクト(オブジェクトでなければならない)を返す必要があります。
// この出力は、以下の関数でcmpRawOutput引数として使用されます。
function cmpFetchCurrentConsentDecision () {
if (!window.Cookiebot || typeof window.Cookiebot.hasResponse !== 'boolean') return false
return cmpRawOutput = window.Cookiebot.consent;
}
// Tealium iQが正しいCMP構成を持っていることを確認するのに役立つ文字列を返す必要があります(他のページ/ CMPの顧客ではない)
function cmpFetchCurrentLookupKey() {
if (!window.Cookiebot || typeof window.Cookiebot.serial !== 'string') return false
return Cookiebot.serial
}
// 生の決定がCMPの期待に合っているかどうかを真偽値で返す必要があります
function cmpCheckForWellFormedDecision (cmpRawOutput) {
return typeof cmpRawOutput === 'object' && typeof cmpRawOutput.stamp ==='string'
}
// 同意決定がユーザーによって明示的に行われたかどうかを真偽値で返す必要があります
function cmpCheckForExplicitConsentDecision (cmpRawOutput) {
// この例では、決定が明示的であるかどうかを判断する唯一の方法は、オプトアウトクッキーが構成されているかどうかを確認することです
return cmpRawOutput.method === 'explicit'? true : false;
}
// 同意されたベンダー/目的の配列を返す必要があります - これらはTealium iQの目的と正確に一致する必要があります
function cmpConvertResponseToGroupList(cmpRawOutput) {
var consentDecision = []
// データの販売/共有が許可されているかどうかを判断するために、空でないオプトアウトクッキーを非常に単純にチェックします
if (cmpRawOutput.necessary) {
consentDecision.push('necessary') // クッキーが見えないので、データの販売/共有が問題ないと仮定しなければなりません
}
if (cmpRawOutput.preferences) {
consentDecision.push('preferences') // クッキーが見えないので、データの販売/共有が問題ないと仮定しなければなりません
}
if (cmpRawOutput.marketing) {
consentDecision.push('marketing') // クッキーが見えないので、データの販売/共有が問題ないと仮定しなければなりません
}
if (cmpRawOutput.statistics) {
consentDecision.push('statistics') // クッキーが見えないので、データの販売/共有が問題ないと仮定しなければなりません
}
return consentDecision
}
// この関数やそれ以下のものを変更する必要はありません
function cmpCheckForTiqConsent (cmpRawOutput, tiqGroupName) {
// 理解できないものはオプトアウトとして扱います
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return false
tiqGroupName = tiqGroupName || 'tiq-group-name-missing'
var allowedGroups = cmpConvertResponseToGroupList(cmpRawOutput)
return allowedGroups.indexOf(tiqGroupName) !== -1
}
})(window)
/*
// デバッグ/開発出力 - このブロックのコメントを外し、このテンプレート全体をテストページに貼り付け/再貼り付けしてください
var outputString = `${tealiumCmpIntegration.cmpCheckIfOptInModel() ? 'Opt-in' : 'Opt-out'} Model
Checks:
- id: ${tealiumCmpIntegration.cmpFetchCurrentLookupKey()}
- well-formed: ${tealiumCmpIntegration.cmpCheckForWellFormedDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- explicit: ${tealiumCmpIntegration.cmpCheckForExplicitConsentDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- group list: ${JSON.stringify(tealiumCmpIntegration.cmpConvertResponseToGroupList(tealiumCmpIntegration.cmpFetchCurrentConsentDecision()))}
`
console.log(outputString);
*/
Didomi
Didomi.ioまたは上記の手順に従ってあなたのウェブサイトでこのスニペットをテストして、互換性を確認し、統合に必要な情報を取得してください。
Didomi統合は、ベンダーを目的として使用します。
現在のDidomiとの統合では、暗黙の同意された目的やベンダーは返されません。これは当時利用可能な唯一のオプションでした。古いバージョンを使用している顧客をサポートし、新しいアプローチを可能にする更新が行われるまで、この統合は無条件にalways_consented
という目的キーをアウトバウンドの同意決定に追加します。これは暗黙のトリガーを可能にするための回避策として機能します。
;(function didomiIntegration (window) {
// CMP specific functionality and labels
window.tealiumCmpIntegration = window.tealiumCmpIntegration || {}
window.tealiumCmpIntegration.cmpName = 'Didomi'
window.tealiumCmpIntegration.cmpIntegrationVersion = 'didomi-1.0.1'
window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision = cmpFetchCurrentConsentDecision
window.tealiumCmpIntegration.cmpFetchCurrentLookupKey = cmpFetchCurrentLookupKey
window.tealiumCmpIntegration.cmpCheckIfOptInModel = cmpCheckIfOptInModel
window.tealiumCmpIntegration.cmpCheckForWellFormedDecision = cmpCheckForWellFormedDecision
window.tealiumCmpIntegration.cmpCheckForExplicitConsentDecision = cmpCheckForExplicitConsentDecision
window.tealiumCmpIntegration.cmpCheckForTiqConsent = cmpCheckForTiqConsent
window.tealiumCmpIntegration.cmpConvertResponseToGroupList = cmpConvertResponseToGroupList
window.tealiumCmpIntegration.cmpConvertResponseToLookupObject = cmpConvertResponseToLookupObject
function cmpCheckIfOptInModel () {
if (!window.Didomi || typeof window.Didomi.getConfig !== 'function') return false
return window.Didomi.getConfig().notice.type === 'optin'
}
function cmpFetchCurrentConsentDecision () {
if (!window.Didomi || typeof window.Didomi.getUserStatus !== 'function') return false
if (typeof window.Didomi.getConfig !== 'function') return false
var cmpRawOutput = {}
cmpRawOutput.userStatus = window.Didomi.getUserStatus()
cmpRawOutput.vendorInfo = window.Didomi.getVendors()
cmpRawOutput.shouldConsentBeCollected = window.Didomi.shouldConsentBeCollected()
return cmpRawOutput
}
function cmpFetchCurrentLookupKey () {
if (!window.Didomi || typeof window.Didomi.getConfig !== 'function') return ''
var id = window.Didomi.getConfig().app.deploymentId
return id || ''
}
function cmpCheckForWellFormedDecision (cmpRawOutput) {
// treat things we don't understand as an opt-out
if (typeof cmpRawOutput !== 'object') return false
if (typeof cmpRawOutput.userStatus !== 'object') return false
// do more checks than strictly necessary to confirm expectations
if (typeof cmpRawOutput.userStatus.purposes !== 'object') return false
if (typeof cmpRawOutput.userStatus.vendors !== 'object') return false
if (typeof cmpRawOutput.userStatus.purposes.global !== 'object') return false
if (typeof cmpRawOutput.userStatus.vendors.global !== 'object') return false
if (toString.call(cmpRawOutput.userStatus.purposes.global.enabled) !== '[object Array]') return false
if (toString.call(cmpRawOutput.userStatus.vendors.global.enabled) !== '[object Array]') return false
if (typeof cmpRawOutput.vendorInfo !== 'object') return false
if (typeof cmpRawOutput.shouldConsentBeCollected !== 'boolean') return false
return true
}
function cmpCheckForExplicitConsentDecision (cmpRawOutput) {
// treat things we don't understand as an opt-out
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return false
return cmpRawOutput.shouldConsentBeCollected === false // false after an explicit decision is made
}
function cmpConvertResponseToGroupList (cmpRawOutput) {
// Didomi handles checking each vendor's required purposes
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return []
// enforce strings, even for IAB vendor ids
const decision = cmpRawOutput.userStatus.vendors.global.enabled.map(function (vendorId) {
return String(vendorId)
})
decision.push('always_consented')
return decision
}
function cmpConvertResponseToLookupObject (cmpRawOutput) {
var allowedVendors = cmpConvertResponseToGroupList(cmpRawOutput)
var allVendors = cmpRawOutput.vendorInfo
var lookupObject = {}
// WORKAROUND to allow implicit triggering until the Didomi bug is fixed
lookupObject.always_consented = 'Always consented (to allow strictly needed triggering)'
allVendors.forEach(function (vendorObject) {
if (allowedVendors.indexOf(String(vendorObject.id)) === -1) return
lookupObject[vendorObject.id] = vendorObject.name || 'iab-vendor-' + vendorObject.id
})
return lookupObject
}
function cmpCheckForTiqConsent (cmpRawOutput, tiqGroupName) {
// treat things we don't understand as an opt-out
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return false
tiqGroupName = tiqGroupName || 'tiq-group-name-missing'
var allowedGroups = cmpConvertResponseToGroupList(cmpRawOutput)
return allowedGroups.indexOf(tiqGroupName) !== -1
}
})(window)
// Debugging / development output - repaste the integration on your test pages each time you make a change to your consent state
var outputString = `CMP Found: ${window.tealiumCmpIntegration.cmpName} (${window.tealiumCmpIntegration.cmpCheckIfOptInModel() ? 'Opt-in' : 'Opt-out'} Model)
Checks:
- id: ${window.tealiumCmpIntegration.cmpFetchCurrentLookupKey()}
- well-formed: ${window.tealiumCmpIntegration.cmpCheckForWellFormedDecision(window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- explicit: ${window.tealiumCmpIntegration.cmpCheckForExplicitConsentDecision(window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- group list: ${JSON.stringify(window.tealiumCmpIntegration.cmpConvertResponseToGroupList(window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision()))}
- name lookup: ${JSON.stringify(tealiumCmpIntegration.cmpConvertResponseToLookupObject(tealiumCmpIntegration.cmpFetchCurrentConsentDecision()), null, 6)}
`
console.log(outputString)
デジタルコントロールルーム
このスニペットを digitalcontrolroom.com またはあなたのウェブサイトでテストし、操作方法セクション の指示に従って互換性を確認し、統合に必要な情報を取得してください。
;(function digitalControlRoom(window) {
window.tealiumCmpIntegration = window.tealiumCmpIntegration || {};
window.tealiumCmpIntegration.cmpName = 'Digital Control Room';
window.tealiumCmpIntegration.cmpIntegrationVersion = 'v1.0.0';
window.tealiumCmpIntegration.cmpCheckIfOptInModel = cmpCheckIfOptInModel;
window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision = cmpFetchCurrentConsentDecision;
window.tealiumCmpIntegration.cmpFetchCurrentLookupKey = cmpFetchCurrentLookupKey;
window.tealiumCmpIntegration.cmpCheckForWellFormedDecision = cmpCheckForWellFormedDecision;
window.tealiumCmpIntegration.cmpCheckForExplicitConsentDecision = cmpCheckForExplicitConsentDecision;
window.tealiumCmpIntegration.cmpCheckForTiqConsent = cmpCheckForTiqConsent;
window.tealiumCmpIntegration.cmpConvertResponseToGroupList = cmpConvertResponseToGroupList;
function cmpCheckIfOptInModel() {
return (
window._cookiereports &&
window._cookiereports.panels &&
window._cookiereports.panels[0].consent &&
window._cookiereports.panels[0].consentExplicit
);
}
// This output is used as the cmpRawOutput argument in functions below.
function cmpFetchCurrentConsentDecision() {
if (!window._cookiereports) {
return {};
}
var levels = window._cookiereports.loadConsent();
levels[1] = true;
var output = { "levels": levels };
output.panels = window._cookiereports.panels;
return output;
}
// Should return a string that helps Tealium iQ confirm that it's got the right CMP configuration (and not one from some other page / customer of the CMP)
function cmpFetchCurrentLookupKey() {
if (window._cookiereports && window._cookiereports.panels && window._cookiereports.panels.length > 0)
return window._cookiereports.panels[0].storagekey;
return "";
}
function cmpCheckForWellFormedDecision(cmpRawOutput) {
if (typeof cmpRawOutput.levels !== "object" || cmpRawOutput.levels === null || typeof cmpRawOutput.panels !== "object" || cmpRawOutput.panels === null) {
return false;
}
return true;
}
// Should return a boolean - true if the consent decision was explicitly made by the user
function cmpCheckForExplicitConsentDecision(cmpRawOutput) {
if (cmpRawOutput && cmpRawOutput.panels)
return cmpRawOutput.panels[0].consentDecisionIsExplicit();
return false;
}
function cmpConvertResponseToGroupList(cmpRawOutput) {
if (!cmpCheckForWellFormedDecision(cmpRawOutput)) {
return ["1"];
}
var levels = cmpRawOutput.levels;
var consentDecision = [];
for (var key in levels) {
if (levels.hasOwnProperty(key)) {
if (levels[key] === true) {
consentDecision.push(key);
}
}
}
return consentDecision;
}
// You shouldn't need to change this function, or anything below it
function cmpCheckForTiqConsent(cmpRawOutput, tiqGroupName) {
// treat things we don't understand as an opt-out
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return false;
tiqGroupName = tiqGroupName || "tiq-group-name-missing";
var allowedGroups = cmpConvertResponseToGroupList(cmpRawOutput);
return allowedGroups.indexOf(tiqGroupName) !== -1;
}
})(window);
// Debugging / development output - uncomment this block, then paste/repaste this entire template on your test pages
/*
var outputString = `${tealiumCmpIntegration.cmpCheckIfOptInModel() ? "Opt-in" : "Opt-out"} Model
Checks:
- id: ${tealiumCmpIntegration.cmpFetchCurrentLookupKey()}
- well-formed: ${tealiumCmpIntegration.cmpCheckForWellFormedDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- explicit: ${tealiumCmpIntegration.cmpCheckForExplicitConsentDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- group list: ${JSON.stringify(tealiumCmpIntegration.cmpConvertResponseToGroupList(tealiumCmpIntegration.cmpFetchCurrentConsentDecision()))}
`;
console.log(outputString);
*/
OneTrust
このスニペットを https://onetrust.com または 上記の指示に従って あなたのウェブサイトでテストして、互換性を確認し、統合に必要な情報を取得してください。
OneTrustは構成をプレビューするためのテストモードを提供しており、ベンダーIDに -test
を追加することでアクティブになります。統合を簡素化するために、OneTrust Consent IntegrationsはベンダーIDから -test
接尾辞を削除します。シームレスな統合のために、ページで -test
接尾辞を使用している場合でも、Tealium iQ Consent Integrations UIで統合を構成する際には -test
を除いたベンダーIDを入力してください。Tealium iQ UIとアクティブな統合間でベンダーIDが一致しない場合、Tealium iQタグ管理はページ上でクッキーを構成したりタグをトリガーしたりすることができません。
OneTrustは cmpAddCallbackToTriggerRecheck
を通じてコールバック関数をサポートしています。これにより、Tealium iQはポーリングなしで同意状態の変更に関するリアルタイムの更新を受け取ることができます。詳細については、カスタムCMP統合を参照してください。
;(function oneTrust(window) {
// allows simple adjustment of the name/id behavior
var useNamesInsteadOfKeys = false;
// allow the safety check of the expected Vendor ID to be circumvented to simplify setup at the cost of increased risk
var disableVendorIdValidation = false;
// CMP specific functionality and labels
window.tealiumCmpIntegration = window.tealiumCmpIntegration || {};
window.tealiumCmpIntegration.cmpName = "OneTrust";
window.tealiumCmpIntegration.cmpIntegrationVersion = "onetrust-2.1.0";
window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision = cmpFetchCurrentConsentDecision;
window.tealiumCmpIntegration.cmpFetchCurrentLookupKey = cmpFetchCurrentLookupKey;
window.tealiumCmpIntegration.cmpCheckIfOptInModel = cmpCheckIfOptInModel;
window.tealiumCmpIntegration.cmpCheckForWellFormedDecision = cmpCheckForWellFormedDecision;
window.tealiumCmpIntegration.cmpCheckForExplicitConsentDecision = cmpCheckForExplicitConsentDecision;
window.tealiumCmpIntegration.cmpCheckForTiqConsent = cmpCheckForTiqConsent;
window.tealiumCmpIntegration.cmpConvertResponseToGroupList = cmpConvertResponseToGroupList;
window.tealiumCmpIntegration.cmpConvertResponseToLookupObject = cmpConvertResponseToLookupObject;
window.tealiumCmpIntegration.cmpAddCallbackToTriggerRecheck = cmpAddCallbackToTriggerRecheck;
function cmpCheckIfOptInModel() {
var decision = cmpFetchCurrentConsentDecision();
if (decision && decision.ConsentModel && decision.ConsentModel.Name === "opt-out") {
return false;
}
return true;
}
function cmpFetchCurrentConsentDecision() {
if (!window.OneTrust || typeof window.OneTrust.GetDomainData !== "function") return false;
var cmpRawOutput = window.OneTrust.GetDomainData();
cmpRawOutput.dataLayer = window.dataLayer;
return cmpRawOutput;
}
function cmpFetchCurrentLookupKey() {
// newer versions of OneTrust, starting at the end of 2022 no longer have cctId defined
// but this HTML attribute is the way OneTrust can tell
var scrapeOneTrustVendorId = function () {
var allScripts = document.getElementsByTagName("script");
var re = /\/otSDKStub\.js(\?.*)*$/;
for (var i = 0; i < allScripts.length; i++) {
var isOneTrustScript = re.test(allScripts[i].src); // can be null
if (isOneTrustScript) {
var fullVendorId = allScripts[i].getAttribute("data-domain-script"); // parse it from the script
return fullVendorId.split("-test")[0];
}
}
return "error-not-found";
}
if (disableVendorIdValidation) {
// just return whatever Vendor ID is expected be active
return (window.tealiumCmpIntegration && window.tealiumCmpIntegration.map && Object.keys(window.tealiumCmpIntegration.map)[0]) || "(Vendor ID check disabled)";
}
return scrapeOneTrustVendorId();
}
function cmpCheckForWellFormedDecision(cmpRawOutput) {
// treat things we don't understand as an opt-out
if (typeof cmpRawOutput !== "object") return false;
if (toString.call(cmpRawOutput.Groups) !== "[object Array]") return false;
if (toString.call(cmpRawOutput.dataLayer) !== "[object Array]") return false;
return true;
}
function cmpCheckForExplicitConsentDecision(cmpRawOutput) {
// treat things we don't understand as implicit
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return false;
return window.OneTrust && typeof window.OneTrust.IsAlertBoxClosed === "function" && window.OneTrust.IsAlertBoxClosed();
}
function cmpConvertResponseToLookupObject(cmpRawOutput) {
// convert from array of objects to object for easier lookups
var decisionString = "";
var foundOneTrustEntry = false;
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return {};
for (var i = cmpRawOutput.dataLayer.length - 1; i >= 0; i--) {
if (["OneTrustGroupsUpdated", "OneTrustLoaded"].indexOf(cmpRawOutput.dataLayer[i].event) !== -1) {
decisionString = cmpRawOutput.dataLayer[i].OnetrustActiveGroups;
foundOneTrustEntry = true;
break;
}
}
var permittedPurposeIds = decisionString.split(",").filter(function (group) {
return group !== "";
});
if (decisionString === "" && cmpRawOutput.dataLayer.length === 1000 && foundOneTrustEntry === false) {
permittedPurposeIds = window.tealiumConsentRegister && window.tealiumConsentRegister.getCurrentDecision();
}
var permittedPurposesWithNames = {};
cmpRawOutput.Groups.forEach(function (groupInfo) {
if (permittedPurposeIds.indexOf(groupInfo.OptanonGroupId) !== -1) {
permittedPurposesWithNames[groupInfo.OptanonGroupId] = groupInfo.GroupName || "ERROR-MISSING";
}
})
return permittedPurposesWithNames; // keys are IDs, values are names
}
function cmpConvertResponseToGroupList(cmpRawOutput) {
var permittedPurposesWithNames = cmpConvertResponseToLookupObject(cmpRawOutput);
var keysOrValues = useNamesInsteadOfKeys ? "values" : "keys";
return Object[keysOrValues](permittedPurposesWithNames); // keys are IDs, values are names
}
function cmpAddCallbackToTriggerRecheck(triggerRecheck) {
if (typeof triggerRecheck !== 'function') return false;
// An official Google dataLayer listener, pulled from https://github.com/google/data-layer-helper/blob/master/dist/data-layer-helper.js, see https://github.com/google/data-layer-helper
(function () {/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
'use strict';/*
jQuery v1.9.1 (c) 2005, 2012
jQuery Foundation, Inc. jquery.org/license.
*/
オプトアウトクッキー + GPC
この統合は、CCPA/CPRAなどの非常にシンプルなオプトアウトモデルをサポートすることを目的としています。Vendor ID フィールドは、オプトアウトクッキーのクッキー名として解釈され、大文字と小文字が区別されます。このクッキーが任意の値で見つかった場合、または グローバルプライバシーコントロール(GPC) のオプトアウトシグナルが見つかった場合、ユーザーはオプトアウトしたと見なされます。
統合で使用される目的キーとデフォルトの目的グループに含まれるものは以下の通りです:
no-selling
- ユーザーのオプトアウトシグナルに関係なく許可するタグ。これらのタグはデータを販売/共有しないか、法務チームなどによって厳密に必要とされています。yes-selling
- 適用される規制やポリシーにより、ユーザーがオプトアウトした後の追跡が禁止されているため、オプトアウトユーザーに対してブロックするタグです。
TrustArc
このスニペットを trustarc.com またはあなたのウェブサイトでテストし、操作方法セクション の指示に従って互換性を確認し、統合に必要な情報を取得してください。
;(function trustarc (window) {
// CMP specific functionality and labels
window.tealiumCmpIntegration = window.tealiumCmpIntegration || {}
window.tealiumCmpIntegration.cmpName = 'TrustArc'
window.tealiumCmpIntegration.cmpIntegrationVersion = 'trustarc-1.0.3'
window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision = cmpFetchCurrentConsentDecision
window.tealiumCmpIntegration.cmpFetchCurrentLookupKey = cmpFetchCurrentLookupKey
window.tealiumCmpIntegration.cmpCheckIfOptInModel = cmpCheckIfOptInModel
window.tealiumCmpIntegration.cmpCheckForWellFormedDecision = cmpCheckForWellFormedDecision
window.tealiumCmpIntegration.cmpCheckForExplicitConsentDecision = cmpCheckForExplicitConsentDecision
window.tealiumCmpIntegration.cmpCheckForTiqConsent = cmpCheckForTiqConsent
window.tealiumCmpIntegration.cmpConvertResponseToGroupList = cmpConvertResponseToGroupList
window.tealiumCmpIntegration.cmpConvertResponseToLookupObject = cmpConvertResponseToLookupObject
function cmpCheckIfOptInModel () {
var modeCookieValue = (truste && truste.util && typeof truste.util.readCookie === 'function' && truste.util.readCookie('notice_behavior')) || 'expressed|eu' // default to strict EU rules if no cookie
return modeCookieValue.indexOf('expressed') === 0
}
function cmpFetchCurrentConsentDecision () {
if (!window.truste || !window.truste.util || typeof window.truste.util.readCookie !== 'function') return false
var cookieValue = window.truste.util.readCookie(truste.eu.COOKIE_GDPR_PREF_NAME) || '0,'
// if we're in the opt-out model and it's an implicit decision, we should allow all tags to fire
var map = (window.tealiumCmpIntegration && window.tealiumCmpIntegration.map && Object.keys(window.tealiumCmpIntegration.map)[0] && window.tealiumCmpIntegration.map[Object.keys(window.tealiumCmpIntegration.map)[0]]) || {}
if (cmpCheckIfOptInModel() === false && cmpCheckForExplicitConsentDecision() === false) {
cookieValue = Object.keys(map).join(',') // all purpose keys that have been added in the UI are returned as consented
}
return {
cookie: cookieValue
}
}
function cmpFetchCurrentLookupKey () {
// just return whatever Vendor ID is expected be active to short-circuit the ID-based double check for now
return (window.tealiumCmpIntegration && window.tealiumCmpIntegration.map && Object.keys(window.tealiumCmpIntegration.map)[0]) || '(Vendor ID check disabled)'
}
function cmpCheckForWellFormedDecision (cmpRawOutput) {
// treat things we don't understand as an opt-out
if (typeof cmpRawOutput !== 'object') return false
if (typeof cmpRawOutput.cookie !== 'string') return false
return true
}
function cmpCheckForExplicitConsentDecision (cmpRawOutput) {
if (!window.truste || !window.truste.util || typeof window.truste.util.readCookie !== 'function') return false
return typeof window.truste.util.readCookie(truste.eu.COOKIE_GDPR_PREF_NAME) === 'string'
}
function cmpConvertResponseToLookupObject (cmpRawOutput) {
if (!cmpCheckForWellFormedDecision(cmpRawOutput)) return []
const cookieConsentValues = cmpRawOutput.cookie.split(':')[0].split(',')
const extraSplit = []
cookieConsentValues.forEach((el) => {
if (!el) return
extraSplit.push.apply(extraSplit, el.split('|'))
})
const trustArcMap = {
0: 'Required',
1: 'Functional',
2: 'Personalization/Advertising'
}
const output = {}
extraSplit.forEach((key) => {
if (key !== '') {
output[key] = trustArcMap[key] || 'Category name unknown'
}
})
return output
}
function cmpConvertResponseToGroupList (cmpRawOutput) {
var permittedPurposesWithNames = cmpConvertResponseToLookupObject(cmpRawOutput)
var keysOrValues = 'keys'
return Object[keysOrValues](permittedPurposesWithNames) // keys are IDs, values are names
}
function cmpCheckForTiqConsent (cmpRawOutput, tiqGroupName) {
// treat things we don't understand as an opt-out
if (cmpCheckForWellFormedDecision(cmpRawOutput) !== true) return false
tiqGroupName = tiqGroupName || 'tiq-group-name-missing'
var allowedGroups = cmpConvertResponseToGroupList(cmpRawOutput)
return allowedGroups.indexOf(tiqGroupName) !== -1
}
})(window)
// Debugging / development output - uncomment this code and paste the integration into the console on your test pages each time you make a change to your consent state to test without publishing
var outputString = `CMP Found: ${window.tealiumCmpIntegration.cmpName} (${window.tealiumCmpIntegration.cmpCheckIfOptInModel() ? 'Opt-in' : 'Opt-out'} Model)
Checks:
- id: ${tealiumCmpIntegration.cmpFetchCurrentLookupKey()}
- well-formed: ${tealiumCmpIntegration.cmpCheckForWellFormedDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- explicit: ${tealiumCmpIntegration.cmpCheckForExplicitConsentDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- group list: ${JSON.stringify(tealiumCmpIntegration.cmpConvertResponseToGroupList(tealiumCmpIntegration.cmpFetchCurrentConsentDecision()))}
- name lookup: ${JSON.stringify(tealiumCmpIntegration.cmpConvertResponseToLookupObject(tealiumCmpIntegration.cmpFetchCurrentConsentDecision()), null, 6)}
${tealiumCmpIntegration.cmpCheckIfOptInModel() === false && tealiumCmpIntegration.cmpCheckForExplicitConsentDecision() === false ? '(All purposes are consented in opt-out mode with an implicit decision, but the full purpose list can\'t be shown in this debug output for technical reasons.)' : ''}
`
console.log(outputString)
Usercentrics
このスニペットをあなたのウェブサイトでテストし、操作方法セクションの指示に従って互換性を確認し、統合に必要な情報を取得してください。 Usercentricsの統合では、VendorsをPurposesとして使用します。
;(function usercentricsBrowserSdkV2 (window) {
// CMP specific functionality and labels
window.tealiumCmpIntegration = window.tealiumCmpIntegration || {}
window.tealiumCmpIntegration.cmpName = 'Usercentrics Browser SDK'
window.tealiumCmpIntegration.cmpIntegrationVersion = 'usercentrics-1.0.3'
function cmpFetchCurrentConsentDecision () {
if (!window.UC_UI || typeof window.UC_UI.getServicesBaseInfo !== 'function') return false
var cmpRawOutput = window.UC_UI.getServicesBaseInfo()
return cmpRawOutput
}
function cmpFetchCurrentLookupKey () {
return (window.UC_UI && typeof window.UC_UI.getSettingsCore === 'function' && window.UC_UI.getSettingsCore().id) || ''
}
// only support opt-In model for Usercentrics for now, can be added if needed
function cmpCheckIfOptInModel () {
return window.UC_UI && typeof window.UC_UI.isConsentRequired === 'function' && window.UC_UI.isConsentRequired() === true
}
function cmpCheckForWellFormedDecision (cmpRawOutput) {
// treat things we don't understand as an opt-out
if (toString.call(cmpRawOutput) !== '[object Array]') return false
// use the first entry as a proxy for all
if (cmpRawOutput && cmpRawOutput[0] && typeof cmpRawOutput[0].name === 'string') {
return true
}
return false
}
function cmpCheckForExplicitConsentDecision (cmpRawOutput) {
// treat things we don't understand as an opt-out
if (toString.call(cmpRawOutput) !== '[object Array]') return false
// use the first entry as a proxy for all
var consentHistory = (cmpRawOutput && cmpRawOutput[0] && cmpRawOutput[0].consent && cmpRawOutput[0].consent.history) || []
var lastHistoryEntryType = (consentHistory && consentHistory.length && consentHistory[consentHistory.length - 1].type) || ''
if (lastHistoryEntryType === 'explicit') {
return true
}
return false
}
function cmpCheckForTiqConsent (cmpRawOutput, tiqGroupName) {
var foundOptIn = false
// treat things we don't understand as an opt-out
if (toString.call(cmpRawOutput) !== '[object Array]') return false
// use the mapping if found, with a fallback (Usercentrics default value) if not specified in the mapping
tiqGroupName = tiqGroupName || 'tiq-group-name-missing'
// check vendors if there's an object, look for at least one
cmpRawOutput.forEach(function (tagInfo) {
if ((tagInfo.consent && tagInfo.consent.status === true) && tagInfo.name === tiqGroupName) {
foundOptIn = true
}
})
return foundOptIn
}
function cmpConvertResponseToGroupList (cmpRawOutput) {
var vendorArray = []
cmpRawOutput && cmpRawOutput.forEach(function (tagConsent) {
if (tagConsent.consent && tagConsent.consent.status === true) {
vendorArray.push(tagConsent.name)
}
})
return vendorArray
}
window.tealiumCmpIntegration.cmpFetchCurrentConsentDecision = cmpFetchCurrentConsentDecision
window.tealiumCmpIntegration.cmpFetchCurrentLookupKey = cmpFetchCurrentLookupKey
window.tealiumCmpIntegration.cmpCheckIfOptInModel = cmpCheckIfOptInModel
window.tealiumCmpIntegration.cmpCheckForWellFormedDecision = cmpCheckForWellFormedDecision
window.tealiumCmpIntegration.cmpCheckForExplicitConsentDecision = cmpCheckForExplicitConsentDecision
window.tealiumCmpIntegration.cmpCheckForTiqConsent = cmpCheckForTiqConsent
window.tealiumCmpIntegration.cmpConvertResponseToGroupList = cmpConvertResponseToGroupList
})(window)
var outputString = `${tealiumCmpIntegration.cmpName} - ${tealiumCmpIntegration.cmpCheckIfOptInModel() ? 'Opt-in' : 'Opt-out'} Model
Checks:
- vendor id: ${tealiumCmpIntegration.cmpFetchCurrentLookupKey()}
- well-formed decision: ${tealiumCmpIntegration.cmpCheckForWellFormedDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- explicit decision: ${tealiumCmpIntegration.cmpCheckForExplicitConsentDecision(tealiumCmpIntegration.cmpFetchCurrentConsentDecision())}
- consented purposes: ${JSON.stringify(tealiumCmpIntegration.cmpConvertResponseToGroupList(tealiumCmpIntegration.cmpFetchCurrentConsentDecision()).sort(),null, 8)}
`
console.log(outputString)
カスタム統合テンプレート
カスタム統合テンプレートについての詳細とその使用方法については、カスタム統合を参照してください。
このページはお役にたちましたでしょうか?
ご意見有難うございます。
最終更新日 :: 2025年August月20日