inform merchandising decisions across all channels. Download this Retail Solutions Brief to learn how new data sources can be accessed, analyzed and integrated to build product assortments that will engage shoppers in more meaningful ways.
","alternateLabel":null,"teaserImage":{"id":21558,"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/rsbris0611.jpg?itok=ID7qmMSt","width":150,"alt":null,"height":181},"sponsored":false,"businessTopic":[],"company":[],"contentType":[]},{"title":"January's Top 5 Winners and Losers","id":5426,"bundle":"article","summary":"Despite severe winter weather, many retailers saw strong same-store sales in January—including Limited Brands, owner of Victoria's Secret, which achieved a spectacular 24% increase. The overall strong retail performance indicates the economic recovery is gaining traction, but projected fuel cost increases will cut into consumers' spending power.","showSummary":null,"url":"/januarys-top-5-winners-and-losers","date":"2011-02-08T00: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":43172,"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/VictoriasSecret_RIS_2-8-11_0.jpg?itok=SYp9bzzL","width":150,"height":112,"alt":null},"topics":[{"name":"Pricing Management","url":"/pricing-management"},{"name":"Big Data","url":"/big-data"}],"attachedFiles":[]},{"title":"Holiday Sales Up 5.5% to $584 Billion, Surpassing 2007 Totals","id":5514,"bundle":"article","summary":"Early reports on holiday sales indicate the merriest holiday season for retail since 2007 with about $584.3 billion in sales, a 5.5% increase over last year. Online sales showed particularly strong growth, climbing 15.4% to a projected $36.4 billion. Retailers are hoping a post-holiday blizzard on the East Coast and still-high unemployment across the country won't curdle the eggnog at their holiday parties.","showSummary":null,"url":"/holiday-sales-55-584-billion-surpassing-2007-totals","date":"2010-12-28T00: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":43131,"url":"https://assets1.risnews.com/styles/secondary_articles_short/s3/Xmastree_RIS_12-28-10_0.jpg?itok=ekn77jBr","width":120,"height":132,"alt":null},"topics":[{"name":"E-Commerce","url":"/e-commerce"},{"name":"Marketing","url":"/marketing"},{"name":"Big Data","url":"/big-data"}],"attachedFiles":[]},{"title":"Rite Aid Manages Store Traffic by Adding Business Weather Intelligence","id":6445,"bundle":"article","summary":"Rite Aid adds Business Weather Intelligence from Planalytics to analyze, quantify and manage the weather€„¢s impact on store traffic and demand for select product categories. \n","showSummary":null,"url":"/rite-aid-manages-store-traffic-adding-business-weather-intelligence","date":"2010-03-23T00: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":null,"topics":[{"name":"Business Intelligence (BI)","url":"/business-intelligence"},{"name":"Omnichannel","url":"/omnichannel"},{"name":"Traffic Analysis","url":"/traffic-analysis"},{"name":"Big Data","url":"/big-data"}],"attachedFiles":[]},{"title":"Ace Hardware Incorporates Business Weather Intelligence","id":8655,"bundle":"article","summary":"Ace Hardware selects the Planalytics Business Weather Intelligence platform to measure and predict weather-driven demand. \n","showSummary":null,"url":"/ace-hardware-incorporates-business-weather-intelligence","date":"2007-06-12T00: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":null,"topics":[{"name":"Business Intelligence (BI)","url":"/business-intelligence"},{"name":"Omnichannel","url":"/omnichannel"},{"name":"Big Data","url":"/big-data"}],"attachedFiles":[]},{"title":"Forewarned Is Forearmed","id":809,"bundle":"article","summary":"Weather trend predictions boost sales at Clarks UK \n","showSummary":null,"url":"/forewarned-forearmed","date":"2007-06-01T00: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":null,"topics":[{"name":"Omnichannel","url":"/omnichannel"},{"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);
}
})();