Integrate event tags
After installing the AdSDK, you need to Initialise the core SDK and the event tracking will be automatically available.
Device data, sessions and ad events are recorded automatically whereas the Purchase (IAP), Progression, Receive and Spend events are configured manually throughout the game or app.
How many events should I integrate?
The more events you integrate, the better the predictions are. With better predictions we are able to better match users to ads, generating higher revenue for you. Nefta suggests 10-20 manually recorded events of the most frequent Purchase, Progression, Receive and Spend events.
Purchase event (IAP)
For tracking player in app purchases (IAPs):
// Iap name, Localized price of purchase, Currency
new PurchaseEvent("iap name", 2.99m, "USD").Record();
// Iap name, Localized price of purchase, Currency
NeftaPlugin._instance.Events.AddPurchaseEvent(name: "iap name", price: 3.99, currency: "USD")
// Iap name, Localized price of purchase, Currency
[NeftaPlugin._instance.Events AddPurchaseEventWithName: @"iap name" price: [[NSDecimalNumber decimalNumberWithString:@"2.99"] decimalValue] currency: @"USD"];
// Iap name, Localized price of purchase in micros, Currency
NeftaPlugin.Events.AddPurchaseEvent("iap name", 2990000, "USD");
Progression event
For tracking player progress through the application:
// Just record progression
NeftaEvents.Record(new ProgressionEvent());
// Record progression event with a bit more information
NeftaEvents.Record(new ProgressionEvent() { _name = "tutorial", _status = Status.Start });
// Record progression event in full detail
NeftaEvents.Record(new ProgressionEvent()
{
_name = "tutorial",
_status = Status.Start,
_type = Type.GameplayUnit,
_source = Source.CoreContent,
_value = 3,
_customString = "group-D"
});
_neftaEvents.AddProgressionEvent(status: NeftaEvents.ProgressionStatus.Start,
type: NeftaEvents.ProgressionType.GameplayUnit,
source: NeftaEvents.ProgressionSource.CoreContent,
name: @"area-4",
value: 21)
[_plugin.Events AddProgressionEventWithStatus: ProgressionStatusStart
type: ProgressionTypeGameplayUnit
source: ProgressionSourceCoreContent
name: "area-4"
value: 21];
Receive Event
Event for recording the player receiving any resource:
// Record just receiving of any resource
NeftaEvents.Record(new ReceiveEvent());
// Record a bit more information about receiving
NeftaEvents.Record(new ReceiveEvent({ _name = "coins", _category = Category.SoftCurrency, _quantity = 5 });
// Record receiving of resources in full details
NeftaEvents.Record(new ReceiveEvent(
{
_name = "coins",
_category = Category.SoftCurrency,
_quantity = 5,
_method = ReceiveMethod.Reward,
_customString = "daily-2"
});
AddReceiveEvent(category: ResourceCategory.Other,
method: ReceiveMethod.Shop,
name: "name2",
quantity: 2,
customPayload: "{\"field\":\"value\"}")
[_plugin.Events AddReceiveEventWithCategory:ResourceCategoryConsumable
method:ReceiveMethodCreate
name:"name2"
quantity:2
customPayload:@"{\"field\":\"value\"}"];
Spend event
Event for tracking player spending any resource:
// Record just spending of any resource
NeftaEvents.Record(new SpendEvent());
// Record a bit more information about spending
NeftaEvents.Record(new SpendEvent({ _name = "coins", _category = Category.SoftCurrency, _quantity = 10 }););
// Record spending of resources in full details
NeftaEvents.Record(new SpendEvent(
{
_name = "coins",
_category = Category.SoftCurrency,
_quantity = 10
_method = SpendMethod.Continuity,
_customString = "world-3;segment-4;speed-8"
});
_neftaEvents.AddSpendEvent(category: NeftaEvents.ResourceCategory.PremiumCurrency,
method: NeftaEvents.SpendMethod.Upgrade)
[_plugin.Events AddSpendEventWithCategory: ResourceCategoryPremiumCurrency
method: SpendMethodUpgrade];
Quantity
Should always be a positive number.
Very large numbers (values over billion) will be truncated.
Updated 3 days ago