var digitalData = { page: { pageInfo: { pageName: "biz:mktg:communications\u002Dapis:video", lob: "biz", functionDept: "mktg", subCategory1: "communications\u002Dapis", subCategory2: "video", subCategory3: "", primaryCategory: "biz:mktg", internalSearchTerm: "", internalSearchResults: "", error: "", pageType: "", language: "en", country: "us", fileGatedType: "", tollFreeNumber: "", siteIdentifier: "main site", pageCategory: "", pageSubCategory: "", type: "", spaFlag: "no", appVersion: "", enableTrackerDomain: "true" }, content: { name: "video api: fully programmable and customizable", author: "", type: "communications\u002Dapis", publishDate: "", subCategory: "", topic: " | communications apis | communications apis | communications apis | ", industry: "", businessSize: "", profRole: "" } }, user: { profile: { profileInfo: { targetExperience: "", responsiveSiteVersion: "desktop", visitorType: "", gaCampaign: "", salesrepFlag: "no" } } }, transaction: { item: { quantity: "", price: { basePrice: "" }, productInfo: { productID: "" } }, testCartFlag: "no" }, eventData: { fIndustry: "", fName: "", fCTA: "", fLines: "", fAreaofinterest: "" } }; (function(){ var width = ( window.innerWidth != "undefined" ) ? window.innerWidth : document.documentElement.clientWidth; digitalData.user.profile.profileInfo.responsiveSiteVersion = ( width < 720 ) ? "mobile" : ( width < 992 ) ? "tablet" : "desktop"; var isSalesRep = "no", isTestCart = "no", masterAgent = "", subAgent = "", lsObject = JSON.parse(localStorage.getItem('vng.cart')), lsIds = JSON.parse(localStorage.getItem('vng.ids')), urlParams = new URLSearchParams(window.location.search); if (lsObject !== null && lsObject.salesRepId !== null) { isSalesRep = "yes"; } else { if (urlParams.has('salesRepId')) { isSalesRep = "yes"; }} if (lsObject !== null && lsObject.isTestCart !== null) { isTestCart = "yes"; } else { if (urlParams.has('isTestCart')) { isTestCart = "yes"; }} if (lsIds !== null && lsIds.masterAgentID !== null) { masterAgent = lsIds.masterAgentID; } else { if (urlParams.has('masteragentid')) { masterAgent = urlParams.get('masteragentid'); }} if (lsIds !== null && lsIds.subAgentID !== null) { subAgent =lsIds.subAgentID ; } else { if (urlParams.has('subagentid')) { subAgent = urlParams.get('subagentid'); } else { subAgent = masterAgent }} digitalData.user.profile.profileInfo.salesrepFlag = isSalesRep; digitalData.user.profile.profileInfo.masterAgentID = masterAgent; digitalData.user.profile.profileInfo.subAgentID = subAgent; digitalData.transaction.testCartFlag = isTestCart; })();