","showSummary":null,"url":"/news/stihl-hardware-all-stars-idaho-illinois-maine","date":"2018-02-07T00:00:00","author":{"email":null,"uname":"Anonymous","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":null,"topics":[{"name":"News","url":"/news"},{"name":"HBSDaily","url":"/hbsdaily"},{"name":"Hardware All Stars","url":"/hardware-all-stars"}],"attachedFiles":[]},{"title":"Hardware All Stars: Idaho & Utah","id":18554,"bundle":"article","summary":"
<a href="http://epicor.com/" style="box-sizing: border-box; margin: 0px; padding: 0px; max-height: 100000px; color: rgb(0, 166, 81); text-decoration: none; border: 0px; outline: ","showSummary":null,"url":"/hardware-stores/hardware-all-stars-idaho-utah","date":"2018-02-07T00:00:00","author":{"email":null,"uname":"Anonymous","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":{"id":38361,"url":"https://assets1.hbsdealer.com/styles/secondary_articles_short/s3/teaser_image_17659.jpg?itok=5dzI_rKI","width":400,"height":75,"alt":null},"topics":[{"name":"News","url":"/news"},{"name":"HBSDaily","url":"/hbsdaily"},{"name":"HARDWARE STORES","url":"/hardware-stores"},{"name":"LUMBERYARDS","url":"/lumberyards"},{"name":"Hardware All Stars","url":"/hardware-all-stars"}],"attachedFiles":[]},{"title":"Hardware All Stars: Kansas & New York","id":19524,"bundle":"article","summary":"
Each year, HBSDealer editors face the tough task of sifting through dozens of nominations for the annual Hardware All Stars feature (sponsored by <span style="margin: 0px; padding: 0px; max-height: 100000px; border: 0px; font-family: open_sansbold, sans-serif; background-image: none; background-attachment: initial; background-size: initi","showSummary":null,"url":"/hardware-stores/hardware-all-stars-kansas-new-york","date":"2018-02-07T00:00:00","author":{"email":null,"uname":"Anonymous","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":{"id":37744,"url":"https://assets1.hbsdealer.com/styles/secondary_articles_short/s3/teaser_image_17208.jpg?itok=b0sNoKT2","width":400,"height":320,"alt":null},"topics":[{"name":"News","url":"/news"},{"name":"HBSDaily","url":"/hbsdaily"},{"name":"HARDWARE STORES","url":"/hardware-stores"},{"name":"Hardware All Stars","url":"/hardware-all-stars"}],"attachedFiles":[]},{"title":"Hardware All Stars: Pennsylvania & Missouri","id":18161,"bundle":"article","summary":"
In the April issue of Hardware + Building Supply Dealer, 50 stores from 50 states are recognized for conduct becoming of an All Star.
\r\nThat means they distinguish themselves to the people who matter most, customers in the communities they serve.
","showSummary":null,"url":"/hardware-stores/hardware-all-stars-pennsylvania-missouri","date":"2018-02-07T00:00:00","author":{"email":null,"uname":"Anonymous","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":{"id":38487,"url":"https://assets1.hbsdealer.com/styles/secondary_articles_short/s3/teaser_image_17731.jpg?itok=1rtoeq39","width":400,"height":75,"alt":null},"topics":[{"name":"News","url":"/news"},{"name":"HBSDaily","url":"/hbsdaily"},{"name":"HARDWARE STORES","url":"/hardware-stores"},{"name":"Hardware All Stars","url":"/hardware-all-stars"}],"attachedFiles":[]}]},"title":"Hardware All Stars","contentParagraphs":null,"sections":null}; const country = "US"; const language = null; const SITE_LANGUAGE = "en"; const siteName = "HBS Dealer"; const userRoles = ["anonymous"]; const userUid = 0; const indexName = "hbsdealer"; const title = "Hardware All Stars | HBS Dealer"; 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); } })();