Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: user5f44c
Added: May 31, 2020 11:58 AM
Views: 132
Tags: no tags
  1. function() {
  2.   try {
  3.     var a = JSON.parse(JSON.stringify({{Data Layer Var - ecommerce}}));
  4.     a.purchase.actionField.revenue = (parseFloat(a.purchase.actionField.revenue) - parseFloat(a.purchase.actionField.tax)).toFixed(2);
  5.     return {
  6.       ecommerce: a
  7.     }
  8.   } catch (b) {
  9.     return {
  10.       ecommerce: a
  11.     }
  12.   }
  13. }