install-vero-ff.js
//1. Put this just before the </head> on every page:
<script type="text/javascript">
var _veroq = _veroq || [];
_veroq.push(['init', { api_key: '9b2607e356c1c38ec6fb7923b57ee238641c2165'} ]);
(function() {var ve = document.createElement('script'); ve.type = 'text/javascript'; ve.async = true; ve.src = '//d3qxef4rp70elm.cloudfront.net/m.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ve, s);})();
</script>
//2. Put this on your thankyou/completed checkout page:
<script>
_veroq.push(['track', 'completes checkout']);
</script>
//3. Track customers when they sign in - ideally place this before </body> on https://www.foreverfiances.com/login.asp
<script>
jQuery('form[name="loginform"]').submit(function(e){
e.preventDefault();
var email = jQuery('form[name="loginform"] input[name="email"]').val();
_veroq.push(['user', {email: email}]);
_veroq.push(['track', 'logs in']);
setTimeout(function(){
jQuery('form[name="loginform"]')[0].submit();
}, 500);
})
</script>
//4. Track when someone signs up - ideally place this before </body> on https://www.foreverfiances.com/AccountSettings.asp?AddNewCustomer=Y&ReturnTo=
<script>
jQuery('#AccountSettingsForm').submit(function(e){
if($('input[name="emailsubscriber"]').is(':checked')){
e.preventDefault();
var email = jQuery('#AccountSettingsForm input[name="Email"]').val();
_veroq.push(['user', {email: email}]);
_veroq.push(['track', 'logs in']);
setTimeout(function(){
jQuery('#AccountSettingsForm')[0].submit();
}, 500);
}
})
</script>