Skip to content

Commit 511048d

Browse files
committed
Renamed 's1' to 'rnd'
1 parent a244c8b commit 511048d

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

examples/ads/async.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<p>For each banner, viewing that banner fires an ad impression event and clicking it fires an ad click event.</p>
2121

22-
<p>Click the first banner and the button that appears to fire an ad conversion event.</p>
22+
<p>Click the first banner and on the button that appears to fire an ad conversion event.</p>
2323

2424
<body>
2525
<h1>Asynchronous ad tracking examples for snowplow.js</h1>
@@ -33,18 +33,18 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
3333
(function(imageId){
3434

3535
// Randomly generate tracker namespace to prevent clashes
36-
var s1 = Math.random().toString(36).substring(2);
36+
var rnd = Math.random().toString(36).substring(2);
3737

3838
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
3939
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
4040
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
4141
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2/sp.js","adTracker"));
4242

43-
window.adTracker('newTracker', s1, 'd3rkrsqld9gmqf.cloudfront.net', {
43+
window.adTracker('newTracker', rnd, 'd3rkrsqld9gmqf.cloudfront.net', {
4444
'encodeBase64': false
4545
});
4646

47-
window.adTracker('trackAdImpression:' + s1,
47+
window.adTracker('trackAdImpression:' + rnd,
4848

4949
'67965967893', // impressionId
5050
'', // costIfCpm - not applicable as the cost model for this ad is CPA
@@ -56,7 +56,7 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
5656
);
5757

5858
function clickHandler() {
59-
window.adTracker('trackAdClick:' + s1,
59+
window.adTracker('trackAdClick:' + rnd,
6060

6161
'12243253', // clickId
6262
'http://www.example.com', // targetUrl
@@ -73,7 +73,7 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
7373
document.body.appendChild(button);
7474
button.onclick = function() {
7575

76-
window.adTracker('trackAdConversion:' + s1,
76+
window.adTracker('trackAdConversion:' + rnd,
7777

7878
'743560297', // conversionId
7979
10, // costIfCpa
@@ -103,22 +103,22 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
103103
<script type="text/javascript">
104104

105105
(function(imageId){
106-
var s1 = Math.random().toString(36).substring(2);
106+
var rnd = Math.random().toString(36).substring(2);
107107

108108
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
109109
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
110110
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
111111
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2/sp.js","adTracker"));
112112

113-
window.adTracker('newTracker', s1, 'd3rkrsqld9gmqf.cloudfront.net', {
113+
window.adTracker('newTracker', rnd, 'd3rkrsqld9gmqf.cloudfront.net', {
114114
'encodeBase64': false
115115
});
116116

117-
window.adTracker('trackAdImpression:' + s1, '17320923496', 6.5, '127', '', '', 'cpm');
117+
window.adTracker('trackAdImpression:' + rnd, '17320923496', 6.5, '127', '', '', 'cpm');
118118

119119

120120
function clickHandler() {
121-
window.adTracker('trackAdClick:' + s1, '', 'http://www.example.com', '127', '', '17320923496', '', 'cpm');
121+
window.adTracker('trackAdClick:' + rnd, '', 'http://www.example.com', '127', '', '17320923496', '', 'cpm');
122122
}
123123

124124
document.getElementById(imageId).addEventListener('click', clickHandler);
@@ -135,21 +135,21 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
135135
<script type="text/javascript">
136136

137137
(function(imageId){
138-
var s1 = Math.random().toString(36).substring(2);
138+
var rnd = Math.random().toString(36).substring(2);
139139

140140
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
141141
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
142142
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
143143
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2/sp.js","adTracker"));
144144

145-
window.adTracker('newTracker', s1, 'd3rkrsqld9gmqf.cloudfront.net', {
145+
window.adTracker('newTracker', rnd, 'd3rkrsqld9gmqf.cloudfront.net', {
146146
'encodeBase64': false
147147
});
148148

149-
window.adTracker('trackAdImpression:' + s1, '', '', '56ea2819ffc7da75f7e', '', '', 'cpc');
149+
window.adTracker('trackAdImpression:' + rnd, '', '', '56ea2819ffc7da75f7e', '', '', 'cpc');
150150

151151
function clickHandler() {
152-
window.adTracker('trackAdClick:' + s1, 0.2, 'http://www.example.com', '127', 'cpc');
152+
window.adTracker('trackAdClick:' + rnd, 0.2, 'http://www.example.com', '127', 'cpc');
153153
}
154154

155155
document.getElementById(imageId).addEventListener('click', clickHandler);

0 commit comments

Comments
 (0)