Yahoo Mobile Audiences Standard Events
Events track standardized actions that users take within your app – for example, making a purchase, adding a social comment, or clicking on an ad. This helps you understand how users interact with your app. This page will show you how to easily capture this information by walking through a hypothetical purchase event.
The Yahoo Mobile SDK will automatically send click and impression standard events to provide the best possible ad experience. To optimize this experience, it is important to capture events from all monetization sources and fire as many Standard Events as is practical when mediating to the Yahoo Mobile SDK through another SDK (eg. AppLovin).
Standard Events for Publisher Audiences
For publishers that monetize with Yahoo Mobile SDK, Yahoo Mobile Audiences can create audiences based only on your Standard Event data. These audiences will be scored on a daily basis and made available for ad calls through the Yahoo Ad Network.
Important: You can track up to 1000 unique standard events per session. Once a single session hits the 1000 standard event limit, no further events will be tracked. Note that this limit is separate from other types of events such as custom events.
Here is an example of logging a purchase event using the standard event protocol:
YahooAudiencesEvent.Params params = new YahooAudiencesEvent.Params()
.putDouble (YahooAudiencesEvent.Param.TOTAL_AMOUNT, 34.99)
.putBoolean(YahooAudiencesEvent.Param.SUCCESS, true)
.putString (YahooAudiencesEvent.Param.ITEM_NAME, "book 1")
.putString ("note", "This is an awesome book to purchase !!!");
YahooAudiences.logEvent(YahooAudiencesEvent.PURCHASED, params);
val params: YahooAudiencesEvent.Params = YahooAudiencesEvent.Params()
.putDouble(YahooAudiencesEvent.Param.TOTAL_AMOUNT, 34.99)
.putBoolean(YahooAudiencesEvent.Param.SUCCESS, true)
.putString(YahooAudiencesEvent.Param.ITEM_NAME, "book 1")
.putString("note", "This is an awesome book to purchase !!!")
YahooAudiences.logEvent(YahooAudiencesEvent.PURCHASED, params)
YahooAudiencesParamBuilder *param = [[[[[[YahooAudiencesParamBuilder alloc] init]
setDouble:34.99 forParam:YahooAudiencesParamBuilder.totalAmount]
setBoolean:YES forParam:YahooAudiencesParamBuilder.success]
setString:@"book 1" forParam:YahooAudiencesParamBuilder.itemName]
setString:@"This is an awesome book to purchase !!!" forKey:@"note"];
[YahooAudiences logEventWithEventType:YahooAudiencesEventPurchased andParamBuilder:param];
let param = YahooAudiencesParamBuilder()
.setDouble(34.99, forParam: YahooAudiencesParamBuilder.totalAmount)
.setBoolean(true, forParam: YahooAudiencesParamBuilder.success)
.setString("book 1", forParam: YahooAudiencesParamBuilder.itemName)
.setString("This is an awesome book to purchase !!!", forKey: "note")
YahooAudiences.logEvent(YahooAudiencesEvent.purchased, with: param)
Each standard event can have up to 10 parameters, and each parameter can have an infinite value length associated with it. For example, for the ‘Note’ parameter, there may be 1,000 or more characters in the value.
Event Names for Standard Event
A standard event has a two-level structure. The highest level is the specific action, in this case the purchasing of an item. For this example, we are using the SDK standardized event name YahooAudiencesEvent.PURCHASED/YahooAudiencesEventPurchased
.
In YahooAudiencesEvent enum, Yahoo Android SDK defines 58 standardized event names, and they are categorized in advertising, gaming, content, commerce, membership, onboarding, registration, search, social, media, and privacy.
Event Type |
Event Name |
Description |
Suggested Standardized Parameters |
Mandatory Standardized Parameters |
---|---|---|---|---|
Advertising |
AdClick |
Log this event when a user clicks on an Ad |
adType |
|
Advertising |
AdImpression |
Log this event when a user views an Ad impression |
adType |
|
Advertising |
AdRewarded |
Log this event when a user is granted a reward for viewing a rewarded Ad |
adType |
|
Advertising |
AdSkipped |
Log this event when a user skips an Ad |
adType |
|
Gaming |
CreditsSpent |
Log this event when a user spends credit in the app |
levelNumber, totalAmount, isCurrencySoft, creditType, creditId, creditName, currencyType |
totalAmount |
Gaming |
CreditsPurchased |
Log this event when a user purchases credit in the app |
levelNumber, totalAmount, isCurrencySoft, creditType, creditId, creditName, currencyType |
totalAmount |
Gaming |
CreditsEarned |
Log this event when a user earns credit in the app |
levelNumber, totalAmount, isCurrencySoft, creditType, creditId, creditName, currencyType |
totalAmount |
Gaming |
AchievementUnlocked |
Log this event when a user unlocks an achievement in the app |
achievementId |
|
Gaming |
LevelCompleted |
Log this event when an App user completes a level |
levelNumber, levelName |
levelNumber |
Gaming |
LevelFailed |
Log this event when an App user fails a level |
levelNumber, levelName |
levelNumber |
Gaming |
LevelUp |
Log this event when an App user levels up |
levelNumber, levelName |
levelNumber |
Gaming |
LevelStarted |
Log this event when an App user starts a level |
levelNumber, levelName |
levelNumber |
Gaming |
LevelSkip |
Log this event when an App user skips a level |
levelNumber, levelName |
levelNumber |
Gaming |
ScorePosted |
Log this event when an App user posts his score |
levelNumber, score |
score |
Content |
ContentRated |
Log this event when a user rates a content in the App |
contentId, contentType, contentName, rating |
contentId, rating |
Content |
ContentViewed |
Log this event when a specific content is viewed by a user |
contentId, contentType, contentName |
contentId |
Content |
ContentSaved |
Log this event when a user saves the content in the App |
contentId, contentType, contentName |
contentId |
Content |
ProductCustomized |
Log this event when a user customizes the App/product |
||
Commerce |
AppActivated |
Log this event when the App is activated |
||
Commerce |
ApplicationSubmitted |
Log this event when a user submits an application through the App |
||
Commerce |
AddItemToCart |
Log this event when an item is added to the cart |
itemCount, price, itemId, itemName, itemType |
itemCount, price |
Commerce |
AddItemToWishList |
Log this event when an item is added to the wish list |
itemCount, price, itemId, itemName, itemType |
itemCount, price |
Commerce |
CompletedCheckout |
Log this event when checkout is completed or transaction is successfully completed |
itemCount, totalAmount, currencyType, transactionId |
itemCount, totalAmount |
Commerce |
PaymentInfoAdded |
Log this event when payment information is added during a checkout process |
success, paymentType |
|
Commerce |
ItemViewed |
Log this event when an item is viewed |
itemId, itemName, itemType, price |
itemId |
Commerce |
ItemListViewed |
Log this event when a list of items is viewed |
itemListType |
|
Commerce |
Purchased |
Log this event when a user does a purchase in the App |
itemCount, totalAmount, itemId, success, itemName, itemType, currencyType, transactionId |
totalAmount |
Commerce |
PurchaseRefunded |
Log this event when a purchase is refunded |
price, currencyType |
price |
Commerce |
RemoveItemFromCart |
Log this event when a user removes an item from the cart |
itemId, price, itemName, itemType |
itemId |
Commerce |
CheckoutInitiated |
Log this event when a user starts checkout |
itemCount, totalAmount |
itemCount, totalAmount |
Commerce |
FundsDonated |
Log this event when a user donates fund to your App or through the App |
price, currencyType |
price |
Commerce |
UserScheduled |
Log this event when user schedules an appointment using the App |
||
Commerce |
OfferPresented |
Log this event when an offer is presented to the user |
itemId, itemName, itemCategory, price |
itemId, price |
Membership |
SubscriptionStarted |
Log this event at the start of a paid subscription for a service or product |
price, isAnnualSubscription, trialDays, predictedLTV, currencyType, subscriptionCountry |
price, isAnnualSubscription |
Membership |
SubscriptionEnded |
Log this event when a user unsubscribes from a paid subscription for a service or product |
isAnnualSubscription, currencyType, subscriptionCountry |
isAnnualSubscription |
Membership |
GroupJoined |
Log this event when user joins a group. |
groupName |
|
Membership |
GroupLeft |
Log this event when user leaves a group |
groupName |
|
Onboarding |
TutorialStarted |
Log this event when a user starts a tutorial |
tutorialName |
|
Onboarding |
TutorialCompleted |
Log this event when a user completes a tutorial |
tutorialName |
|
Onboarding |
TutorialStepCompleted |
Log this event when a specific tutorial step is completed |
stepNumber, tutorialName |
stepNumber |
Onboarding |
TutorialSkipped |
Log this event when user skips the tutorial |
stepNumber, tutorialName |
stepNumber |
Registration |
Login |
Log this event when a user login on the App |
userId, method |
|
Registration |
Logout |
Log this event when a user logout of the App |
userId, method |
|
Registration |
UserRegistered |
Log the event when a user registers (signup). Helps capture the method used to sign-up (signup with google/apple or email address) |
userId, method |
|
Search |
SearchResultViewed |
Log this event when user views search results |
query, searchType (e.g. voice, text) |
|
Search |
KeywordSearched |
Log this event when a user searches for a keyword using Search |
query, searchType (e.g. voice, text) |
|
Search |
LocationSearched |
Log this event when a user searches for a location using Search |
query |
|
Social |
Invite |
Log this event when a user invites another user |
userId, method |
|
Social |
Share |
Log this event when a user shares content with another user in the App |
socialContentId, socialContentName, method |
socialContentId |
Social |
Like |
Log this event when a user likes a social content. e.g. likeType captures what kind of like is logged (“celebrate”, “insightful”, etc) |
socialContentId, socialContentName, likeType |
socialContentId |
Social |
Comment |
Log this event when a user comments or replies on a social post |
socialContentId, socialContentName |
socialContentId |
Media |
MediaCaptured |
Log this event when an image, audio or a video is captured |
mediaId, mediaName, mediaType |
|
Media |
MediaStarted |
Log this event when an audio or video starts |
mediaId, mediaName, mediaType |
|
Media |
MediaStopped |
Log this event when an audio or video is stopped |
mediaId, duration (in seconds), mediaName, mediaType |
duration (in seconds) |
Media |
MediaPaused |
Log this event when an audio or video is paused |
mediaId, duration (in seconds), mediaName, mediaType |
duration (in seconds) |
Privacy |
PrivacyPromptDisplayed |
Log this event when a privacy prompt is displayed |
||
Privacy |
PrivacyOptIn |
Log this event when a user opts in (on the privacy prompt) |
||
Privacy |
PrivacyOptOut |
Log this event when a user opts out (on the privacy prompt) |
Capture the Event Parameters
The second level in the standard event structure is the event parameter, which will be an instance of SDK defined Builder class: YahooAudiencesEvent.Params/YahooAudiencesParamBuilder
. When logging a standard event, you can add your own custom parameters to the standardized parameters. There are recommended standardized parameter keys and mandatory standardized parameter keys defined for each standard event. For instance, to log YahooAudiencesEvent.PURCHASED/YahooAudiencesEventPurchased
event name, it is suggested that you include itemCount, totalAmount, itemId, success, itemName, itemType, currencyType and transactionId parameters, in which totalAmount is also a mandatory parameter that is indicated by the SDK. There are a total of 42 standardized parameter keys that can be inserted by 5 methods (putString, putInteger/putLong, putDouble, putBoolean). Each type of standardized parameter key can only be mapped to its corresponding data value - string, integer/long, double, boolean. So when you assemble your YahooAudiencesEvent.Params/YahooAudiencesParamBuilder
object with the standardized parameters, you will need to use the public APIs specified in YahooAudiencesEvent.Params/YahooAudiencesParamBuilder
class to map them correctly.
Param Name |
DataType |
---|---|
adType |
string |
levelName |
string |
levelNumber |
int |
contentName |
string |
contentType |
string |
contentId |
string |
creditName |
string |
creditType |
string |
creditId |
string |
isCurrencySoft |
boolean |
currencyType |
string |
paymentType |
string |
itemName |
string |
itemType |
string |
itemId |
string |
itemCount |
int |
itemCategory |
string |
itemListType |
string |
price |
double |
totalAmount |
double |
achievementId |
string |
score |
int |
rating |
string |
transactionId |
string |
success |
boolean |
isAnnualSubscription |
boolean |
subscriptionCountry |
string |
trialDays |
int |
predictedLTV |
string |
groupName |
string |
tutorialName |
string |
stepNumber |
int |
userId |
string |
method |
string |
query |
string |
searchType |
string |
socialContentName |
string |
socialContentId |
string |
likeType |
string |
mediaName |
string |
mediaType |
string |
mediaId |
string |
duration |
int |