","showSummary":null,"url":"/family-fare-opens-fuel-convenience-center","date":"2011-07-14T00:00:00","author":{"email":"info@progressivegrocer.com","uname":"pg_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":"Food Retailers","url":"/food-retailers"},{"name":"Special Reports","url":"/special-reports"},{"name":"Dairy / Refrigerated","url":"/dairy-refrigerated"},{"name":"Nonfoods","url":"/nonfoods"},{"name":"Deli / Prepared Foods","url":"/deli-prepared-foods"},{"name":"Bakery","url":"/bakery"},{"name":"Beverages","url":"/beverages"}],"attachedFiles":[]},{"title":"3 Updated Bi-Lo Stores Make Their Debut","id":43140,"bundle":"article","summary":"S.C. locations are latest to undergo renovation as part of 5-year competitive strategy","showSummary":null,"url":"/3-updated-bi-lo-stores-make-their-debut","date":"2011-07-06T00:00:00","author":{"email":"info@progressivegrocer.com","uname":"pg_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":"Food Retailers","url":"/food-retailers"},{"name":"Special Reports","url":"/special-reports"},{"name":"Equipment & Design","url":"/equipment-design"},{"name":"Research & Analysis","url":"/research-analysis"},{"name":"Nonfoods","url":"/nonfoods"},{"name":"Deli / Prepared Foods","url":"/deli-prepared-foods"},{"name":"Produce / Floral","url":"/produce-floral"},{"name":"Meat / Seafood","url":"/meat-seafood"},{"name":"Bakery","url":"/bakery"}],"attachedFiles":[]},{"title":"Latest Giant Store Offers Host of New Features","id":43079,"bundle":"article","summary":"Premiere Night provided sneak peek for shoppers","showSummary":null,"url":"/latest-giant-store-offers-host-new-features","date":"2011-06-28T00:00:00","author":{"email":"info@progressivegrocer.com","uname":"pg_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":"Food Retailers","url":"/food-retailers"},{"name":"Equipment & Design","url":"/equipment-design"},{"name":"Special Reports","url":"/special-reports"},{"name":"Research & Analysis","url":"/research-analysis"},{"name":"New Products & Promotions","url":"/new-products-promotions"},{"name":"Nonfoods","url":"/nonfoods"},{"name":"Deli / Prepared Foods","url":"/deli-prepared-foods"},{"name":"Produce / Floral","url":"/produce-floral"},{"name":"Meat / Seafood","url":"/meat-seafood"},{"name":"Bakery","url":"/bakery"}],"attachedFiles":[]},{"title":"Publix to Enter Knoxville, Tenn., Market","id":43052,"bundle":"article","summary":"First store slated to debut in the third quarter of 2012","showSummary":null,"url":"/publix-enter-knoxville-tenn-market","date":"2011-06-23T00:00:00","author":{"email":"info@progressivegrocer.com","uname":"pg_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":"Food Retailers","url":"/food-retailers"},{"name":"Equipment & Design","url":"/equipment-design"},{"name":"Nonfoods","url":"/nonfoods"},{"name":"Deli / Prepared Foods","url":"/deli-prepared-foods"},{"name":"Produce / Floral","url":"/produce-floral"},{"name":"Meat / Seafood","url":"/meat-seafood"},{"name":"Bakery","url":"/bakery"},{"name":"Pharmacy","url":"/pharmacy"}],"attachedFiles":[]},{"title":"N.G.A. Names Manager of Gov’t Affairs","id":42964,"bundle":"article","summary":"Brian Callahan's experience spans consulting and the ABA","showSummary":null,"url":"/nga-names-manager-govt-affairs","date":"2011-06-13T00:00:00","author":{"email":"info@progressivegrocer.com","uname":"pg_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":"Food Retailers","url":"/food-retailers"},{"name":"Trading Partners","url":"/trading-partners"},{"name":"Equipment & Design","url":"/equipment-design"},{"name":"Supermarket & Grocery Industry News","url":"/supermarket-grocery-industry-news"},{"name":"Bakery","url":"/bakery"},{"name":"Pharmacy","url":"/pharmacy"}],"attachedFiles":[]},{"title":"Uncle Giuseppe’s Opening 5th Location","id":42822,"bundle":"article","summary":"Italian-inspired markets offer handmade delights","showSummary":null,"url":"/uncle-giuseppes-opening-5th-location","date":"2011-05-25T00:00:00","author":{"email":"info@progressivegrocer.com","uname":"pg_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":"Food Retailers","url":"/food-retailers"},{"name":"Equipment & Design","url":"/equipment-design"},{"name":"Research & Analysis","url":"/research-analysis"},{"name":"Dairy / Refrigerated","url":"/dairy-refrigerated"},{"name":"Nonfoods","url":"/nonfoods"},{"name":"Deli / Prepared Foods","url":"/deli-prepared-foods"},{"name":"Meat / Seafood","url":"/meat-seafood"},{"name":"Bakery","url":"/bakery"}],"attachedFiles":[]},{"title":"Supervalu Adds Color to Dietary Guidelines","id":42729,"bundle":"article","summary":"Nutrition iQ coded system helps shoppers at Acme, Farm Fresh
","showSummary":null,"url":"/supervalu-adds-color-dietary-guidelines","date":"2011-05-11T00:00:00","author":{"email":"info@progressivegrocer.com","uname":"pg_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":"Food Retailers","url":"/food-retailers"},{"name":"Research & Analysis","url":"/research-analysis"},{"name":"Produce / Floral","url":"/produce-floral"},{"name":"Meat / Seafood","url":"/meat-seafood"},{"name":"Bakery","url":"/bakery"}],"attachedFiles":[]}]},"title":"Bakery","contentParagraphs":null,"sections":null};
const country = "US";
const language = null;
const SITE_LANGUAGE = "en";
const siteName = "Progressive Grocer";
const userRoles = ["anonymous"];
const userUid = 0;
const indexName = "pg";
const title = "Bakery | Progressive Grocer";
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);
}
})();