Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2016-09-26 02:14:47 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-09-26 02:14:47 +0300
commit1f2738debc89b63b05193fb75f50a812319c9348 (patch)
treec0be158e2059650aae772f2eeca996464332e456 /js
parentab3eba1b854e978ed4f3bcb3b144a4fff2964aab (diff)
add callback method to track event
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 658db1580c..fcfd1aa9d7 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -4639,7 +4639,7 @@ if (typeof window.Piwik !== 'object') {
/*
* Log the event
*/
- function logEvent(category, action, name, value, customData)
+ function logEvent(category, action, name, value, customData, callback)
{
// Category and Action are required parameters
if (String(category).length === 0 || String(action).length === 0) {
@@ -4651,7 +4651,7 @@ if (typeof window.Piwik !== 'object') {
'event'
);
- sendRequest(request, configTrackerPause);
+ sendRequest(request, configTrackerPause, callback);
}
/*
@@ -6354,11 +6354,12 @@ if (typeof window.Piwik !== 'object') {
* @param string action The Event's Action (Play, Pause, Duration, Add Playlist, Downloaded, Clicked...)
* @param string name (optional) The Event's object Name (a particular Movie name, or Song name, or File name...)
* @param float value (optional) The Event's value
+ * @param function callback
* @param mixed customData
*/
- this.trackEvent = function (category, action, name, value, customData) {
+ this.trackEvent = function (category, action, name, value, customData, callback) {
trackCallback(function () {
- logEvent(category, action, name, value, customData);
+ logEvent(category, action, name, value, customData, callback);
});
};