광고 구매 어트리뷰션
미디에이션 플랫폼의 광고 구매을 추적하고 사용자를 확보한 마케팅 캠페인에 어트리뷰션하여 캠페인 비용, 인앱 구매, 광고 구매화 전반에 걸쳐 완벽한 ROI 가시성을 제공합니다.
개요
광고 구매 어트리뷰션이란?
광고 구매 어트리뷰션은 모바일 앱 광고 구매을 앱 설치를 유도한 사용자 확보 캠페인에 연결하여 광고 구매화를 포함한 진정한 캠페인 구매성을 측정할 수 있도록 해줍니다.
주요 이점
- 연동 ROI 보기: Singular 대시보드에서 캠페인 비용, 인앱 구매, 광고 구매을 확인할 수 있습니다.
- 캠페인 최적화: 광고 구매 데이터를 광고 네트워크에 다시 전송하여 비딩 및 타겟팅 개선
- LTV 측정: 광고 구매화를 포함한 전체 사용자 생애 가치 계산
데이터 소스: 광고 구매 데이터는 일반적으로 사용자 수준 또는 노출 수준에서 미디에이션 플랫폼(예: 애드몹, 앱러빈 MAX, 아이언소스)에서 가져옵니다. Singular는 이 데이터를 수신하기 위한 다양한 연동 방법을 지원합니다.
자세히 알아보기: 설정, 보고 및 문제 해결에 대한 자세한 내용은 광고 구매 어트리뷰션 FAQ를참조하세요.
구현 요구 사항
중요 가이드라인
데이터 정확성이 중요합니다:
- 통화 코드: 세 글자로 구성된 ISO 4217 통화 코드(예: USD, EUR, INR)를 사용하세요. 많은 중개 플랫폼이 USD로 보고하므로 구현하기 전에 플랫폼의 통화를 확인하세요.
-
전송 전에 유효성을 검사하세요:
SingularSDK.AdRevenue()으로 전화하기 전에 항상 구매 및 통화 데이터를 확인하세요. 잘못된 데이터는 제출 후 수정할 수 없습니다. - 플랫폼 차이: 애드몹은 유니티와 Android에서는 마이크로 단위(1,000,000으로 나누기)로 구매을 보고하지만, iOS에서는 표준 단위로 구매을 보고합니다. 사용 중인 플랫폼의 설명서를 확인하세요.
설정 단계
광고 구매 어트리뷰션을 구현하려면 다음 단계를 따르세요:
- SDK를 업데이트합니다: 최신 Singular SDK 버전을 사용하고 있는지 확인합니다.
- 연동을 선택합니다: 아래에서 설정과 일치하는 미디에이션 플랫폼 연동을 선택합니다.
- 콜백을 구현합니다: 플랫폼별 유료 이벤트 리스너를 추가하여 구매 데이터를 캡처합니다.
- 데이터 검증: 구매 보고를 테스트하고 데이터가 Singular 대시보드에 표시되는지 확인합니다.
플랫폼 연동
애드몹 연동
노출 수준 구매 보고를 위해 유료 이벤트 리스너를 사용하여 구글 애드몹에서 광고 구매을 추적하세요.
요구 사항:
플랫폼 구매 보고: AdMob은 플랫폼별로 구매을 다르게 보고합니다. 0.005달러의 광고 구매은 Unity 및 Android 플랫폼에서는 5000으로 반환되지만 iOS에서는 0.005달러로 반환됩니다. iOS의 경우 0.005를 Singular SDK로 직접 전송합니다. 다른 플랫폼에서는 광고 가치를 마이크로에서 달러로 변환한 후 Singular로 전송하세요.
구현
광고를 로드할 때 OnAdPaid 이벤트 핸들러를 등록하여 구매 데이터를 캡처하고 이를 Singular로 전송합니다.
using UnityEngine;
using Singular;
using GoogleMobileAds.Api;
public class AdMobRevenueTracking : MonoBehaviour
{
private const string AD_UNIT_ID = "YOUR_AD_UNIT_ID";
private RewardedAd rewardedAd;
void Start()
{
// Initialize Mobile Ads SDK
MobileAds.Initialize(initStatus =>
{
Debug.Log("AdMob initialized");
LoadRewardedAd();
});
}
private void LoadRewardedAd()
{
// Create ad request
AdRequest adRequest = new AdRequest();
// Load rewarded ad
RewardedAd.Load(AD_UNIT_ID, adRequest, (RewardedAd ad, LoadAdError error) =>
{
if (error != null || ad == null)
{
Debug.LogError($"Rewarded ad failed to load: {error}");
return;
}
Debug.Log("Rewarded ad loaded");
rewardedAd = ad;
// Register event handlers
RegisterEventHandlers(ad);
});
}
private void RegisterEventHandlers(RewardedAd ad)
{
// Raised when the ad is estimated to have earned money
ad.OnAdPaid += (AdValue adValue) =>
{
// Validate and ensure revenue data is within an expected range
float revenue = adValue.Value / 1_000_000f; // Convert micros to dollars
string currency = adValue.CurrencyCode;
// Check if revenue is positive and currency is valid
if (revenue > 0 && !string.IsNullOrEmpty(currency))
{
// Construct and send the Singular Ad Revenue Event
SingularAdData data = new SingularAdData(
"AdMob",
currency,
revenue
);
SingularSDK.AdRevenue(data);
// Log the revenue data for debugging purposes
Debug.Log($"Ad Revenue reported to Singular: {data}");
}
else
{
Debug.LogError($"Invalid ad revenue data: revenue = {revenue}, currency = {currency}");
}
};
// Additional event handlers
ad.OnAdFullScreenContentOpened += () =>
{
Debug.Log("Rewarded ad full screen content opened");
};
ad.OnAdFullScreenContentClosed += () =>
{
Debug.Log("Rewarded ad full screen content closed");
// Load next ad
LoadRewardedAd();
};
ad.OnAdFullScreenContentFailed += (AdError error) =>
{
Debug.LogError($"Rewarded ad failed to show: {error}");
// Load next ad
LoadRewardedAd();
};
}
public void ShowRewardedAd()
{
if (rewardedAd != null && rewardedAd.CanShowAd())
{
rewardedAd.Show((Reward reward) =>
{
Debug.Log($"User earned reward: {reward.Type} - {reward.Amount}");
});
}
else
{
Debug.Log("Rewarded ad is not ready yet");
}
}
}
앱러빈 MAX 연동
앱러빈 노출 수준 사용자 구매 API를 사용하여 노출 수준 광고 구매을 추적합니다.
요구 사항:
- 유니티용 앱러빈 MAX SDK를 구현합니다( 시작 가이드 참조).
- 사용 중인 모든 광고 형식에 구매 유료 콜백을 연결합니다.
구현
OnAdRevenuePaidEvent 콜백을 등록하여 구매 데이터를 캡처하고 Singular로 전송합니다.
using UnityEngine;
using Singular;
public class AppLovinRevenueTracking : MonoBehaviour
{
void Start()
{
// Attach callbacks based on the ad format(s) you are using
MaxSdkCallbacks.Interstitial.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.Rewarded.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.Banner.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.MRec.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
}
private void OnAdRevenuePaidEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
{
double revenue = adInfo.Revenue;
if (revenue > 0)
{
// Create a SingularAdData object with relevant information
SingularAdData adData = new SingularAdData(
"AppLovin",
"USD", // AppLovin typically reports in USD
revenue
);
// Send ad revenue data to Singular
SingularSDK.AdRevenue(adData);
Debug.Log($"Ad Revenue reported to Singular: {revenue} USD from {adUnitId}");
}
else
{
Debug.LogError("Failed to parse valid revenue value from ad info or revenue is not greater than 0");
}
}
void OnDestroy()
{
// Detach callbacks to prevent memory leaks
MaxSdkCallbacks.Interstitial.OnAdRevenuePaidEvent -= OnAdRevenuePaidEvent;
MaxSdkCallbacks.Rewarded.OnAdRevenuePaidEvent -= OnAdRevenuePaidEvent;
MaxSdkCallbacks.Banner.OnAdRevenuePaidEvent -= OnAdRevenuePaidEvent;
MaxSdkCallbacks.MRec.OnAdRevenuePaidEvent -= OnAdRevenuePaidEvent;
}
}
유니티 레벨플레이(아이언소스) 연동
아이언소스 SDK를 사용하여 아이언소스 및 미디에이티드 네트워크의 노출 수준 구매을 추적하세요.
요구 사항
- ironSource Unity SDK 구현( 시작 가이드 참조)
- IronSource 대시보드에서 ARM SDK 포스트백 플래그를 활성화합니다.
- 구매 콜백을 수신하도록 노출 데이터 리스너 설정
자세히 알아보기: 전체 설정에 대한 자세한 내용은 IronSource 광고 구매 문서를참조하세요.
구현
ImpressionDataReadyEvent 에 가입하여 구매 데이터를 캡처하고 전송하세요.
using UnityEngine;
using Singular;
public class IronSourceRevenueTracking : MonoBehaviour
{
void Start()
{
// Ensure the listener is added before initializing the SDK
IronSourceEvents.onImpressionDataReadyEvent += ImpressionDataReadyEvent;
// Initialize the IronSource SDK here if not already done
// IronSource.Agent.init("YOUR_IRONSOURCE_APP_KEY");
}
private void ImpressionDataReadyEvent(IronSourceImpressionData impressionData)
{
if (impressionData != null)
{
// Ensure revenue value is valid
double? revenue = impressionData.revenue;
if (revenue.HasValue && revenue.Value > 0)
{
// Create SingularAdData object with appropriate values
SingularAdData adData = new SingularAdData(
"IronSource",
"USD", // IronSource typically reports in USD
revenue.Value
);
// Send the Ad Revenue data to Singular
SingularSDK.AdRevenue(adData);
// Log the data for debugging
Debug.Log($"Ad Revenue reported to Singular: AdPlatform: {adData.AdPlatform}, " +
$"Currency: {adData.Currency}, Revenue: {adData.Revenue}");
}
else
{
Debug.LogError($"Invalid revenue value: {revenue}");
}
}
else
{
Debug.LogError("Impression data is null");
}
}
void OnDestroy()
{
// Detach the callback to prevent memory leaks
IronSourceEvents.onImpressionDataReadyEvent -= ImpressionDataReadyEvent;
}
}
TradPlus 연동
글로벌 노출 리스너를 사용하여 TradPlus 중개에서 광고 구매을 캡처하세요.
요구 사항:
-
TradplusAds.Instance().AddGlobalAdImpression()을 통해 글로벌 광고 노출 리스너를 추가합니다. -
OnGlobalAdImpression콜백을 처리하여 구매 데이터를 수신합니다. - eCPM을 밀리 단위에서 표준 통화로 변환(1000으로 나누기)
구현
글로벌 광고 노출 리스너를 등록하여 모든 광고 노출과 구매을 추적합니다.
using UnityEngine;
using Singular;
using System.Collections.Generic;
using System.Globalization;
public class TradPlusRevenueTracking : MonoBehaviour
{
private const string TAG = "TradPlusRevenue";
void Start()
{
// Add Global Ad Impression Listener
TradplusAds.Instance().AddGlobalAdImpression(OnGlobalAdImpression);
}
void OnGlobalAdImpression(Dictionary<string, object> adInfo)
{
// Ensure adInfo is not null
if (adInfo == null)
{
Debug.LogError($"{TAG}: AdInfo is null");
return;
}
// Ensure eCPM is present and valid
if (!adInfo.ContainsKey("ecpm") || adInfo["ecpm"] == null)
{
Debug.LogError($"{TAG}: eCPM value is null or missing");
return;
}
// Parse the eCPM value
if (!double.TryParse(adInfo["ecpm"].ToString(), NumberStyles.Float | NumberStyles.AllowThousands,
CultureInfo.InvariantCulture, out double revenue))
{
Debug.LogError($"{TAG}: Failed to parse eCPM value");
return;
}
// Convert eCPM to revenue (eCPM is in milli-units)
revenue = revenue / 1000.0;
// Validate the revenue value
if (revenue <= 0)
{
Debug.LogError($"{TAG}: Ad Revenue value out of expected range: {revenue}");
return;
}
// Create SingularAdData object with the necessary fields
SingularAdData data = new SingularAdData(
"TradPlus",
"USD",
revenue
);
// Send the Ad Revenue data to Singular
SingularSDK.AdRevenue(data);
// Log the data for debugging purposes
Debug.Log($"{TAG}: Ad Revenue reported to Singular: AdPlatform: {data.AdPlatform}, " +
$"Currency: {data.Currency}, Revenue: {data.Revenue}");
}
}
일반 연동(기타 플랫폼)
일반 SingularAdData 인터페이스를 사용하여 모든 미디에이션 플랫폼을 연동하세요.
요구 사항:
- 미디에이션 플랫폼에서 노출 수준 구매 데이터에 액세스할 수 있어야 합니다.
- 표준 통화 단위의 구매 금액(마이크로 단위가 아님)
- ISO 4217 통화 코드(예: USD, EUR, INR)
데이터 정확도: Singular로 전송하기 전에 구매 및 통화 데이터의 유효성을 검사하세요. 잘못된 데이터는 제출 후에는 수정할 수 없습니다.
구현
플랫폼 이름, 통화, 구매이 포함된 SingularAdData 개체를 생성한 다음 SingularSDK.AdRevenue() 으로 호출합니다.
using UnityEngine;
using Singular;
public class GenericAdRevenueTracking : MonoBehaviour
{
// Function to report ad revenue to Singular
public void ReportAdRevenue(string adPlatform, string currency, float revenue)
{
// Validate the input: ensure revenue is positive and currency is not null or empty
if (revenue > 0 && !string.IsNullOrEmpty(currency))
{
// Create a SingularAdData object with the validated data
SingularAdData data = new SingularAdData(
adPlatform,
currency,
revenue
);
// Send the ad revenue data to Singular
SingularSDK.AdRevenue(data);
// Log the reported data for debugging
Debug.Log($"Ad Revenue reported to Singular: Platform = {adPlatform}, " +
$"Currency = {currency}, Revenue = {revenue}");
}
else
{
// Log a warning if validation fails
Debug.LogWarning($"Invalid ad revenue data: Platform = {adPlatform}, " +
$"Revenue = {revenue}, Currency = {currency}");
}
}
// Example usage
void ExampleUsage()
{
// Report revenue from a custom mediation platform
ReportAdRevenue("MyMediationPlatform", "USD", 0.05f);
}
}
테스트 및 유효성 검사
구매 보고 확인
광고 구매 구현을 테스트하여 데이터가 Singular에 올바르게 전달되는지 확인합니다.
- 로그를 확인합니다: Unity 콘솔에서 구매 콜백 로그가 올바른 값과 통화로 표시되는지 확인합니다.
- 광고 테스트: 테스트 광고를 로드하고 표시하여 구매 이벤트를 트리거합니다.
- 대시보드 확인: 24시간 이내에 Singular 대시보드에 구매이 표시되는지 확인합니다.
- 데이터 정확도: 구매 금액이 미디에이션 플랫폼 리포트와 일치하는지 검증합니다.
문제 해결: Singular에 구매이 표시되지 않는 경우, 이를 확인하세요:
- Singular 계정에서 광고 구매 어트리뷰션이 활성화되어 있습니다.
- 구매 값이 0보다 큽니다.
- 통화 코드가 유효한 ISO 4217 코드입니다.
- 플랫폼 이름이 Singular의 예상 형식과 일치합니다.
- 광고가 로드되기 전에 이벤트 핸들러가 올바르게 등록되어 있습니다.