Google EU 사용자 동의 정책에 따라 영국과 유럽 경제 지역 (EEA) 사용자에게 특정 정보를 공개해야 하며, 법적으로 필요한 경우 쿠키 또는 기타 로컬 저장소를 사용하고 개인 정보 (예: AdID)를 사용하여 광고를 게재하기 위한 동의를 얻어야 합니다. 이 정책에는 EU 온라인 개인 정보 보호 지침 및 개인 정보 보호법 (GDPR)의 요구사항이 반영되어 있습니다.
게시자가 이 정책에 따른 의무를 이행할 수 있도록 Google은 사용자 메시지 플랫폼 (UMP) SDK를 제공합니다. UMP SDK는 최신 IAB 표준을 지원하도록 업데이트되었습니다. 이제 이 모든 구성이 개인 정보 보호 및 메시지에서 AdMob 편리하게 처리됩니다.
기본 요건
- 시작 가이드를 모두 읽어보세요.
- AdMob 계정의 개인 정보 보호 및 메시지 탭에서 메시지를 구성합니다. 자세한 내용은 개인 정보 보호 및 메시지 정보,
- GDPR 관련 요구사항을 다루는 경우 IAB 요구사항이 EU 동의 메시지에 미치는 영향을 읽어보세요.
사용자 메시지 유형
지원되는 메시지의 전체 목록은 사용자 메시지 유형 을 참고하세요. 각 메시지 유형을 구현하는 방법에 관한 구체적인 안내는 왼쪽 탐색 메뉴를 참고하세요.
메시지를 표시해야 하는지 결정
앱을 실행할 때마다 양식을 로드하기 전에 Update()
를 사용하여 사용자 동의 정보 업데이트를 요청해야 합니다.
이를 통해 사용자가 아직 동의를 제공하지 않았거나 동의가 만료된 경우 동의를 제공해야 하는지 여부를 판단할 수 있습니다.
ConsentInformation
객체에 저장된 정보를 사용합니다.
다음은 앱 시작 시 상태를 확인하는 방법의 예입니다.
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Ump;
using GoogleMobileAds.Ump.Api;
public class UmpManager : MonoBehaviour
{
void Start()
{
// Set tag for under age of consent.
// Here false means users are not under age.
ConsentRequestParameters request = new ConsentRequestParameters
{
TagForUnderAgeOfConsent = false,
};
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
void OnConsentInfoUpdated(FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
}
}
가능한 경우 양식 로드
양식을 표시하기 전에 먼저 양식을 사용할 수 있는지 확인해야 합니다. 사용할 수 없는 양식은 사용자가 제한된 광고 추적을 사용 설정했거나 사용자가 동의 연령 미만인 사용자로 태그를 지정했기 때문일 수 있습니다.
양식의 사용 가능 여부를 확인하려면 앞서 만든the IsConsentFormAvailable()
method on the ConsentInformation
instance 를 사용하세요.
그런 다음 래퍼 메서드를 추가하여 양식을 로드합니다.
void OnConsentInfoUpdated(FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
if (ConsentInformation.IsConsentFormAvailable())
{
LoadConsentForm();
}
}
void LoadConsentForm()
{
// Loads a consent form.
}
양식을 로드하려면 the static Load()
method on the ConsentForm
class를 사용합니다.
private ConsentForm _consentForm;
void LoadConsentForm()
{
// Loads a consent form.
ConsentForm.Load(OnLoadConsentForm);
}
void OnLoadConsentForm(ConsentForm consentForm, FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// The consent form was loaded.
// Save the consent form for future requests.
_consentForm = consentForm;
// You are now ready to show the form.
}
필요한 경우 양식 제공
양식의 사용 가능 여부를 확인하고 양식을 로드한 후에는ConsentForm
인스턴스에서Show()
메서드를 사용하여 양식을 표시합니다.
앞에서ConsentInformation
객체를 사용하여consent status 를 확인하고LoadForm()
메서드를 업데이트합니다.
void LoadForm()
{
// Loads a consent form.
ConsentForm.Load(OnLoadConsentForm);
}
void OnLoadConsentForm(ConsentForm consentForm, FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// The consent form was loaded.
// Save the consent form for future requests.
_consentForm = consentForm;
// You are now ready to show the form.
if(ConsentInformation.ConsentStatus == ConsentStatus.Required)
{
_consentForm.Show(OnShowForm);
}
}
void OnShowForm(FormError error)
{
if (error != null)
{
// Handle the error.
UnityEngine.Debug.LogError(error);
return;
}
// Handle dismissal by reloading form.
LoadForm();
}
사용자가 선택했거나 양식을 닫은 후에 작업을 실행해야 하는 경우 이 로직을 양식의 완료 핸들러 또는 콜백에 배치합니다.
테스트
지역 강제 설정
UMP SDK는 the DebugGeography
field on ConsentDebugSettings
를 사용하여 기기가 EEA 또는 영국에 있는 것처럼 앱 동작을 테스트할 수 있는 방법을 제공합니다.
디버그 기능을 사용하려면 앱의 디버그 설정에 테스트 기기의 해시 ID를 제공해야 합니다. 이 값을 설정하지 않고Update()
를 호출하면 실행 시 앱에서 필수 ID 해시를 로깅합니다.
void Start()
{
var debugSettings = new ConsentDebugSettings
{
// Geography appears as in EEA for debug devices.
DebugGeography = DebugGeography.EEA,
TestDeviceHashedIds = new List<string>
{
"TEST-DEVICE-HASHED-ID"
}
};
// Set tag for under age of consent.
// Here false means users are not under age.
ConsentRequestParameters request = new ConsentRequestParameters
{
TagForUnderAgeOfConsent = false,
ConsentDebugSettings = debugSettings,
};
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
DebugGeography
enum를 사용하면 지역을 다음 옵션 중 하나로 강제 설정할 수 있습니다.
디버그 지리 | 설명 |
---|---|
DISABLED |
디버그 지역을 사용 중지했습니다. |
EEA |
디버그 기기에 대해 지역이 EEA로 표시됩니다. |
Not_EEA |
디버그 기기에 대해 지역이 EEA가 아닌 것으로 표시됩니다. |
디버그 설정은 테스트 기기에서만 작동합니다. 에뮬레이터는 기본적으로 테스트가 이미 사용 설정되어 있으므로 기기 ID 목록에 추가할 필요가 없습니다.
동의 상태 재설정
UMP SDK로 앱을 테스트할 때 사용자의 첫 설치 경험을 시뮬레이션할 수 있도록 SDK 상태를 재설정하면 도움이 될 수 있습니다.
SDK는 이를 위한 Reset()
메서드를 제공합니다.
ConsentInformation.Reset();
UMP SDK를 프로젝트에서 완전히 삭제하기로 결정한 경우에도 Reset()
를 호출해야 합니다.