function hook_better_statistics_ajax_TYPE in Better Statistics 7
Handle statistics data passed via AJAX for a specific type of data.
This is identical to hook_better_statistics_ajax, but only invoked for a given type. This may be more appropriate if you're only implementing one custom data type as opposed to multiple custom data types.
Parameters
$payload: An associative array of data to be logged, stored, or reacted upon in some way.
See also
Related topics
File
- ./
better_statistics.api.php, line 310 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function hook_better_statistics_ajax_TYPE($payload) {
db_insert('my_TYPE_table')
->fields($payload)
->execute();
}