","showSummary":null,"url":"/consumer-research-firm-sees-better-year-restaurants","date":"2013-12-16T00: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":"Market Research","url":"/market-research"}],"attachedFiles":[]},{"title":"New IRI Research Examines Impact of Gas Price Fluctuations","id":17757,"bundle":"article","summary":"Convenience stores with pumps average 277 fill-up trips per day.","showSummary":null,"url":"/new-iri-research-examines-impact-gas-price-fluctuations","date":"2013-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":"Market Research","url":"/market-research"}],"attachedFiles":[]},{"title":"CSNews Parent Stagnito Media Acquires Carbonview Research","id":16511,"bundle":"article","summary":"The panel-based market research provider will complement current capabilities. ","showSummary":null,"url":"/csnews-parent-stagnito-media-acquires-carbonview-research","date":"2013-09-26T00: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":"Market Research","url":"/market-research"}],"attachedFiles":[]},{"title":"New Research Shows Convenience Store Visits Remain Stable","id":22229,"bundle":"article","summary":"Total channel sales increased during the second quarter, reports The NPD Group.","showSummary":null,"url":"/new-research-shows-convenience-store-visits-remain-stable","date":"2012-08-22T00: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":"Market Research","url":"/market-research"}],"attachedFiles":[]},{"title":"New Research Highlights When and Where America Eats","id":22144,"bundle":"article","summary":"Age is the strongest influence on interpretation of health, convenience, and variety.","showSummary":null,"url":"/new-research-highlights-when-and-where-america-eats","date":"2012-08-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":"Market Research","url":"/market-research"}],"attachedFiles":[]},{"title":"New Research Shows Small Retailers Are Losing Ground","id":19879,"bundle":"article","summary":"Independent stores have seen market share decline during the past 20 years, but they remain very powerful.","showSummary":null,"url":"/new-research-shows-small-retailers-are-losing-ground","date":"2011-11-02T00: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":"Market Research","url":"/market-research"}],"attachedFiles":[]}]},"title":"Market Research","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 = "Market Research | 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); } })();