Skip to main content
Version: 10.5.x

bfgGameReporting Class

Static Public Member Functions

static void logLevelStart (string levelID)
 Currently only works on Android. Game should call this each time a level has started. More...
 
static void logLevelFinished (string levelID)
 Game should call this each time a level is finished. More...
 
static bool logCustomEventSerialized (string name, long _value, long level, string details1, string details2, string details3, string additionalDetails)
 Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent. More...
 
static bool logCustomEvent (string name, string[] additionalDetailsKeys, string[] additionalDetailsValues)
 Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent. More...
 
static bool logCustomEvent (string name, Dictionary< string, string > additionalDetails)
 Log a custom event to Big Fish Mobile Telemetry Services. More...
 
static bool logCustomEvent (string name, long _value, long level, string details1, string details2, string details3, Dictionary< string, string > additionalDetails)
 Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent. More...
 
static bool logCustomEvent (string name, long value, long level, string details1, string details2, string details3, string[] additionalDetailsKeys, string[] additionalDetailsValues)
 Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent. More...
 
static void logCustomPlacement (string placementName)
 Game should call this to log a custom placement. More...
 
static void dismissVisiblePlacement ()
 If a placement is showing, it is automatically and instantly dismissed. If no placement is showing, does nothing. More...
 
static void setSuppressPlacement (bool suppressPlacements)
 If it would be inappropriate for a placement ad to appear over the game in the moment, set suppressPlacements to true. As soon as it is ok to show placements again, be sure to set it back to false. More...
 
static void setPlayerSpend (float playerSpend)
 Set the Player Spend (LTV) to be added as a custom field in Zendesk requests More...
 
static void setLastLevelPlayed (string lastLevel)
 Set the last level played by the user to be added as a custom field in the Zendesk request More...
 
static void logRewardedVideoSeenWithProviderVideoLocation (string provider, string videoLocation)
 Log rewarded video event. Calling this method will send an event to Big Fish servers that reports that a rewarded video was watched. At a minimum you must provide the videoProvider parameter, otherwise the event will not send. You can also optionally pass along the videoLocation where this rewarded video was viewed. More...
 
static void logRewardedVideoSeenWithProvider (string provider)
 Log rewarded video event, facilitates logging rewarded video when video location parameter is not applicable. More...
 
static void setCustomData (Dictionary< long, string > customData)
 Add custom data fields to the next Zendesk request. Each field is defined using a Zendesk-specific ID number and a string value. More...
 
static void getCustomData ()
 This method has not been implemented due to the difficulty of returning a Map<long, string> from Objective-c back up to C#.
 
static void reportUserAcquisitionEvent (string eventName, string eventDetailsJsonString)
 Report an event to the active User Acquisition SDK More...
 

Member Function Documentation

◆ dismissVisiblePlacement()

static void BFGSDK.bfgGameReporting.dismissVisiblePlacement ()
inlinestatic
If a placement is showing, it is automatically and instantly dismissed. If no placement is showing, does nothing.
Warning
iOS only.

◆ logCustomEvent() [1/4]

static bool BFGSDK.bfgGameReporting.logCustomEvent (string name,
Dictionary< string, string > additionalDetails 
)
inlinestatic
Log a custom event to Big Fish Mobile Telemetry Services. WARNING: The Big Fish Mobile Telemetry Services backend rejects custom events that exceed the maximum size. The maximum size is 6000 bytes as of v9.1.0 but is subject to change.
Returns
true, if custom event was logged, false otherwise.
Parameters
nameEvent name that cannot be null. Pass in "" (empty string) as a string if necessary.
additionalDetailsAdditional details passed on in a (string, string) dictionary.
Returns

◆ logCustomEvent() [2/4]

static bool BFGSDK.bfgGameReporting.logCustomEvent (string name,
long _value,
long level,
string details1,
string details2,
string details3,
Dictionary< string, string > additionalDetails 
)
inlinestatic
Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent. WARNING: the Dictionary(string,string) must not take serialized JSON. Please use the other logCustomEvent() method for that.
Returns
true, if custom event was loged, false otherwise.
Parameters
nameEvent name that cannot be null. Pass in "" (empty string) as a string if necessary.
_valueAn optional arbitrary value you assign to associate with the event.
levelOptional integer value between 0 and 255 associated with the current game level.
details1Optional string data, max size is 32 characters. Required if using details2.
details2Optional string data, max size is 32 characters. Required if using details3.
details3Optional string data, max size is 32 characters.
additionalDetailsAdditional details passed on in a (string, string) dictionary.

◆ logCustomEvent() [3/4]

static bool BFGSDK.bfgGameReporting.logCustomEvent (string name,
long value,
long level,
string details1,
string details2,
string details3,
string[] additionalDetailsKeys,
string[] additionalDetailsValues 
)
inlinestatic
Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent.
Returns
true, if custom event was logged, false otherwise.
Parameters
nameEvent name that cannot be null. Pass in "" (empty string) as a string if necessary.
valueAn optional arbitrary value you assign to associate with the event.
levelOptional integer value between 0 and 255 associated with the current game level.
details1Optional string data, max size is 32 characters. Required if using details2.
details2Optional string data, max size is 32 characters. Required if using details3.
details3Optional string data, max size is 32 characters.
additionalDetailsKeysOptional string array of keys to reference additional details in another parameter.
additionalDetailsValuesOptional string array of additional details associated with keys in another parameter.
Returns

◆ logCustomEvent() [4/4]

static bool BFGSDK.bfgGameReporting.logCustomEvent (string name,
string[] additionalDetailsKeys,
string[] additionalDetailsValues 
)
inlinestatic
Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent. WARNING: the Dictionary(string,string) must not take serialized JSON. Please use the other logCustomEvent() method for that.
Returns
true, if custom event was loged, false otherwise.
Parameters
nameEvent name that cannot be null. Pass in "" (empty string) as a string if necessary.
_valueAn optional arbitrary value you assign to associate with the event.
levelOptional integer value between 0 and 255 associated with the current game level.
details1Optional string data, max size is 32 characters. Required if using details2.
details2Optional string data, max size is 32 characters. Required if using details3.
details3Optional string data, max size is 32 characters.
additionalDetailsAdditional details passed on in a (string, string) dictionary.

◆ logCustomEventSerialized()

static bool BFGSDK.bfgGameReporting.logCustomEventSerialized (string name,
long _value,
long level,
string details1,
string details2,
string details3,
string additionalDetails 
)
inlinestatic
Log a custom event to Big Fish Mobile Telemetry Services. Based on a prior telemetry service that is now deprecated. Although event name is no longer required by the Mobile Telemetry Services, this method has not changed, so it's still required that a value be passed to it. The event will not be sent if the event name is null. Other null fields will not be sent.
Returns
true, if custom event was logged, false otherwise.
Parameters
nameEvent name that cannot be null. Pass in "" (empty string) as a string if necessary.
_valueAn optional arbitrary value you assign to associate with the event.
levelOptional integer value between 0 and 255 associated with the current game level.
details1Optional string data, max size is 32 characters. Required if using details2.
details2Optional string data, max size is 32 characters. Required if using details3.
details3Optional string data, max size is 32 characters.
additionalDetailsAdditional details passed on in a JSON string format.
Deprecated:\n Deprecated since Unity Wrapper 7.0, please use logCustomEvent(name, additionalDetails).

◆ logCustomPlacement()

static void BFGSDK.bfgGameReporting.logCustomPlacement (string placementName)
inlinestatic
Game should call this to log a custom placement.
Parameters
placementNameDeveloper-defined interstitial placement category (i.e. main-menu, level-end, launched)

◆ logLevelFinished()

static void BFGSDK.bfgGameReporting.logLevelFinished (string levelID)
inlinestatic
Game should call this each time a level is finished.
Parameters
levelIDIdentifier of the level that was finished.

◆ logLevelStart()

static void BFGSDK.bfgGameReporting.logLevelStart (string levelID)
inlinestatic
Currently only works on Android. Game should call this each time a level has started.
Parameters
levelIDIdentifier of the level that was started.

◆ logRewardedVideoSeenWithProvider()

static void BFGSDK.bfgGameReporting.logRewardedVideoSeenWithProvider (string provider)
inlinestatic
Log rewarded video event, facilitates logging rewarded video when video location parameter is not applicable.
Parameters
providerprovider from which video was supplied

◆ logRewardedVideoSeenWithProviderVideoLocation()

static void BFGSDK.bfgGameReporting.logRewardedVideoSeenWithProviderVideoLocation (string provider,
string videoLocation 
)
inlinestatic
Log rewarded video event. Calling this method will send an event to Big Fish servers that reports that a rewarded video was watched. At a minimum you must provide the videoProvider parameter, otherwise the event will not send. You can also optionally pass along the videoLocation where this rewarded video was viewed.
Parameters
providerprovider from which video was displayed (e.g. vungle)
videoLocationlocation where video was viewed (e.g. main_menu)

◆ reportUserAcquisitionEvent()

static void BFGSDK.bfgGameReporting.reportUserAcquisitionEvent (string eventName,
string eventDetailsJsonString 
)
inlinestatic
Report an event to the active User Acquisition SDK
Warning
This event will only be sent if user has opted in to the ThirdPartyTargetedAdvertising policy
Parameters
eventNameName of event
eventDetailsJsonStringJSON string with event details

◆ setCustomData()

static void BFGSDK.bfgGameReporting.setCustomData (Dictionary< long, string > customData)
inlinestatic
Add custom data fields to the next Zendesk request. Each field is defined using a Zendesk-specific ID number and a string value. The string values should be consistently formatted for display, depending on data type, as follows:
  • Text: Text strings can be formatted as the developer thinks appropriate or as otherwise specified.
  • Numeric: Integer value. Commas and other separators are not allowed.
  • Decimal: Floating point value, formatted in IEEE 754 string format (e.g.Double.toString(someDoubleValue) or Float.toString(someFloatValue)).
  • Boolean: "true" or "false".
  • Date: ISO 8601 date format string, must be formatted as YYYY-MM-DD(2018-12-06). Including the time is not supported.
  • DropDown: String that matches the tag for the corresponding value.For example, BFC/JMS would use sdk_vip_#, such as "sdk_vip_11" for VIP 11.
Parameters
customDataA collection of ID/Value pairs to provide to Zendesk as extra, game-specific data. The IDs are defined in Zendesk, specifically by each game that requires them and uniquely identifies the corresponding value. For example, an ID/Value pair of 123456789 and "123.45" could be used to specify the total recent purchase amount as $123.45, and give a corresponding custom field with an id of 123456789.

◆ setLastLevelPlayed()

static void BFGSDK.bfgGameReporting.setLastLevelPlayed (string lastLevel)
inlinestatic
Set the last level played by the user to be added as a custom field in the Zendesk request
Parameters
lastLevelLast level the user played before hitting support

◆ setPlayerSpend()

static void BFGSDK.bfgGameReporting.setPlayerSpend (float playerSpend)
inlinestatic
Set the Player Spend (LTV) to be added as a custom field in Zendesk requests
Parameters
playerSpendValue to be added to the Zendesk requests

◆ setSuppressPlacement()

static void BFGSDK.bfgGameReporting.setSuppressPlacement (bool suppressPlacements)
inlinestatic
If it would be inappropriate for a placement ad to appear over the game in the moment, set suppressPlacements to true. As soon as it is ok to show placements again, be sure to set it back to false.
Parameters
suppressPlacementsWhether to suppress them or not