1/** 2 * @file 3 * Initializes some client side datalayer tags. 4 */ 5function getCookie(cname) { 6 'use strict'; 7 var name = cname + '='; 8 var ca = document.cookie.split(';'); 9 for (var i = 0; i < ca.length; i++) { 10 var c = ca[i]; 11 while (c.charAt(0) === ' ') { 12 c = c.substring(1); 13 } 14 if (c.indexOf(name) === 0) { 15 return c.substring(name.length, c.length); 16 } 17 } 18 return ''; 19} 20 21if (typeof dataLayer_tags !== 'undefined' && dataLayer_tags.userInformation) { 22 if (typeof dataLayer_tags.userInformation.gaClientID !== 'undefined') { 23 dataLayer_tags.userInformation.gaClientID = getCookie('_ga'); 24 } 25 if (typeof dataLayer_tags.userInformation.deviceType !== 'undefined') { 26 if (typeof isMobile !== undefined) { 27 var deviceType = 'Desktop'; 28 if (isMobile.tablet) { 29 deviceType = 'Tablet'; 30 } 31 if (isMobile.phone) { 32 deviceType = 'Mobile'; 33 } 34 dataLayer_tags.userInformation.deviceType = deviceType; 35 } 36 } 37}
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.