my.FIRLogEvent
This guide shows you how to log events in your app using google analytics. you can begin to log events with the logEvent method. If you're already familiar with Google Analytics, this method is equivalent to using the event command in gtag.js.
Sample Code
copy
my.call('FIRLogEvent',{
name: 'ming',
parameters: {
name : "brain",
age : 34,
isBool: true
}
}).then((values)=>{
my.alert({
content:JSON.stringify(values)
});
}).catch((value)=>{
my.alert({
title:'faile',
content:JSON.stringify(value)
});
})
Parameters
Name | Type | Required | Description |
parameters | map | true | Dictionary<String : id>, The id can be string/double/int/bool |
name | string | true | event name |
Success Callback Function
Name | Type | Required | Description |
success | bool | true | Whether the JSAPI call was successful |
code | number | true | 0:success, -1:fail |
message | string | false |