Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.3 kB
17
Indexable
Never
<!-- Begin TVSquared Tracking Code -->
<script type="text/javascript">
    var _tvq = window._tvq = window._tvq || [];
    (function() {
        var session = {
            'user': '<USERREF>'
        };
        var actionname = '<SALE>';
        var action = {
            'rev': '{{ total_price|money_without_currency }}',
            'prod': '<PRODUCT>',
            'id': '<ACTIONID>',
            'promo': '<PROMOCODE>'
        };

        var u = (("https:" == document.location.protocol) ? "https://collector-31587.tvsquared.com/" : "http://collector-31587.tvsquared.com/");
        _tvq.push(['setSiteId', "TV-6381451827-1"]);
        _tvq.push(['setTrackerUrl', u + 'tv2track.php']);
        _tvq.push([function() {
            this.setCustomVariable(5, 'session', JSON2.stringify(session), 'visit')
        }]);
        _tvq.push([function() {
            this.setCustomVariable(5, actionname, JSON2.stringify(action), 'page')
        }]);
        _tvq.push(['trackPageView']);
        var d = document,
            g = d.createElement('script'),
            s = d.getElementsByTagName('script')[0];
        g.type = 'text/javascript';
        g.defer = true;
        g.async = true;
        g.src = u + 'tv2track.js';
        s.parentNode.insertBefore(g, s);
    })();
</script>
<!-- End TVSquared Tracking Code -->