they are using crucial questions for merchandisers to answer. Download this Technology Solutions Guide to learn how localized, customer-driven assortments are becoming competitive tools for retailers.\n
","alternateLabel":null,"teaserImage":{"id":22035,"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/TechSolGuideris0113.jpg?itok=8za5cXhN","width":150,"alt":null,"height":181},"sponsored":false,"businessTopic":[],"company":[],"contentType":[]},{"title":"Need to Know","id":3918,"bundle":"article","summary":"Buffalo David Bitton is hungry for data from multiple sources","showSummary":null,"url":"/need-know","date":"2013-01-04T00:00:00","author":{"email":"devteam@ashday.com","uname":"ash_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":{"id":45452,"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/enterprisestrat0113.jpg?itok=uuhsS2w5","width":150,"height":123,"alt":null},"topics":[{"name":"Enterprise Resource Management","url":"/enterprise-resource-management"},{"name":"Allocation Planning","url":"/allocation-planning"},{"name":"Assortment Planning","url":"/assortment-planning"},{"name":"Business Intelligence (BI)","url":"/business-intelligence"},{"name":"Omnichannel","url":"/omnichannel"},{"name":"Customer Relationship Management (CRM)","url":"/customer-relationship-management-crm"},{"name":"Data Synchronization","url":"/data-synchronization"},{"name":"E-Commerce","url":"/e-commerce"},{"name":"Workforce Management","url":"/workforce-management"},{"name":"Loyalty Programs","url":"/loyalty-programs"},{"name":"Merchandise Management","url":"/merchandise-management"},{"name":"Personalization","url":"/personalization"},{"name":"Marketing","url":"/marketing"},{"name":"Store Systems","url":"/store-systems"},{"name":"Traffic Analysis","url":"/traffic-analysis"},{"name":"Big Data","url":"/big-data"},{"name":"Web Analytics","url":"/web-analytics"},{"name":"Supply Chain Management","url":"/supply-chain-management"}],"attachedFiles":[]},{"title":"4 Retail Megatrends for 2013","id":3927,"bundle":"article","summary":"The bottom line for retail in 2012 continues to be the imperative in 2013. Here are four retail trends to consider in the upcoming year.","showSummary":null,"url":"/4-retail-megatrends-2013","date":"2013-01-04T00:00:00","author":{"email":"devteam@ashday.com","uname":"ash_root","firstName":null,"lastName":null,"bio":null,"title":null,"picture":null,"phone":null,"contactForm":null},"digitalEdition":null,"sponsored":false,"taggedPro":null,"teaserImage":{"id":45443,"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/MobileCheckout_ris_01-04-13.jpg?itok=3LfrTpZQ","width":150,"height":112,"alt":null},"topics":[{"name":"Business Intelligence (BI)","url":"/business-intelligence"},{"name":"Point of Sale","url":"/point-sale"},{"name":"Data Warehousing","url":"/data-warehousing"},{"name":"Mobile Apps","url":"/mobile-apps"},{"name":"Mobile Devices","url":"/mobile-devices"},{"name":"Big Data","url":"/big-data"}],"attachedFiles":[]}]},"title":"Big Data"};
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);
}
})();