setEmailAddressInput

Description
By default, the CartStack tracking code will automatically capture any email address that is entered by the website visitor. However, in some cases (eg: the checkout page includes an email field for a gift card recipient in addition to the purchaser's email address), you may only want to capture email addresses for a certain field. 

To do this, you can use the setEmailAddressInput. You will just need to include the input field  ID value (note: NOT the Name value). All other fields will be ignored. 

Function Call

_cartstack.push(['setEmailAddressInput', '']);
Code Example 

For example, if this is your input field HTML:

<input type="text" id="billing-email" name="email" />

Your tracking code would look like this:

<script data-siteid="XXXXXX" src="https://api.cartstack.com/js/customer-tracking/XXXXXXXXXX_222b5fb1025a6f580288f22cbd29c1bc.js" type="text/javascript"><br></script>
 
<script type="text/javascript">
 _cartstack.push(['setEmailAddressInput', 'billing-email']);
</script>
Did this answer your question? Thanks for the feedback. Click the "Contact Us" button to the right if you need further help. There was a problem submitting your feedback. Please try again later.