diff options
| author | vta vta@openerp.com <> | 2013-01-09 10:50:49 +0100 |
|---|---|---|
| committer | vta vta@openerp.com <> | 2013-01-09 10:50:49 +0100 |
| commit | acfd3b3aa2381e254318f59b2c4948a685f4c4ee (patch) | |
| tree | 6ff551bcabe44d143af7c89d5f6023c610feb7ce /addons/web_analytics | |
| parent | 562b7bed64325d5d1e2111ff78c76dbd3552e6a5 (diff) | |
[FIX] Forgotten ',' and issue on calling _push_event
bzr revid: vta@openerp.com-20130109095049-4gb392x20iius6pj
Diffstat (limited to 'addons/web_analytics')
| -rw-r--r-- | addons/web_analytics/static/src/js/web_analytics.js | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/addons/web_analytics/static/src/js/web_analytics.js b/addons/web_analytics/static/src/js/web_analytics.js index 8d4c87d61e1..4777d14d384 100644 --- a/addons/web_analytics/static/src/js/web_analytics.js +++ b/addons/web_analytics/static/src/js/web_analytics.js @@ -23,7 +23,7 @@ openerp.web_analytics = function(instance) { instance.web_analytics.Tracker = instance.web.Class.extend({ /* - * This method initializes the tracker + * This method initializes the tracker */ init: function() { /* Comment this lines when going on production, only used for testing on localhost @@ -82,6 +82,44 @@ openerp.web_analytics = function(instance) { }); }, /* + * Method called in order to send _trackEvent to GA + */ + _push_event: function(options) { + _gaq.push(['_trackEvent', + options.category, + options.action, + options.label, + options.value, + options.noninteraction + ]); + }, + /* + * Method called in order to send ecommerce transactions to GA + */ + _push_ecommerce: function(trans_data, item_list) { + _gaq.push(['_addTrans', + trans_data.order_id, + trans_data.store_name, + trans_data.total, + trans_data.tax, + trans_data.shipping, + trans_data.city, + trans_data.state, + trans_data.country, + ]); + _.each(item_list, function(item) { + _gaq.push(['_addItem', + item.order_id, + item.sku, + item.name, + item.category, + item.price, + item.quantity, + ]); + }); + _gaq.push(['_trackTrans']); + }, + /* * This method contains the initialization of the object and view type * as an event in GA. */ @@ -194,44 +232,6 @@ openerp.web_analytics = function(instance) { }, }); }, - /* - * Method called in order to send _trackEvent to GA - */ - _push_event: function(options) { - _gaq.push(['_trackEvent', - options.category, - options.action, - options.label, - options.value, - options.noninteraction - ]); - }, - /* - * Method called in order to send ecommerce transactions to GA - */ - _push_ecommerce: function(trans_data, item_list) { - _gaq.push(['_addTrans', - trans_data.order_id, - trans_data.store_name, - trans_data.total, - trans_data.tax, - trans_data.shipping, - trans_data.city, - trans_data.state - trans_data.country, - ]); - _.each(item_list, function(item) { - _gaq.push(['_addItem', - item.order_id, - item.sku, - item.name, - item.category, - item.price, - item.quantity, - ]); - }); - _gaq.push(['_trackTrans']); - }, }); // ---------------------------------------------------------------- |
