Automatically reported when predefined events and custom events occur for the first time on the device.
- (void)trackFirstEvent:(SEEventBaseAttribute *)attribute;
When using the attribute parameter, you need to pass a subclass instance of SEEventBaseAttribute. The specific instructions are as follows
First-time Event | Parameter Type | Description |
---|---|---|
Custom first-time event | SECustomEventAttribute | The required fields are the eventName attribute and firstCheckId attribute of the CustomEven object. |
First in-app ad impression event | SEAdImpressionEventAttribute | The required field is the firstCheckId attribute. For other required fields, please refer to "In-app ad impression event" |
First in-app ad click event | SEAdClickEventAttribute | The required field is the firstCheckId attribute. For other required fields, please refer to "In-app ad click event" |
First in-app purchase event | SEIAPEventAttribute | The required field is the firstCheckId attribute. For other required fields, please refer to "In-App purchase event" |
First self-reported attribution event | SEAppAttrEventAttribute | The required field is the firstCheckId attribute. For other required fields, please refer to "Self-reported attribution results event" |
First order event | SEOrderEventAttribute | The required field is the firstCheckId attribute. For other required fields, please refer to "In-app oredr event" |
First registration event | SERegisterEventAttribute | The required field is the firstCheckId attribute. For other required fields, please refer to "Registration event" |
First login event | SELoginEventAttribute | The required field is the firstCheckId attribute. For other required fields, please refer to "Login event" |
Note:
If the above required field firstCheckId is not passed, this call will be reported as a normal event.
Sample code for First custom event
SECustomEventAttribute *customAttribute = [[SECustomEventAttribute alloc] init];
customAttribute.eventName = @"test"; // required
customAttribute.firstCheckId = @"uniqueID"; // required
[[SolarEngineSDK sharedInstance] trackFirstEvent:customAttribute];
Sample code for First in-app purchase event
SEIAPEventAttribute *attribute = [[SEIAPEventAttribute alloc] init];
attribute.productID = @"Product ID";
attribute.productName = @"Product Name";
attribute.productCount = 1234;
attribute.orderId = @"Orderid111111";
attribute.payAmount = 6;
attribute.currencyType = @"CNY";
attribute.payType = SEIAPEventPayTypeWeixin;
attribute.payStatus = SolarEngineIAPFail;
attribute.failReason = @"test_failReason";
attribute.firstCheckId = @"uniqueID"; // required
[[SolarEngineSDK sharedInstance] trackFirstEvent:attribute];