사용자 동의를 얻기 위해 TrustArc 설정하기

사용자 개인 정보를 보호하면서 가치 있는 통계를 확보하려면 웹사이트 사용자의 동의를 얻어야 합니다. 동의 관리 플랫폼(CMP)을 사용하거나 콘텐츠 관리 시스템(CMS)을 사용하여 동의를 수집하고 Google에 전송하는 것이 좋습니다.

1단계: 동의 배너 설정하기

  1. CCM Advanced(관리형 서비스)를 보유한 경우 기술계정 관리자(TAM)가 요구사항 및 스타일 가이드라인에 따라 배너를 설정합니다.
  2. CCM Pro(셀프 서비스 CMP)를 보유한 경우에는 TrustArc가 포털에 로그인하고 마법사에서 사전 정의된 템플릿을 이용해 배너를 구성할 수 있는 URL을 제공합니다.
  3. 배너가 Google EU 사용자 동의 정책(EUUCP)의 요구사항을 준수하는지 확인합니다. TrustArc 배너 설정에 관한 자세한 내용은 사용자 가이드의 시작하기 섹션을 참고하세요.
  4. 배너와 CMP 링크 렌더링을 처리하는 <div> 요소를 웹사이트 코드에 또는 Google 태그 관리자를 통해 포함합니다.

2단계: 동의 모드 설정하기

Google 태그 관리자 사용하기

  1. 태그 관리자를 열고 컨테이너로 이동합니다.
  2. '태그'에서 '새로 만들기'를 클릭하고 태그 이름을 지정합니다.
  3. 태그 구성을 클릭한 다음, '커뮤니티 템플릿 갤러리에서 더 많은 태그 유형을 찾아보세요.'를 클릭합니다. 갤러리에서 'TrustArc CMP (Consent Mode)'를 검색한 다음 TrustArc의 'TrustArc CMP (Consent Mode)'를 설치합니다.
  4. '기본 동의 모드 설정'에서 사용할 기본 설정을 구성합니다.
  5. 템플릿을 이용해 CMP 스크립트 배포 옵션을 선택합니다.
    1. CMP ID 필드에 CCM Pro 포털의 4단계: 코드 스니펫 복사에 사용할 수 있는 인스턴스 ID를 입력합니다. CCM Advanced를 보유한 경우 TAM이 해당 정보를 제공할 수 있습니다.
    2. 추가 매개변수 필드에 인스턴스의 추가 설정을 입력합니다. 이 구성은 언어, 지역 식별, 개인정보처리방침 링크와 같은 백엔드 구성을 재정의하는 데 사용됩니다.
  6. Google 동의 모드와 CMP 통합 옵션을 사용 설정하여 Google 동의 모드 통합을 설정합니다.
  7. 설정에 따라 동의 유형 및 사용자 환경설정에 대한 매핑이 이루어집니다. 사용 중인 동의 유형별로 쿠키 사용 동의 버킷(필수, 기능, 광고)의 해당 ID에 매핑합니다. 환경설정 쿠키 필드에서 cmapi_cookie_privacy의 퍼스트 파티 쿠키를 매핑합니다. 동작 쿠키 필드에서 notice_behavior의 퍼스트 파티 쿠키를 매핑합니다.
  8. 트리거 > 동의 초기화 - 모든 페이지 > 저장을 클릭합니다.
  9. 오른쪽 상단의 미리보기를 클릭하여 컨테이너를 테스트합니다(아래의 테스트 안내 참고).
  10. 컨테이너를 게시합니다.

다른 플랫폼 사용하기 또는 웹사이트 코드 직접 수정하기 

  1. TrustArc Support 포털에 로그인하고 이 링크에서 TrustArc Google Consent Mode Implementation Guide(TrustArc Google 동의 모드 구현 가이드)를 연 다음 Integrating the Consent Mode Using JavaScript(JavaScript를 이용한 동의 모드 통합)​​ 섹션의 안내를 따릅니다.
  2. 웹사이트 작성 도구를 사용하는 경우 해당 설명서에서 각 페이지의 head 태그에 코드를 구현하는 방법을 알아봅니다. 웹사이트 작성 도구를 사용하지 않으면 3단계로 건너뛰세요.
  3. CCM Advanced 버전을 사용하는 경우 다음 단계를 따릅니다. 그렇지 않으면 4단계로 건너뛰세요. 각 페이지의 head 태그에(웹사이트 작성 도구를 사용하는 경우 2단계 참고) 아래 코드를 복사하여 붙여넣고, 1단계에서 복사한 CMP 스크립트를 head 태그의 상단에 붙여넣으세요. CMP가 제대로 작동하려면 이 작업이 매우 중요합니다.

    <script>

    window.dataLayer = window.dataLayer || [];

    function gtag(){dataLayer.push(arguments);}

     

    gtag('js', new Date());

    gtag('config', 'AW-YYYYYY');

     

    // Default consent types to 'denied' as a placeholder

    // Determine actual values based on your own requirements

    // Please omit consent types not being used

    gtag('consent', 'default', {

    'ad_storage': 'denied',

    'ad_user_data': 'denied',

    'ad_personalization': 'denied',

    'analytics_storage': 'denied',

    'functionality_storage': 'denied',

    'personalization_storage': 'denied',

    'security_storage': 'denied',

    'wait_for_update': 500

    });

    gtag('set', 'ads_data_redaction', true);

    gtag('set', 'developer_id.dNTIxZG', true);

    </script>

    <!--Banner script here!-->

  4. CCM Pro 버전을 사용하는 경우 다음 단계를 따릅니다. 각 페이지의 head 태그에(웹사이트 작성 도구를 사용하는 경우 2단계 참고) 아래 코드를 복사하여 붙여넣고, 1단계에서 복사한 CMP 스크립트를 head 태그의 상단에 붙여넣으세요. CMP가 제대로 작동하려면 이 작업이 매우 중요합니다. CMP 버킷과 동의 유형 간의 연결을 꼭 조정하세요.

    window.dataLayer = window.dataLayer || [];

    function gtag() { dataLayer.push(arguments); }

    gtag('js', new Date());

    gtag('config', 'GA_MEASUREMENT_ID');

    gtag('set', 'developer_id.dNTIxZG', true);

    // TODO: Can be changed according to customer's need and according to the configuration

    gtag('set', 'ads_data_redaction', true);

    gtag('set', 'url_passthrough', true);

    //Consent Mode Status

    const ConsentType = {

    DENIED: 'denied',

    GRANTED: 'granted',

    };

     

    const convertBooleanToGrantedOrDenied = (boolean) => boolean ? ConsentType.GRANTED : ConsentType.DENIED;

     

    /*

    TODO: This is where you can configure the Google Consent Mode, map the CMP categorisation and the default values for the consent initialization

    Google recommends commenting our consent types that you are not going to use.

    */

    const domain = 'your_domain.com'; // TODO: update

    // Bucket Mapping

    const REQUIRED = 1;

    const FUNCTIONAL = 2;

    const ADVERTISING = 3;

    const consentTypesMapped = {

    'ad_storage': ADVERTISING,

    'ad_user_data': ADVERTISING,

    'ad_personalization': FUNCTIONAL,

    'analytics_storage': FUNCTIONAL,

    'functionality_storage': FUNCTIONAL,

    'personalization_storage': FUNCTIONAL,

    'security_storage': REQUIRED

    }

    const getConsentState = (prefCookie) => {

    var consentStates = {};

    var noticeBehavior = window.truste.util.readCookie("notice_behavior");

    /*

    TODO: Can be changed according to customer's need and according to the configuration

    */

    var impliedLocation = noticeBehavior && noticeBehavior.includes("na");

    for (const consentType in consentTypesMapped) {

    var id = consentTypesMapped[consentType];

     

    if(prefCookie && !prefCookie.includes(0)) {

    console.log("Existing consent..");

    consentStates[consentType] = convertBooleanToGrantedOrDenied(prefCookie && prefCookie.includes(id));

    } else {

    console.log("Non Existing consent..");

    consentStates[consentType] = convertBooleanToGrantedOrDenied(impliedLocation);

    ;}

    ;}

    consentStates['wait_for_update'] = 500;

    console.log(consentStates);

    return consentStates;

    };

    /*

    Helper function to submit a GCM event based on user's preferences on TrustArc's Script

    consent: The consent object will be an array of values [1, 2, 3, n] as 1 being if the user consented to required, 2 to function, ... etc

    This function needs to be customized according to the customer's needed mapping. Ex: 'ad_storage': returnGrantedOrDenied(advertisingAccepted) is being mapped to advertising. if we were to map it to functional instead, we just need to change the bucket variable it's looking at. 

    */

     

    var runOnceGCM = 0;

    function handleConsentDecisionForGCM(consent) {

    //This code initializes the consent mode

    const consentStates = getConsentState(consent.consentDecision);

    var defaultOrUpdate;

    if (runOnceGCM == 0) {

    defaultOrUpdate = 'default';

    runOnceGCM++;

    } else {

    console.log('consent is being updated');

    defaultOrUpdate = 'update';

    }

    console.log(consentStates);

    //Once consent is changed, we will send an update 

    gtag('consent', defaultOrUpdate, {

    consentStates

    });

    }

     

    // This code is responsible for listening to any consent changes trough TrustArc's CCM Instance

    // And pushing the consent changes to the dataLayer according to the customer's consent mapping

    // This is for the intial load. If the user has a consent different from the default values, this is to push an update to the datalayer 

    // Once the CCM loads. 

    var interval = setInterval(() => {

    if (window.truste) {

    var consentDecision = truste.cma.callApi("getGDPRConsentDecision", domain);

    handleConsentDecisionForGCM(consentDecision);

    clearInterval(interval);

    console.log("running once...");

    }

    }, 100);

     

    // Start listening to when users submit their preferences  

    window.addEventListener("message", (event) => {

    let eventDataJson = null;

    // We only care about TrustArc Events at this point. And TrustArc's even it encoded in JSON

    try {

    eventDataJson = JSON.parse(event.data);

    } catch {

    // Some other event that is not JSON. 

    // TrustArc encodes the data as JSON

    // console.log(event.data);

    }

     

    // Safeguard to make sure we are only getting events from TrustArc

    if (eventDataJson && eventDataJson.source === "preference_manager") {

    // Means that the user has submited their preferences

    if (eventDataJson.message === "submit_preferences") {

    console.log("Event Data: ", eventDataJson);

    // Waiting half a second to make sure user's preferences are reflected. 

    setTimeout(() => {

    var consentDecision = truste.cma.callApi("getGDPRConsentDecision", domain);

    console.log("Consent Decision: ", consentDecision);

    handleConsentDecisionForGCM(consentDecision);

    }, 500);

    }

    }

    }, false);

    <!--Banner script here!-->

Tag Assistant를 사용하여 테스트

Google 태그 관리자로 동의 모드 문제를 해결하는 방법을 자세히 알아보세요.

도움이 되었나요?

어떻게 하면 개선할 수 있을까요?
true
검색
검색어 지우기
검색 닫기
기본 메뉴
15340901747571859233
true
도움말 센터 검색
true
true
true
true
true
69256
false
false