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
<?php | |
if ( isset( $_POST['products'] ) ) | |
{ | |
foreach ( $_POST['products'] as $product ) | |
{ | |
?> | |
<script> | |
_veroq.push(['track', 'added_product_to_cart', {id: '<?php echo $product['product'] ?>', price: '<?php echo $product['price'] ?>', category: '<?php echo $product['category'] ?>'}]); | |
</script> | |
<?php |
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
<?php if(shopp('cart','hasitems')): ?> | |
<?php while(shopp('cart','items')): ?> | |
<script> | |
_veroq.push(['track', 'added_product_to_cart', {name: '<?php shopp('cartitem','name'); ?>', price: '<?php shopp('cartitem','unitprice'); ?>', url: '<?php shopp('cartitem','url'); ?>'}]); | |
</script> | |
<?php endwhile; ?> | |
<?php else: ?> | |
<p>There are no items in the cart.</p> | |
<?php endif; ?> |
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
<?php while(shopp('purchase','items')): ?> | |
<script> | |
_veroq.push(['track', 'purchased_item', {name: '<?php shopp('purchase','item-name'); ?>', price: '<?php shopp('purchase','item-price'); ?>', qty: '<?php shopp('purchase','item-quantity'); ?>', download_url: '<?php shopp('purchase','item-download'); ?>'}]); | |
</script> | |
<?php endwhile; ?> | |
<script> | |
var items = []; | |
<?php while(shopp('purchase','items')): ?> | |
items.push({name: '<?php shopp('purchase','item-name'); ?>', price: '<?php shopp('purchase','item-price'); ?>', qty: '<?php shopp('purchase','item-quantity'); ?>', download_url: '<?php shopp('purchase','item-download'); ?>'}); |
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
<script> | |
_veroq.push(['user', {email: '<?php echo shopp('purchase','email'); ?>', first_name: '<?php echo shopp('purchase','firstname'); ?>', id: '<?php echo shopp('purchase', 'get-customer'); ?>'}]); | |
</script> |
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
// Each line of code here is JS so you'd put it in <script></script> tags where required. I am going to leave these out for clarity :). | |
// 1. Track when someone signs up. Note when identifying a user you can record *any* attributes you want. | |
_veroq.push(['user', {email: 'customer-email@domain.com', first_name: 'first-name', last_name: 'last-name'}]); | |
_veroq.push(['track', 'signed_up']); | |
// 2. Track when someone signs in. | |
_veroq.push(['track', 'signed_in']); | |
// 3. Track when someone views a product |
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
// Each line of code here is JS so you'd put it in <script></script> tags where required. I am going to leave these out for clarity. The first step is to add our library to your <head> tag, you can get this from you account at getvero.com/getting-started. | |
// 1. Track when someone signs up. Note when identifying a user you can record *any* attributes you want. | |
_veroq.push(['user', {email: 'customer-email@domain.com', first_name: 'first-name', last_name: 'last-name'}]); | |
_veroq.push(['track', 'signed_up']); | |
// 2. Track when someone signs in. | |
_veroq.push(['track', 'signed_in']); | |
// 3. Track when someone views a product |
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
If you replace your link with something like this: | |
<a href="http://bit.ly/getNOOM" class='noom-download' target="_blank">Give a NOOM</a> | |
...then our tracking code can just go at the bottom before your </body> tag. Literally copy/paste this in there. It will observe whenever someone clicks that link :). | |
<script> | |
$(document).ready(function(){ | |
$('.noom-download').click(function(){ | |
_veroq.push(['track', 'clicked_noom_download_button']); |
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
ScriptRock Application v1.3.0 | |
Chriss-MacBook-Air:mailship chrishexton$ scriptrock version | |
ScriptRock Application v1.3.0 | |
Chriss-MacBook-Air:mailship chrishexton$ scriptrock register | |
Please enter your ScriptRock credentials... | |
Email: chris@semblancesystems.com | |
Password: ********* |
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
<script> | |
$(document).ready(function(){ | |
$('[id^="nm_mc_button-"]').click(function(e){var email = $('[id^="EMAIL-"]').val(); | |
var fname = $('[id^="FNAME-"]').val(); | |
_veroq.push(['user', {"email": email, "name": fname}]); | |
_veroq.push(['track','trial_soccer_fitness_conditioning']);}); | |
}); | |
</script> |
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
// Screw the other document I passed along. Here is the magic. EVERYTHING on this page goes between <script> tags when we move it to your site. I left them out for brevity. | |
// First step, whack this library in your header (just like Google Analytics): getvero.com/getting-started | |
// Second step, track when customers sign up, sign in, add email during checkout and subscribe to your newsletters (which you can also use our form builder for, getvero.com/tools/forms/new). | |
_veroq.push(['user', {id: 'replace-with-users-email', email: 'replace-with-users-email']); | |
// Third step, track these events. |
OlderNewer