\r\n"},{"id":36579,"bundle":"topic_content","heading":"More About Consumer Analytics","terms":[{"id":445,"name":"Customer Analytics"}],"items":[{"id":24071,"bundle":"article","title":"GNC Investing in Omnichannel and Membership Personalization","url":"/gnc-investing-omnichannel-and-membership-personalization","summary":"CNG is continuing to invest in its omnichannel and membership efforts, having recently renewed a partnership that will grant the company access to data-driven insights and predictive analytics. ","teaserImage":{"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/2023-09/gnc362074430.jpg?h=c71d0c67&itok=Sr7ap1GU","width":960,"height":540,"alt":"GNC storefront"}},{"id":24070,"bundle":"article","title":"Marks & Spencer and The Save Mart Jump on AI-Powered Tech Stack","url":"/marks-spencer-and-save-mart-jump-ai-powered-tech-stack","summary":"These two retailers are the latest to transform their tech stacks with artificial intelligence-powered capabilities. \r\n","teaserImage":{"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/2023-09/marks_and_spencer_457089139_1.jpg?h=b3660f0d&itok=NcldM4D3","width":960,"height":640,"alt":"Marks & Spencer"}},{"id":24048,"bundle":"article","title":"Mark Kirkham of PepsiCo on the Evolving Use of Data","url":"/mark-kirkham-pepsico-evolving-use-data","summary":"Mark Kirkham, SVP and CMO of PepsiCo's International Beverages business, discusses the evolution of data usage, particularly in partnerships with retailers. ","teaserImage":{"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/2023-08/PepsiCo_MarkKirkham_video_960x540.png?h=c71d0c67&itok=wy3olE3g","width":960,"height":540,"alt":"Mark Kirkham"}}]}]}}; const country = "HK"; const language = "en, *"; const SITE_LANGUAGE = "en"; const siteName = "RIS News"; const userRoles = ["anonymous"]; const userUid = 0; const indexName = "risnews"; window.dataLayer = window.dataLayer || []; const data = {}; data.entityTaxonomy = {}; const contentTypes = [ "article", "blog", "bulletin", "embed_page", "landing_page", "event", "image", "page", "product", "whitepaper", "video", "tags", ]; if ( routeInfo && "bundle" in routeInfo && contentTypes.includes(routeInfo["bundle"]) ) { data.entityBundle = routeInfo.bundle; data.entityTitle = `${routeInfo.title} | ${siteName}`; data.entityId = routeInfo.id; data.entityName = routeInfo.author?.uname; data.entityCreated = routeInfo.created; data.sponsored = routeInfo.sponsored; data.sponsor = routeInfo.sponsoringCompany; data.entityType = "node"; data.entityLangcode = SITE_LANGUAGE; data.siteName = siteName; data.drupalLanguage = language; data.drupalCountry = country; data.userRoles = userRoles; data.userUid = userUid; data.entityTaxonomyKeys = {}; data.entityTaxonomyHierarchies = {}; data.parentNaicsCode = {}; data.isPro = false; data.algoliaIndexName = indexName; // Add toxonomy data const taxonomies = { businessTopic: "business_topic", contentType: "content_type", company: "company", marketSegment: "market_segment", }; const getHierarchy = (term, terms = []) => { terms.push({ id: term.id, name: term.name }); if (term.parentTerm != null) { getHierarchy(term.parentTerm, terms); } return terms; }; const getTerms = (term, useApiId = false) => { return { id: useApiId ? term.apiId : term.id, name: term.name }; }; const getKeys = (term) => { return { id: term.id, name: term.apiId }; }; Object.entries(taxonomies).forEach(([key, item]) => { terms = routeInfo[key]; if (terms && terms.length > 0) { data["entityTaxonomy"][item] = terms.map((term) => getTerms(term, key === "company") ); if (key !== "company") { data["entityTaxonomyKeys"][item] = terms.map(getKeys); termGroups = []; terms.forEach((term, termInd) => { termGroups[termInd] = getHierarchy(term); }); data["entityTaxonomyHierarchies"][item] = termGroups; } } }); data["entityTaxonomy"]["tags"] = routeInfo["topics"] || []; // Primary Topic is either the business topic or the top tag. if (routeInfo["businessTopic"]?.length > 0) { data["entityPrimaryTopic"] = routeInfo["businessTopic"][0]["name"]; } else { if (routeInfo["topics"]?.length > 0) { data["entityPrimaryTopic"] = routeInfo["topics"][0]["name"]; } } // Primary and secondary entityNaicsCodes come from the MarketSegment if (routeInfo.marketSegment?.length > 0) { data.entityNaicsCode = {}; data["entityNaicsCode"]["id"] = routeInfo["marketSegment"][0]["id"]; data["entityNaicsCode"]["name"] = routeInfo["marketSegment"][0]["naicsCode"]; if (routeInfo["marketSegment"][0]["parentTerm"] != null) { data["parentNaicsCode"]["id"] = routeInfo["marketSegment"][0]["parentTerm"]["id"]; data["parentNaicsCode"]["name"] = routeInfo["marketSegment"][0]["parentTerm"]["naicsCode"]; } } else { data.entityNaicsCode = []; } if (routeInfo.taggedPro) { data.isPro = routeInfo.taggedPro; } window.dataLayer.push(data); } else if (routeInfo && "vid" in routeInfo) { data.entityBundle = "tags"; data.entityTitle = routeInfo.name; data.entityId = routeInfo.id; data.entityName = routeInfo.author?.uname; data.entityCreated = routeInfo.created; data.entityType = "taxonomy_term"; data.entityLangcode = SITE_LANGUAGE; data.siteName = siteName; data.sponsored = routeInfo.sponsored; data.sponsor = routeInfo.sponsoringCompany; data.drupalLanguage = language; data.drupalCountry = country; data.userRoles = userRoles; data.userUid = userUid; data.algoliaIndexName = indexName; data["entityTaxonomy"]["tags"] = { id: routeInfo["id"], name: routeInfo["name"], }; window.dataLayer.push(data); } })();