Skip to content

Commit

Permalink
Merge pull request #21 from LarsDR/master
Browse files Browse the repository at this point in the history
Expose the currency-parameter in addTrans-method
  • Loading branch information
Julien Bouquillon committed Mar 28, 2014
2 parents 878f3d5 + 12ad043 commit 0fb029f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var app = angular.module('app', ['angular-google-analytics'])

// tracking e-commerce
// - create transaction
Analytics.addTrans('1', '', '2.42', '0.42', '0', 'Amsterdam', '', 'Netherlands');
Analytics.addTrans('1', '', '2.42', '0.42', '0', 'Amsterdam', '', 'Netherlands', 'EUR');

// - add items to transaction
Analytics.addItem('1', 'sku-1', 'Test product 1', 'Testing', '1', '1');
Expand Down
4 changes: 2 additions & 2 deletions src/angular-google-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ angular.module('angular-google-analytics', [])
// add an action event
me._trackEvent(category, action, label, value);
},
addTrans: function (transactionId, affiliation, total, tax, shipping, city, state, country) {
me._addTrans(transactionId, affiliation, total, tax, shipping, city, state, country);
addTrans: function (transactionId, affiliation, total, tax, shipping, city, state, country, currency) {
me._addTrans(transactionId, affiliation, total, tax, shipping, city, state, country, currency);
},
addItem: function (transactionId, sku, name, category, price, quantity) {
me._addItem(transactionId, sku, name, category, price, quantity);
Expand Down

0 comments on commit 0fb029f

Please sign in to comment.