|
82 | 82 |
|
83 | 83 | object = typeof exports !== 'undefined' ? exports : this; // For eventual node.js environment support |
84 | 84 |
|
85 | | - object.Snowplow = function(asynchronousQueue) { |
| 85 | + object.Snowplow = function(asynchronousQueue, functionName) { |
86 | 86 |
|
87 | 87 | var |
88 | 88 | documentAlias = document, |
|
203 | 203 | * @param string distSubdomain The subdomain on your CloudFront collector's distribution |
204 | 204 | */ |
205 | 205 | getTrackerCf: function (distSubdomain) { |
206 | | - var t = new tracker.Tracker('', version, mutSnowplowState, {}); |
| 206 | + var t = new tracker.Tracker(functionName, '', version, mutSnowplowState, {}); |
207 | 207 | t.setCollectorCf(distSubdomain); |
208 | 208 | return t; |
209 | 209 | }, |
|
215 | 215 | * @param string rawUrl The collector URL minus protocol and /i |
216 | 216 | */ |
217 | 217 | getTrackerUrl: function (rawUrl) { |
218 | | - var t = new tracker.Tracker('', version, mutSnowplowState, {}); |
| 218 | + var t = new tracker.Tracker(functionName, '', version, mutSnowplowState, {}); |
219 | 219 | t.setCollectorCf(rawUrl); |
220 | 220 | return t; |
221 | 221 | }, |
|
226 | 226 | * @return Tracker |
227 | 227 | */ |
228 | 228 | getAsyncTracker: function () { |
229 | | - return new tracker.Tracker('', version, mutSnowplowState, {}); |
| 229 | + return new tracker.Tracker(functionName, '', version, mutSnowplowState, {}); |
230 | 230 | } |
231 | 231 | }; |
232 | 232 |
|
|
239 | 239 | addReadyListener(); |
240 | 240 |
|
241 | 241 | // Now replace initialization array with queue manager object |
242 | | - return new queue.InQueueManager(tracker.Tracker, version, mutSnowplowState, asynchronousQueue); |
| 242 | + return new queue.InQueueManager(tracker.Tracker, version, mutSnowplowState, asynchronousQueue, functionName); |
243 | 243 | } |
244 | 244 |
|
245 | 245 | }()); |
0 commit comments