Skip to content

Commit 8b21d0e

Browse files
committed
Added contextVendor and costIfCpc parameters to example files
1 parent af62aa2 commit 8b21d0e

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

examples/ads/async.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
5959
window.adTracker('trackAdClick:' + rnd,
6060

6161
'12243253', // clickId
62+
'', // costIfCpc - N/A
6263
'http://www.example.com', // targetUrl
6364
'23', // bannerId
6465
'7', // zoneId

examples/web/async-medium.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
2525
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
2626
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
27-
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2/sp.js","new_name_here"));
27+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","../../dist/sp.js","new_name_here"));
2828

2929
window.new_name_here('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', {
3030
encodeBase64: false,

examples/web/async-small.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
2424
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
2525
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
26-
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.0.0/sp.js","snowplow"));
26+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2/sp.js","snowplow"));
2727

2828
window.snowplow('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', { // Initialise a tracker
2929
encodeBase64: false, // Default is true
3030
appId: 'CFe23a', // Site ID can be anything you want. Set it if you're tracking more than one site in this account
31-
platform: 'mob'
31+
platform: 'mob',
32+
contextVendor: 'com.example_company'
3233
});
3334

3435
window.snowplow('setUserId', 'alex 123'); // Business-defined user ID
@@ -74,7 +75,8 @@
7475
price: 49.95,
7576
sizes: ['xs', 's', 'l', 'xl', 'xxl'],
7677
available_since$dt: new Date(2013,3,7)
77-
}
78+
},
79+
'com.example_company'
7880
);
7981
}
8082

0 commit comments

Comments
 (0)