E! Online

VIDEOS/ 

Chelsea Lately: Lauren Conrad

) { s.linkTrackVars = json.linkTrackVars || 'prop1,events'; s.linkTrackEvents = json.linkTrackEvents || 'event1'; s.prop1 = json.prop1 || 'Prop 1 Value'; s.events = json.events || 'event1'; s.tl(lnk, 'o', linkName); } function trackShares(lnk, linkName, json) { // This is the same code as trackLink above. trackLink(lnk, linkName, json); } function trackColumnLayout(json) { s.linkTrackVars = json.linkTrackVars || 'prop57,eVar57'; s.linkTrackEvents = json.linkTrackEvents || 'NONE'; s.prop57 = json.prop57 || '5'; s.eVar57 = json.eVar57 || '5'; s.tl(' ','o','column resize'); } /* This is an onPageLoad tracking function, not a link click tracking function. * Usage: trackVideoPlayer('frontdoor_live', 'att', 'live:lrc-2013-oscars'); * Or: trackVideoPlayer({"playerName":"frontdoor_live_embed","sponsorName":"att","videoName":"live:lrc-2013-oscars"}); */ function trackVideoPlayer(jsonDataOrPlayerName, sponsorName, videoName) { // playerName is overloaded as a json object. It can also be a string. // Get values from json or from strings. if (typeof(jsonDataOrPlayerName) === 'object') { var playerName = jsonDataOrPlayerName.playerName; sponsorName = jsonDataOrPlayerName.sponsorName; videoName = jsonDataOrPlayerName.videoName; } else if (typeof(jsonDataOrPlayerName) === 'string') { var playerName = jsonDataOrPlayerName; // The sponsorName & videoName are already setup above. } (function siteCatDelayedLoader(playerName, sponsorName, videoName) { // Self-Loading Function. if (typeof(s) !== 'undefined') { // Map them to the Omniture Objects, as needed: if (typeof(s.Media) === 'undefined') { s.Media = {}; } s.Media.playerName = s.eVar18 = s.prop19 = playerName; s.prop20 = s.eVar20 = sponsorName; s.prop39 = s.eVar39 = videoName; // Call Omniture: s.t(); } else { setTimeout(function() { siteCatDelayedLoader(playerName, sponsorName, videoName); // Loops back into this function. }, 50); } })(playerName, sponsorName, videoName); // Self-Loading Function. } // Usage: data-omniture='{"linkName":"[Widget Name]:[Link text]","products":";photos:A1:1-1:the-big-picture;;;eVar16= photos:1-1:the-big-picture:A1"}'> function trackWidgetClick(lnk, linkName, json) { s.linkTrackVars = json.linkTrackVars || 'products,events,eVar17,prop17,eVar16'; s.linkTrackEvents = json.linkTrackEvents || 'event21'; s.events = json.events || 'event21'; s.products = json.products; //';photos:A1:1-1:the-big-picture;;;; s.eVar16= "frontdoor-modules"; //photos:1-1:the-big-picture:A1 s.prop17 = json.products; // '[Widget Name]:[Link text]'; s.eVar17 = json.products; // '[Widget Name]:[Link text]'; s.tl(lnk, 'o', linkName); // '[Widget Name]:[Link text]'); } function trackWidgetClick2(lnk, linkName, json) { s.linkTrackVars = json.linkTrackVars || 'products,events,eVar17,prop17'; s.linkTrackEvents = json.linkTrackEvents || 'event29'; s.events = json.events || 'event29'; s.products = json.products; // ';ad-widget:A1:1-1:ad-text;;;;eVar16=ad:1-1:ad-text:A1'; s.prop17 = json.products; // '[Ad Widget Name]:[Link text]'; s.eVar17 = json.products; // '[Ad Widget Name]:[Link text]'; s.tl(lnk, 'o', linkName); // '[Ad Widget Name]:[Link text]'); } function trackWidgetLink(lnk, linkName, json) { s.linkTrackVars = json.linkTrackVars || 'eVar17'; s.linkTrackEvents = json.linkTrackEvents || 'NONE'; s.eVar17 = linkName; s.tl(lnk, 'o', linkName); } // Global Click Handler Event + Function Mapping jQuery(document).ready(function($) { /* This is a catch all for any links, which DO NOT have customized Omniture implementations applied to them. If Omniture has already been applied to a specific link, then this function is intentionally designed to avoid double counting the user's click action. */ if (typeof(eol) === 'undefined') { window.eol = {}; } eol.bindOmnitureListeners = function(strKey) { // Prevents multiple clicks from being added, every time the "More Tweets from ..." link is clicked. $(strKey).unbind('click', eol.globalClickHandler); $(strKey).bind('click', eol.globalClickHandler); } eol.globalClickHandler = function(e){ // Use currentTarget to get target element var objLink = arguments[0].currentTarget; //fb('click'); var rand = Math.floor((Math.random()*10)+1); //fb(rand); if (rand == 1) { // Get Attributes from the tag. //fb(objLink); var onClick = (objLink) ? objLink.getAttribute("onClick") : null; // HTML 5 data-* attributes. var omniture = (objLink) ? objLink.getAttribute("data-omniture") : null; //var products = (objLink) ? objLink.getAttribute("data-omniture-products") : null; // Find values. var lnk = this; // URL var linkName = (omniture) ? omniture : (this.innerText) ? this.innerText : this.textContent; // Link Text /* Skips this function if someone is already using a pre-existing Omniture onClick attribute. This avoids double counting the URL clicks. * Also skips this function whenever HTML 5 URLs (which use data-* attributes) are detected. * Old URLs look like this: ... * New URLs look like this: ... * Ex: ... * ... * ... */ if (onClick && (typeof(onClick) === 'string') && (onClick.indexOf) && ((onClick.indexOf('s_objectID') > -1) || (onClick.indexOf('s_oc') > -1) || (onClick.indexOf('track') > -1))) { //fb('onClick detected. Bypassing 2nd click action.'); return; } else { //fb('onClick not found. Using Global Omniture Tracking Code.'); // Strip any Function Names as Needed var fnName = 'trackLink'; if (linkName.indexOf('|') > -1) { var fnName = linkName.substr(0,linkName.indexOf('|')); var linkName = linkName.substr(fnName.length + 1); } // Parse Any Remaining JSON var json = {}; if (linkName.indexOf('{') > -1) { //fb('linkName: ' + linkName); json = $.parseJSON(linkName); if ((typeof(json) === 'object') && json) { linkName = json.linkName || json.linkname || ''; } } // Switch Functions as Needed //fb(fnName); switch (fnName) { case 'trackLink2': trackLink2(lnk, linkName, json); break; case 'trackShares': trackShares(lnk, linkName, json); break; case 'trackColumnLayout': trackColumnLayout(json); break; case 'trackWidgetClick': trackWidgetClick(lnk, linkName, json); break; case 'trackWidgetClick2': trackWidgetClick2(lnk, linkName, json); break; case 'trackWidgetLink': trackWidgetLink(lnk, linkName, json); break; case 'trackLink': trackLink(lnk, linkName, json); default: break; } } } } // Binds on all Static Links ONLY, when the page loads. Does not bind on AJAX links. eol.bindOmnitureListeners('a'); // For AJAX links, add the following code into your JavaScript file's callback function. Make sure that it is after the .appendHTML() code: // eol.bindOmnitureListeners('#some-AjaxDiv-id a'); });