“
Save time by making it easy to scan all the latest stories on topics you follow in one place.
“,
“
“,
“
”
].join(“”);
var content2 = [
““,
“
“
Adding topics. Click on the + symbol to save the topic to your Following page.
“,
“
“,
“
(Step 1 of 3)
“,
“
“,
““,
““,
“
”
].join(“”);
var content3 = [
““,
“
“
Clicking on the topic’s name will bring you to a page where you can view all the articles that pertain to that topic.
“,
“
“,
“
(Step 2 of 3)
“,
“
“,
““,
““,
“
”
].join(“”);
var content4 = [
““,
“
“

“
Access your following topics by clicking on your display name. The number in your display name indicates the number of new articles you haven’t read from your following topics.
“,
“
“,
“
(Step 3 of 3)
“,
“
“,
““,
““,
“
”
].join(“”);
var contentMarkup = [content1, content2, content3, content4];
function createTourtip() {
var relatedTopics = document.querySelector(“#main-content-area .pb-f-topics-article-related .c-topic-group__body ul”);
var topicPageTitle = document.querySelector(“.o-primary-header–section .c-topic”);
// If the following topics buttons are present on the page, set up the tourtips
if (relatedTopics || topicPageTitle) {
var modifier = relatedTopics ? ‘darwin-arc6134–article’ : ‘darwin-arc6134–topic-page’
var dataAnalyticsClick = JSON.stringify({
testId: “arc6134”,
type: “button”,
feature: “topic tour tip”,
label: “show tooltip”
});
var el = relatedTopics ? document.createElement(“li”) : document.createElement(“div”);
el.classList.add(“darwin-arc6134”);
el.classList.add(modifier);
el.innerHTML = “
“+contentMarkup[0] + “
“;
relatedTopics ? relatedTopics.appendChild(el) : topicPageTitle.appendChild(el);
// Remove follow topics onboarding messages and activation tooltips
setTimeout(function() {
var onboardingMessages = document.querySelectorAll(“.c-topic-group__body .c-onboarding-message”);
var tooltips = document.querySelectorAll(“.c-topic-group__body .c-tooltip”);
console.log(“[ARC-6134]: onboardingMessages: “, onboardingMessages);
Array.from(onboardingMessages).forEach(function(el) {
el.parentNode.removeChild(el);
});
Array.from(tooltips).forEach(function(el) {
el.parentNode.removeChild(el);
});
}, 3000);
}
}
function analyticsPush(type, panel, action) {
if (type === “simple”) {
analyticsLayer.push({
“event”: “simpleEvent”,
“simpleEvent”: {
“testId”: “arc6134”,
“action”: “view tour slide”,
“label”: “slide “+panel
}
});
}
if (type === “click”) {
analyticsLayer.push({
“event”:”clickEvent”,
“clickEvent”: {
“testId”: “arc6134”,
“feature”: “topic tour tip”,
“type”: “button”,
“label”: action,
}
});
}
}
function tourtipActions() {
// Open tourtips
var container = document.querySelector(“.darwin-arc6134”);
var activateIcon = document.querySelector(“.js-tourtip-activate”);
var tourtipContainer = document.querySelector(“.darwin-arc6134__tourtip”);
activateIcon.addEventListener(“click”, function() {
if (!container.classList.contains(“darwin-arc6134–open”)) {
container.classList.add(“darwin-arc6134–open”);
tourtipContainer.removeAttribute(“hidden”);
keepInViewport();
localStorage.setItem(“tgam.tourtip_icon_clicked”, true);
analyticsPush(“click”, 1, “show tooltip”);
analyticsPush(“simple”, 1, “”);
}
});
// Advance tourtip panels
tourtipContainer.addEventListener(‘click’, function(e) {
var tourtipPanel = tourtipContainer.getAttribute(“data-panel”);
var activateIcon = document.querySelector(“.js-tourtip-activate”);
var el = e.target || e.srcElement;
var action = el.getAttribute(“data-action”);
if (action === “next”) {
tourtipPanel++;
analyticsPush(“simple”, tourtipPanel, action);
} else if (action === “prev”) {
tourtipPanel–;
analyticsPush(“simple”, tourtipPanel, action);
} else {
tourtipPanel = 1;
tourtipContainer.setAttribute(“hidden”, true);
container.classList.remove(“darwin-arc6134–open”);
tourtipContainer.classList.remove(“darwin-arc6134__tourtip–leftOut”);
tourtipContainer.classList.remove(“darwin-arc6134__tourtip–rightOut”);
activateIcon.classList.remove(“darwin-arc6134__tourtip–leftOut”);
activateIcon.classList.remove(“darwin-arc6134__tourtip–rightOut”);
tourtipContainer.classList.remove(“js-tourtip–centred”);
tourtipContainer.style.removeProperty(“left”);
}
analyticsPush(“click”, tourtipPanel, action);
tourtipPanel === 4 ? tourtipContainer.classList.add(“darwin-arc6134__tourtip–last-panel”) : tourtipContainer.classList.remove(“darwin-arc6134__tourtip–last-panel”);
tourtipContainer.innerHTML = contentMarkup[tourtipPanel-1];
tourtipContainer.dataset.panel = tourtipPanel;
});
}
function init() {
console.log(“[ARC-6134] init”);
var testIsEnabled = /token=arc6134/.test(window.location.search);
console.log(“ARC-6134 testIsEnabled: “, testIsEnabled);
var testGroup = userTestGroup();
if (testGroup === “variant” || testIsEnabled) {
setUnitState(“arc6134”, “variant”);
console.log(“[ARC-6134] test group: variant”);
createTourtip();
tourtipActions();
intersectTourtip();
}
if (testGroup === “control”) {
console.log(“[ARC-6134] test group: control”);
setUnitState(“arc6134”, “control”);
}
}
init();
}]);
}
window.tgam.darwin.tests.after.push(dwExecute_UXTestARC6134);
})();
‘
‘
‘
Join a national community of curious and ambitious Canadians’,
‘
‘,
‘
‘
‘
Subscribe to globeandmail.com for unlimited access to’,
‘ Canada’s’,
‘ leading independent’,
‘ journalism.
‘,
‘
‘
Just$1.99‘,
‘
‘,
‘
per week for first 24 weeks
‘,
‘
‘,
‘ ‘,
‘
Cancel Anytime
‘,
‘
‘,
‘ ‘,
‘ ‘,
‘
‘,
‘
‘,
‘
‘
‘

‘
Special Limited Time Offer
‘,
‘
‘,
‘ $1.99‘,
‘ per week for the first 24 week‘,
‘
‘,
‘
Subscribe now and get unlimited access to all our’,
‘ business, investing, politics and public health reporting.
‘,
‘ ‘,
‘ ‘,
‘
‘,
‘
‘,
‘ ‘,
‘
‘,
”,
‘‘,
”
].join(”);
// Add tracking for paywall display here
pushAnalytics1913(testVar, “display”);
const renderPaywall = function () {
return paywallInnerHTML;
}
setKeytarWall(paywall_type.type, ‘teaser’, {
template: renderPaywall
});
// setTimer for experience
if (paywall !== ‘control’) {
setTimeout(function () {
initializeClock(‘customTimer’, deadline);
}, 500);
}
}
function pushAnalytics1913(testVar, actionLabel) {
analyticsLayer.push({
“event”: “clickEvent”,
“clickEvent”: {
“testId”: “cem1913”,
“feature”: “paywall”,
“action”: actionLabel,
“type”: “test”,
“label”: actionLabel,
“variantName”: testVar,
“segmentName”: “teaser-paywall”
}
});
}
// Set the remaining time
function getTimeRemaining(endtime) {
const total = Date.parse(endtime) – Date.parse(new Date());
const seconds = Math.floor((total / 1000) % 60);
const minutes = Math.floor((total / 1000 / 60) % 60);
return {
total,
minutes,
seconds
};
}
// Initialize the clock
function initializeClock(id, endtime) {
const clock = document.getElementById(id);
const minutesSpan = clock.querySelector(‘.minutes’);
const secondsSpan = clock.querySelector(‘.seconds’);
updateClock();
function updateClock() {
const t = getTimeRemaining(endtime);
minutesSpan.innerHTML = (‘0’ + t.minutes).slice(-2);
secondsSpan.innerHTML = (‘0’ + t.seconds).slice(-2);
if (t.total currentTime;
}
// parse the api response
function _1913flattenObj(data) {
var result = {};
function recurse(cur, prop) {
if (Object(cur) !== cur) {
result[prop] = cur;
} else if (Array.isArray(cur)) {
for (var i = 0, l = cur.length; i
Catch up on today’s news in one email
if (section !== ”) {
document.getElementsByClassName(‘c-article-body’)[0].className += ‘ newsletterpromo’;
var newNode = document.createElement(‘div’);
newNode.setAttribute(“id”, “newsletterpromo”);
var count = -1;
for (i = 0; i
‘ +
newsletterSection[section][i].name + ‘
‘ +
newsletterSection[section][i].duration + ‘
‘ +
newsletterSection[section][i].body +
‘
Signed up
‘;
count++;
}
}
newsletterContainer +=
‘