All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit b8f6331b authored by Leigh B Stoller's avatar Leigh B Stoller

Generate some GA events from the ajax request path, playing around.

parent 8f51dec6
......@@ -106,6 +106,14 @@ window.APT_OPTIONS.initialize = function (sup)
$('body').show();
};
window.APT_OPTIONS.gaAjaxEvent = function (route, method, code)
{
if (window.GOOGLEUA === undefined) {
return;
}
ga('send', 'event', 'ajax', route, method, code);
}
APT_OPTIONS.CallServerMethod = function (url, route, method, args, callback)
{
// ignore url now.
......@@ -118,7 +126,12 @@ APT_OPTIONS.CallServerMethod = function (url, route, method, args, callback)
return $.ajax({
// the URL for the request
url: url,
success: callback,
success: function (json) {
window.APT_OPTIONS.gaAjaxEvent(route, method, json.code);
if (callback !== undefined) {
callback(json);
}
},
// the data to send (will be converted to a query string)
data: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment