File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,11 @@ ShareASale.prototype.orderCompleted = function(track) {
3636 var orderId = track . orderId ( ) ;
3737 var isRepeat = track . proxy ( 'properties.repeat' ) ;
3838 var subtotal = ( track . subtotal ( ) || 0 ) . toFixed ( 2 ) ;
39+ var total = ( track . total ( ) || 0 ) . toFixed ( 2 )
3940 var orderTotal =
4041 this . options . useTotalAsAmount && track . total ( )
41- ? track . total ( ) . toFixed ( 2 )
42- : subtotal . toFixed ( 2 ) ;
42+ ? total
43+ : subtotal ;
4344 var products = track . products ( ) ;
4445 var currency = track . currency ( ) || this . options . currency ;
4546 var coupon = track . coupon ( ) || '' ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @segment/analytics.js-integration-shareasale" ,
33 "description" : " The Shareasale analytics.js integration." ,
4- "version" : " 2.2.3 " ,
4+ "version" : " 2.2.4 " ,
55 "keywords" : [
66 " analytics.js" ,
77 " analytics.js-integration" ,
Original file line number Diff line number Diff line change @@ -69,11 +69,11 @@ describe('ShareASale', function() {
6969 subtotal : 42 ,
7070 shipping : 10 ,
7171 tax : 3.5 ,
72- total : 55.5 ,
72+ total : 55 ,
7373 revenue : 15
7474 } ) ;
7575 analytics . loaded (
76- '<img src="https://shareasale.com/sale.cfm?amount=55.50 &tracking=123&transtype=sale&merchantID=bonobos&skulist=&quantitylist=&pricelist=¤cy=USD&couponcode=">'
76+ '<img src="https://shareasale.com/sale.cfm?amount=55.00 &tracking=123&transtype=sale&merchantID=bonobos&skulist=&quantitylist=&pricelist=¤cy=USD&couponcode=">'
7777 ) ;
7878 } ) ;
7979
@@ -93,10 +93,10 @@ describe('ShareASale', function() {
9393 orderId : 123 ,
9494 shipping : 10 ,
9595 tax : 3.5 ,
96- total : 55.5
96+ total : 55
9797 } ) ;
9898 analytics . loaded (
99- '<img src="https://shareasale.com/sale.cfm?amount=42.00 &tracking=123&transtype=sale&merchantID=bonobos&skulist=&quantitylist=&pricelist=¤cy=USD&couponcode=">'
99+ '<img src="https://shareasale.com/sale.cfm?amount=41.50 &tracking=123&transtype=sale&merchantID=bonobos&skulist=&quantitylist=&pricelist=¤cy=USD&couponcode=">'
100100 ) ;
101101 } ) ;
102102
@@ -148,7 +148,7 @@ describe('ShareASale', function() {
148148 total : 55.5
149149 } ) ;
150150 analytics . loaded (
151- '<img src="https://shareasale.com/sale.cfm?amount=42 .00&tracking=123&transtype=sale&merchantID=bonobos&skulist=&quantitylist=&pricelist=¤cy=USD&couponcode=">'
151+ '<img src="https://shareasale.com/sale.cfm?amount=47 .00&tracking=123&transtype=sale&merchantID=bonobos&skulist=&quantitylist=&pricelist=¤cy=USD&couponcode=">'
152152 ) ;
153153 } ) ;
154154
You can’t perform that action at this time.
0 commit comments