API Reference

Sending Purchase event with test prices

Add HTML block with this content

<script>
AnalyticsManager.on('Stripe submit error', function(e) {
if (e.decline_code === "test_mode_live_card"){
	
 
let price=window.document.querySelector('.plan-popup__totals-sum').innerText.replace("$","")
price = parseFloat(price)

console.log(price)

AnalyticsManager.logEvent('Purchase', {value: price});

window.location.pathname='/YOUR_AFTER_PAY_PAGE'
}
  
});
</script>