Google EU 사용자 동의 정책에 따라 게시자는 영국과 유럽 경제 지역 (EEA)의 사용자에게 특정 정보를 공개하고, 법적으로 요구되는 경우 쿠키 또는 기타 로컬 저장소를 사용하고, 개인 정보 (예: 광고 ID)를 사용하여 광고를 게재한다는 데 대한 동의를 얻어야 합니다. 이 정책에는 EU 온라인 개인 정보 보호 지침 및 개인 정보 보호법 (GDPR)의 요구사항이 반영되어 있습니다.
게시자가 이 정책의 의무 조항을 준수할 수 있도록 Google에서는 사용자 메시지 플랫폼 (UMP) SDK를 제공합니다. UMP SDK는 최신 IAB 표준을 지원하도록 업데이트되었습니다. 이제 이러한 모든 구성을 AdMob 개인 정보 보호 및 메시지에서 편리하게 처리할 수 있습니다.
기본 요건
- 시작 가이드를 모두 읽어보세요.
- GDPR 관련 요구사항을 작업 중인 경우IAB 요구사항이 EU 동의 메시지에 미치는 영향
메시지 유형 만들기
사용 가능한 사용자 메시지 유형 AdMob 계정의 개인 정보 보호 및 메시지 탭에서 다음 중 하나로 사용자 메시지를 작성하세요. UMP SDK는 프로젝트에 설정된 AdMob 애플리케이션 ID에서 생성된 사용자 메시지를 표시하려고 시도합니다. 애플리케이션에 구성된 메시지가 없으면 SDK가 오류를 반환합니다.
자세한 내용은 개인 정보 보호 및 메시지에 대한 정보를 참고하세요.
동의 정보 요청
앱을 실행할 때마다 Update()
를 사용하여 사용자 동의 정보 업데이트를 요청해야 합니다. 사용자가 아직 동의를 제공하지 않았는지 또는 동의가 만료된 경우 동의를 제공해야 하는지가 결정됩니다.
다음은 앱 시작 시 상태를 확인하는 방법의 예입니다.
void Start()
{
// Create a ConsentRequestParameters object.
ConsentRequestParameters request = new ConsentRequestParameters();
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
void OnConsentInfoUpdated(FormError consentError)
{
if (consentError != null)
{
// Handle the error.
UnityEngine.Debug.LogError(consentError);
return;
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
}
필요한 경우 동의 양식 로드 및 표시
최신 동의 상태를 수신한 후
ConsentForm
클래스에서
LoadAndShowConsentFormIfRequired()
를 호출하여 동의 양식을 로드합니다. 동의 상태가 필요한 경우
SDK가 양식을 로드하고
에서 즉시 이 양식을 표시합니다. 양식이 닫힌 후에 Action<FormError>
callback
가 호출됩니다. 동의가 필요하지 않은 경우 Action<FormError>
callback
가 즉시 호출됩니다.
void Start()
{
// Create a ConsentRequestParameters object.
ConsentRequestParameters request = new ConsentRequestParameters();
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
void OnConsentInfoUpdated(FormError consentError)
{
if (consentError != null)
{
// Handle the error.
UnityEngine.Debug.LogError(consentError);
return;
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
ConsentForm.LoadAndShowConsentFormIfRequired((FormError formError) =>
{
if (formError != null)
{
// Consent gathering failed.
UnityEngine.Debug.LogError(consentError);
return;
}
// Consent has been gathered.
});
}
사용자가 결정을 내렸거나 양식을 닫은 후에 작업을 실행해야 하는 경우 양식의 Action<FormError>
callback에 로직을 배치합니다.
광고 요청
앱에서 광고를 요청하기 전에 CanRequestAds()
를 사용하여 사용자의 동의를 얻었는지 확인하세요. 동의를 수집할 때는 다음 두 가지를 확인해야 합니다.
- 현재 세션에서 동의가 수집된 후
-
Update()
를 호출한 직후 이전 세션에서 동의를 받았을 수 있습니다. 지연 시간 권장사항에 따라 앱 실행 후 최대한 빨리 광고 로드를 시작할 수 있도록 콜백이 완료될 때까지 기다리지 않는 것이 좋습니다.
동의 수집 과정 중에 오류가 발생해도 광고 요청을 다시 시도해야 합니다. UMP SDK는 이전 세션의 동의 상태를 사용합니다.
void Start()
{
// Create a ConsentRequestParameters object.
ConsentRequestParameters request = new ConsentRequestParameters();
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
void OnConsentInfoUpdated(FormError consentError)
{
if (consentError != null)
{
// Handle the error.
UnityEngine.Debug.LogError(consentError);
return;
}
// If the error is null, the consent information state was updated.
// You are now ready to check if a form is available.
ConsentForm.LoadAndShowConsentFormIfRequired((FormError formError) =>
{
if (formError != null)
{
// Consent gathering failed.
UnityEngine.Debug.LogError(consentError);
return;
}
// Consent has been gathered.
if (ConsentInformation.CanRequestAds())
{
MobileAds.Initialize((InitializationStatus initstatus) =>
{
// TODO: Request an ad.
});
}
});
}
공개 설정 옵션
일부 동의 양식은 사용자가 언제든지 동의를 수정해야 합니다. 필요한 경우 다음 단계를 따라 개인 정보 보호 옵션 버튼을 구현합니다.
이 경우 방법은 다음과 같습니다.
- 개인 정보 보호 옵션 양식을 트리거할 수 있는 UI 요소(예: 앱 설정 페이지의 버튼)를 구현합니다.
-
LoadAndShowConsentFormIfRequired()
가 완료되면PrivacyOptionsRequirementStatus
를 확인하여 개인 정보 보호 옵션 양식을 표시할 수 있는 UI 요소를 표시할지 결정합니다. - 사용자가 UI 요소와 상호작용할 때
ShowPrivacyOptionsForm()
를 호출하여 양식을 표시하여 사용자가 언제든지 개인 정보 보호 옵션을 업데이트할 수 있도록 합니다.
다음 예는 Button
에서 개인 정보 보호 옵션 양식을 표시하는 방법을 보여줍니다.
[SerializeField, Tooltip("Button to show the privacy options form.")]
private Button _privacyButton;
private void Start()
{
// Enable the privacy settings button.
if (_privacyButton != null)
{
_privacyButton.onClick.AddListener(UpdatePrivacyButton);
// Disable the privacy settings button by default.
_privacyButton.interactable = false;
}
}
/// <summary>
/// Shows the privacy options form to the user.
/// </summary>
public void ShowPrivacyOptionsForm()
{
Debug.Log("Showing privacy options form.");
ConsentForm.ShowPrivacyOptionsForm((FormError showError) =>
{
if (showError != null)
{
Debug.LogError("Error showing privacy options form with error: " + showError.Message);
}
// Enable the privacy settings button.
if (_privacyButton != null)
{
_privacyButton.interactable =
ConsentInformation.PrivacyOptionsRequirementStatus ==
PrivacyOptionsRequirementStatus.Required;
}
});
}
테스트
개발 중에 앱에서 통합을 테스트하려면 다음 단계에 따라 테스트 기기를 프로그래매틱 방식으로 등록하세요. 앱을 출시하기 전에 이러한 테스트 기기 ID를 설정하는 코드를 삭제해야 합니다.
-
Update()
를 호출합니다. 로그 출력을 확인하여 기기 ID와 이를 테스트 기기로 추가하는 방법을 보여주는 다음 예와 비슷한 메시지를 확인합니다.
Android
Use new ConsentDebugSettings.Builder().addTestDeviceHashedId("33BE2250B43518CCDA7DE426D04EE231") to set this as a debug device.
iOS
<UMP SDK>To enable debug mode for this device, set: UMPDebugSettings.testDeviceIdentifiers = @[2077ef9a63d2b398840261c8221a0c9b]
테스트 기기 ID를 클립보드에 복사합니다.
코드를 수정하여
DebugGeography.TestDeviceHashedIds
를 호출하고 테스트 기기 ID 목록을 전달합니다.void Start() { var debugSettings = new ConsentDebugSettings { TestDeviceHashedIds = new List<string> { "TEST-DEVICE-HASHED-ID" } }; // Create a ConsentRequestParameters object. ConsentRequestParameters request = new ConsentRequestParameters { ConsentDebugSettings = debugSettings, }; // Check the current consent information status. ConsentInformation.Update(request, OnConsentInfoUpdated); }
지역 강제 설정
UMP SDK는 the DebugGeography
field on ConsentDebugSettings
를 사용하여 기기가 EEA 또는 영국에 있는 것처럼 앱 동작을 테스트할 수 있는 방법을 제공합니다. 디버그 설정은 테스트 기기에서만 작동합니다.
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"
}
};
// Create a ConsentRequestParameters object.
ConsentRequestParameters request = new ConsentRequestParameters
{
ConsentDebugSettings = debugSettings,
};
// Check the current consent information status.
ConsentInformation.Update(request, OnConsentInfoUpdated);
}
동의 상태 재설정
UMP SDK로 앱을 테스트할 때는 사용자의 첫 설치 환경을 시뮬레이션할 수 있도록 SDK 상태를 재설정하는 것이 도움이 될 수 있습니다.
SDK에서는 이를 위한 Reset()
메서드를 제공합니다.
ConsentInformation.Reset();