Skip to content

Instantly share code, notes, and snippets.

@tobsch
Created November 5, 2013 11:01
Show Gist options
  • Save tobsch/7317371 to your computer and use it in GitHub Desktop.
Save tobsch/7317371 to your computer and use it in GitHub Desktop.
tag
<!-- Metrigo interest mining tag v1.0-->
<script type="text/javascript" charset="utf-8">
// Queue for API calls
var _mstack = _mstack || [];
// Example call which marks a product as viewed
_mstack.push(function() {
DELIVERY.DataLogger.logProduct({
shop_id: 456,
product: { external_id: 'XXX', name: 'ein schuh', categories: ['Schuhe', 'Sneaker'], price: 33.95 }
});
});
// Actually load the script needed to mark the user
(function() {
var s = document.createElement('script');
s.async = true;
var h = (("https:" == document.location.protocol) ? "https://" : "http://");
s.src = h + 'rtb.metrigo.com/delivery/sync_and_log.js';
var c = document.getElementsByTagName('script')[0];
c.parentNode.insertBefore(s, c);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment