","showSummary":null,"url":"/greening-valley","date":"2012-10-08T00:00:00","author":{"email":"devteam@ashday.com","uname":"eiq_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":null,"topics":[{"name":"NACS Show","url":"/nacs-show"}],"attachedFiles":[]},{"title":"What Happens at NACS Shouldn't Stay at NACS","id":22703,"bundle":"article","summary":"Smart retailers bring home invaluable lessons and business contacts.","showSummary":null,"url":"/what-happens-nacs-shouldnt-stay-nacs","date":"2012-10-08T00:00:00","author":{"email":"devteam@ashday.com","uname":"eiq_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":null,"topics":[{"name":"NACS Show","url":"/nacs-show"}],"attachedFiles":[]},{"title":"The Crowds Say It All at NACS Show 2012","id":22716,"bundle":"article","summary":"This year's total attendance is likely to surpass the show's all-time high achieved in 2004.","showSummary":null,"url":"/crowds-say-it-all-nacs-show-2012","date":"2012-10-08T00:00:00","author":{"email":"devteam@ashday.com","uname":"eiq_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":null,"topics":[{"name":"NACS Show","url":"/nacs-show"}],"attachedFiles":[]},{"title":"Combos 7 Layer Dip Tortilla","id":43123,"bundle":"product","url":"/combos-7-layer-dip-tortilla","summary":"The newest Combos Baked Snacks flavor, 7 Layer Dip Tortilla, combines real cheddar cheese, sour cream, avocado, tomato, refried beans, onion and spicy jalapeño peppers.","sponsored":false,"teaserImage":{"url":"https://assets1.csnews.com/files/styles/primary_articles_short/s3/2361_1.jpg?itok=UaBJXb_K","height":500,"width":625,"alt":null}},{"title":"Catering to Customers' Needs","id":22712,"bundle":"article","summary":"C-stores with well-established foodservice should consider expanding into catering.","showSummary":null,"url":"/catering-customers-needs","date":"2012-10-08T00:00:00","author":{"email":"devteam@ashday.com","uname":"eiq_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":null,"topics":[{"name":"NACS Show","url":"/nacs-show"}],"attachedFiles":[]},{"title":"Planograms Turn Profits for Retailers","id":22709,"bundle":"article","summary":"Complementary products should be positioned on the traffic path to destination areas.","showSummary":null,"url":"/planograms-turn-profits-retailers","date":"2012-10-08T00:00:00","author":{"email":"devteam@ashday.com","uname":"eiq_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":null,"topics":[{"name":"NACS Show","url":"/nacs-show"}],"attachedFiles":[]},{"title":"Show Floor Exposé","id":22704,"bundle":"article","summary":"New and veteran exhibitors share what they're showing this time around and why.","showSummary":null,"url":"/show-floor-expose","date":"2012-10-08T00:00:00","author":{"email":"devteam@ashday.com","uname":"eiq_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":null,"topics":[{"name":"NACS Show","url":"/nacs-show"}],"attachedFiles":[]}]},"title":"Awards & Events","contentParagraphs":null,"sections":null}; const country = "US"; const language = null; const SITE_LANGUAGE = "en"; const siteName = "Convenience Store News"; const userRoles = ["anonymous"]; const userUid = 0; const indexName = "csnews"; const title = "Awards & Events | Convenience Store News"; window.dataLayer = window.dataLayer || []; const data = {}; data.entityTaxonomy = {}; const contentTypes = [ "article", "blog", "bulletin", "embed_page", "landing_page", "event", "image", "page", "product", "whitepaper", "video", "tags", "author_profile", "buyers_guide_listing" ]; if ( routeInfo && "bundle" in routeInfo && contentTypes.includes(routeInfo["bundle"]) ) { data.entityBundle = routeInfo.bundle; data.entityTitle = title || `${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 taxonomy 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); } })();