We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How to send the tax value to Google Analytics?

You can use the submitPayment callback to get the tax amount and then add your custom GA code to send it to your Google Analytics account.

tp.push(["addHandler", "submitPayment", function(data){ 
   //get taxAmount from term object
   var conversionTax = data.term.taxAmount;
   //send to GA
}]);

The tax amount is also available in the Checkout Components template under the variable {{selectedTerm.taxAmount}}:

f3dd89d0-a685-4f38-aae3-7310be9a8a3d.png

It will be shown on the Receipt template screen:

d83956c6-02c3-40bb-b0c3-076512db1ea3.png

Last updated: