1(function(window) { 2 var dc = window.dc_global = window.dc_global || {}; 3 // Production destination in GTM-5NJ7362B. GTM loads/configures the tag. 4 var measurementId = 'G-V2ZE2G4GN1'; 5 var playCounts = {}; 6 7 // Use the Google tag command format, rather than a GTM custom event object. 8 // Keep this local: defining window.gtag would also change the legacy ga shim. 9 function enqueue() { 10 window.dataLayer = window.dataLayer || []; 11 window.dataLayer.push(arguments); 12 } 13 14 dc.trackGameEvent = function(gameId, eventName, parameters) { 15 try { 16 var data = {}; 17 Object.keys(parameters || {}).forEach(function(key) { 18 data[key] = parameters[key]; 19 }); 20 if(eventName === 'game_start') { 21 playCounts[gameId] = (playCounts[gameId] || 0) + 1; 22 } 23 if(eventName !== 'game_title' && data.play_count === undefined && playCounts[gameId]) { 24 data.play_count = playCounts[gameId]; 25 } 26 data.game_id = gameId; 27 data.site_version = window.location.pathname.indexOf('/kids/') === 0 ? 'kids' : 'standard'; 28 data.send_to = measurementId; 29 enqueue('event', eventName, data); 30 } catch (error) { 31 // An unavailable analytics queue must not interrupt gameplay. 32 } 33 }; 34})(window);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.