I added the script file to track events in Google Analytics and it works fine.
I am using the oneall api in two places (one in popups and one in registration page). I would like to track it as two different events to see which one performs better. Is there a way I can do that?
What you could do is create two .JS files with that code on your server. On one page you embed the first and on the other page the second file. Then you can edit the logged messages to differenciate the logs.
You then no longer need to embed our Google analytics tracking file.
Answers
the embedded file looks like this:
/* OneAll | Google Analytics Integration */ var _gaq = _gaq || [], _oneall = _oneall || [], _oneall_gat = { subdomain: "oneall", track: function() { var a, b; a = Array.prototype.slice.call(arguments); "object" == typeof console && console.log(a); b = (a.shift(), "_trackEvent"); a.shift(); _gaq.push([b].concat(a)) }, e: {} }; _oneall_gat.e.on_widget_loaded = function() { _oneall_gat.track("event", "on_widget_loaded", "[" + _oneall_gat.subdomain + "] Widget Loaded") }; _oneall_gat.e.on_open_popup_ui = function(a) { _oneall_gat.track("event", "on_open_popup_ui", "[" + _oneall_gat.subdomain + "] Modal Dialog Opened", a.service) }; _oneall_gat.e.on_close_popup_ui = function(a) { _oneall_gat.track("event", "on_close_popup_ui", "[" + _oneall_gat.subdomain + "] Modal Dialog Closed", a.service) }; _oneall_gat.e.on_login_begin = function(a) { _oneall_gat.track("event", "on_login_begin", "[" + _oneall_gat.subdomain + "] Login: Begin", a.service, a.provider.name) }; _oneall_gat.e.on_login_end_success = function(a) { _oneall_gat.track("event", "on_login_end_success", "[" + _oneall_gat.subdomain + "] Login: Sucess", a.service, a.provider.name) }; _oneall_gat.e.on_login_end_error = function(a) { _oneall_gat.track("event", "on_login_end_error", "[" + _oneall_gat.subdomain + "] Login: Error", a.service, a.provider.name) }; _oneall_gat.e.on_login_end_cancelled = function(a) { _oneall_gat.track("event", "on_login_end_cancelled", "[" + _oneall_gat.subdomain + "] Login: Cancelled", a.service, a.provider.name) }; (function() { _oneall.push( ["*", "set_event", "on_widget_loaded", _oneall_gat.e.on_widget_loaded()], ["*", "set_event", "on_open_popup_ui", _oneall_gat.e.on_open_popup_ui], ["*", "set_event", "on_close_popup_ui", _oneall_gat.e.on_close_popup_ui], ["*", "set_event", "on_login_begin", _oneall_gat.e.on_login_begin], ["*", "set_event", "on_login_end_success", _oneall_gat.e.on_login_end_success], ["*", "set_event", "on_login_end_error", _oneall_gat.e.on_login_end_error], ["*", "set_event", "on_login_end_cancelled", _oneall_gat.e.on_login_end_cancelled]) })();
What you could do is create two .JS files with that code on your server.
On one page you embed the first and on the other page the second file.
Then you can edit the logged messages to differenciate the logs.
You then no longer need to embed our Google analytics tracking file.