Send AD sales and exposure information¶
When an ad is displayed in a game, the type of advertising platform, ad placement location, exposure time, and ad revenue per exposure can be measured and sent to third-party attribution. To send this advertising revenue and exposure information, call the sendAdRevenueEvent()
function of the Analytics API. The following is the example codes for sending ad impression information to marketing attribution.
// Send ad sales measurement event to third-party attribution
AnalyticsAdRevenue analyticsAdRevenue = new AnalyticsAdRevenue();
analyticsAdRevenue.revenue = 3.0; // advertising revenue
analyticsAdRevenue.adPlatform = "AD Platform"; // ad network platform name
analyticsAdRevenue.adUnitId = "Test Unit Id"; // ad unit ID
analyticsAdRevenue.adType = "RewardedAD"; // Ad exposure type
analyticsAdRevenue.adPlacement = "Test Rewarded AD"; // Ad exposure location
analyticsAdRevenue.currency = "USD"; //currency code (ISO 4217 standard)
Analytics.sendAdRevenueEvent(analyticsAdRevenue);
#include "HiveAnalytics.h"
FHiveAnalyticsAdRevenue AdRevenue;
AdRevenue.Revenue = 3.0; // advertising revenue
AdRevenue.AdPlatform = TEXT("AD Platform"); // ad network platform name
AdRevenue.AdUnitId = TEXT("Test Unit Id"); // ad unit ID
AdRevenue.AdType = TEXT("RewardedAD"); // Ad exposure type
AdRevenue.AdPlacement = TEXT("Test Rewarded AD"); // Ad exposure location
AdRevenue.Currency = TEXT("USD"); // currency code (ISO 4217 standard)
FHiveAnalytics::SendAdRevenueEvent(AdRevenue);
// Send ad sales measurement event to third-party attribution
AnalyticsAdRevenue analyticsAdRevenue;
analyticsAdRevenue.revenue = 3.0; // advertising revenue
analyticsAdRevenue.adPlatform = "AD Platform"; // ad network platform name
analyticsAdRevenue.adUnitId = "Test unit id"; // ad unit ID
analyticsAdRevenue.adType = "RewardedAD"; // Ad exposure type
analyticsAdRevenue.adPlacement = "Test Rewarded AD"; // Ad exposure location
analyticsAdRevenue.currency = "USD"; //currency code (ISO 4217 standard)
Analytics::sendAdRevenueEvent(analyticsAdRevenue);
// Send ad sales measurement event to third-party attribution
AnalyticsImpl.AnalyticsAdRevenue analyticsAdRevenue = new AnalyticsImpl.AnalyticsAdRevenue();
analyticsAdRevenue.setRevenue(3.0); // advertising revenue
analyticsAdRevenue.setAdPlatform("AD Platform"); // ad network platform name
analyticsAdRevenue.setAdUnitId("Test Unit Id"); // ad unit ID
analyticsAdRevenue.setAdType("RewardedAD"); // Ad exposure type
analyticsAdRevenue.setAdPlacement("Test Rewarded AD"); // Ad exposure location
analyticsAdRevenue.setCurrency("USD"); //currency code (ISO 4217 standard)
com.hive.Analytics.INSTANCE.sendAdRevenueEvent(analyticsAdRevenue);
// Send ad sales measurement event to third-party attribution
var analyticsAdRevenue: AnalyticsImpl.AnalyticsAdRevenue = AnalyticsImpl.AnalyticsAdRevenue()
analyticsAdRevenue.revenue = 3.0 // advertising revenue
analyticsAdRevenue.adPlatform = "AD Platform" // Ad network platform name
analyticsAdRevenue.adUnitId = "Test Unit Id" // Ad unit ID
analyticsAdRevenue.adType = "RewardedAD" // Ad exposure type
analyticsAdRevenue.adPlacement = "Test Rewarded AD" // Ad exposure position
analyticsAdRevenue.currency = "USD" // Currency code (ISO 4217 standard)
Analytics.sendAdRevenueEvent(analyticsAdRevenue)
// Send ad sales measurement event to third-party attribution
HIVEAnalyticsAdRevenue* adRevenue = [[HIVEAnalyticsAdRevenue alloc] init];
adRevenue.revenue = 3.0; // advertising revenue
adRevenue.adPlatform = "AD Platform"; // ad network platform name
adRevenue.adUnitId = "Test Unit Id"; // ad unit ID
adRevenue.adType = "RewardedAD"; // Ad exposure type
adRevenue.adPlacement = "Test Rewarded AD"; // Ad exposure location
adRevenue.currency = ""; //currency code (ISO 4217 standard)
[HIVEAnalytics sendAdRevenueEvent:adRevenue];
// Send ad sales measurement event to third-party attribution
let analyticsAdRevenue = AnalyticsAdRevenue()
analyticsAdRevenue.revenue = 3.0 // advertising revenue
analyticsAdRevenue.adPlatform = "AD Platform" // Ad network platform name
analyticsAdRevenue.adUnitId = "AD Unit Id" // Ad unit ID
analyticsAdRevenue.adType = "AD Type" // Ad exposure type
analyticsAdRevenue.adPlacement = "AD Placement" // Ad placement location
analyticsAdRevenue.currency = "USD" // Currency code (ISO 4217 standard)
AnalyticsInterface.sendAdRevenueEvent(analyticsAdRevenue)
AD exposure information¶
When sending ad exposure information, the information sent to third-party mobile app attribution is as follows.
Adjust | Singular | AppsFlyer | Firebase Analytics | |
---|---|---|---|---|
PARAMETER |
|
|
|
|