Created
December 16, 2014 07:16
-
-
Save chexton/3c12e395843168a1a69a to your computer and use it in GitHub Desktop.
installing-basic-tracking-vero.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1. Put this code before </head>. Replace your API (login to Vero account to get it) | |
<script type='text/javascript'> | |
var _veroq = _veroq || []; | |
_veroq.push(['init', {api_key: "YOUR_API_KEY"}]); | |
(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 code before </head>, after the code above. Replace the email and user's personal details | |
<script> | |
_veroq.push(['user', { | |
id: 'REPLACE', // The ID must be unique, it may simply be the customer's email address | |
email: 'REPLACE', | |
first_name: 'REPLACE', | |
last_name: 'REPLACE' | |
}]); | |
</script> | |
//3. Put this code before </body>. Replace the details of the order | |
<script> | |
_veroq.push(['track', 'completes checkout', { | |
order_total: 50.00, | |
items_ordered: 3 | |
}]); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment