analytics_event_ext


Description

This function will send the specified text to the analytics provider that you have set up through the HTML5 Game Options. This function can be used to create a custom analytic to track something outside of the scope of the provider being used, and will also accept custom parameter/value pairs, where the parameter is a string and the value a real number. For Google Analytics, you can only add in one extra pair while Flurry will accept up to 7.


Syntax:

analytics_event_ext(string, string_param, value);


Argument Description
string A string to send to the provider.
string_param[0 -9] The parameter to send (a string).
value[0 - 9] The value of the parameter (a real number).


Returns:

N/A


Example:

var num, time;
ini_open("Options.ini");
num = ini_read_real("Data", "Plays", 0);
num += 1;
time = current_time;
analytics_event_ext(GAME_NAME, "Plays", num, "Time", time);
ini_write_real("Data", "Plays", num);
ini_close();

The above code will get play information from an ini file as well as the current time and then send those details to the analytics provider.