Your daily horoscope: January 29 – The Globe and Mail

IF TODAY IS YOUR BIRTHDAY

A sun-Jupiter union on your birthday is an omen of both joy and success. Act as if the world is behind you 100 per cent and that whatever you attempt to do is guaranteed to work – and it will. Lady Luck is smiling on you, so be happy.

ARIES (March 21 – April 20):

You’ll be in a go-getting mood today and will go anywhere and do anything to get what you need. Make sure though that it really is what you need – don’t waste time and energy on objectives that are unlikely to benefit you in the long-term.

TAURUS (April 21 – May 21):

You may be inclined to throw the rule book out of the window today but is that really such a good idea? On the work front especially you should think carefully before insisting that things are done your way – or do you enjoy creating opponents?

Story continues below advertisement

GEMINI (May 22 – June 21):

Don’t automatically assume that friends and relatives will back you up in what you intend to do today. You may think your proposals are reasonable but they are likely to see them in a different light. Make an effort to understand why they’re so doubtful.

CANCER (June 22 – July 23):

Somehow you need to find a way to deal with the opposing forces that are making life so difficult at the moment. It would help if you gave up on the idea that common ground can still be found. It might be wiser just to agree to disagree.

LEO (July 24 – Aug. 23):

Something will happen today or over the weekend that has a profound effect on the way you look at the world in general and at other people in particular. Try to recognize that everyone, even your rivals and enemies, are basically kind and decent.

VIRGO (Aug. 24 – Sept. 23):

Today’s sun-Jupiter link will encourage you to look long and hard at your working routine and find ways to make your daily load less burdensome. To start with, try doing less for certain people – you’ve been carrying them far too long.

LIBRA (Sept. 24 – Oct. 23):

You won’t hesitate to break rules and cut corners today and will most likely get away with it. Cosmic activity in the most dynamic area of your chart suggests you are in one of those moods where sheer force of personality will carry you through to success.

SCORPIO (Oct. 24 – Nov. 22):

You could be a touch too emotional for your own good today, especially if by showing your feelings rivals believe you are on the verge of cracking up. You’re not, of course, but why encourage them? Act tough even if you don’t feel tough.

SAGITTARIUS (Nov. 23 – Dec. 21):

Plan your next move carefully, then put all your physical, mental and emotional energy into getting it done. And don’t forget that no matter how personal your goals may be you can always get other people to assist you. You’re surrounded by willing hands and minds.

Story continues below advertisement

CAPRICORN (Dec. 22 – Jan. 20):

What happened yesterday may not have been to your liking but as there is nothing you can do to change it there is no point dwelling on it. Put it out of your mind and focus on something that excites you. Always look forward, never look back.

AQUARIUS (Jan. 21 – Feb. 19):

The sun and Jupiter combine in your sign today, making it easy for you to think big and act big. Ignore those who say you should be cautious, and follow your heart in whatever direction it points you – that’s where you will find true happiness and success.

PISCES (Feb. 20 – Mar. 20):

Be wary of people who make the kind of promises that are clearly going to be hard to keep. They may sound convincing but deep down you know it is all an act, one designed to benefit them at other people’s expense. Don’t let it be at your expense.

Discover more about yourself at sallybrompton.com

Report an error Editorial code of conduct

“,

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.“,

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);

})();

‘,

‘,

‘,

‘,

‘ ‘,

‘,

‘,
‘ Just $1.99’,

‘,

‘,

per week

‘,

for the first 24 weeks

‘,

‘,

‘,
Start Today ‘,
‘,

‘,

‘,

‘,
‘ Powerful. Important. Impactful.’,

‘,

‘,
‘ The value of quality journalism’,

‘,


‘,

‘,
‘ When you subscribe to globeandmail.com, you get access to:’,

‘,

    ‘,

  • Unlimited access to all our business, investing, politics and health reporting
  • ‘,

  • Conference calls with Globe journalists to answer your questions about COVID-19
  • ‘,

  • Subscriber-exclusive financial tools to help you safeguard and grow your wealth
  • ‘,

  • Complimentary Member Benefits such as Globe guides to podcasts, books, wine, film and more to keep you’,
    ‘ entertained
  • ‘,

‘,

‘,

‘,

‘,

‘,

‘,
The Globe and Mail‘,

Special Limited Time Offer

‘,

‘,
‘,
per week for the first weeks‘,

‘,

Subscribe now and get unlimited access to all our’,
‘ business, investing, politics and public health reporting.

‘,
‘,
‘ ‘,

‘,

‘,

‘ ‘,

‘,

].join(”);

// Add tracking for paywall display here
pushAnalytics1515(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 pushAnalytics1515(testVar, actionLabel) {
analyticsLayer.push({
“event”: “clickEvent”,
“clickEvent”: {
“testId”: “cem1515”,
“feature”: “paywall”,
“action”: actionLabel,
“type”: “test”,
“label”: actionLabel,
“variantName”: testVar,
“segmentName”: “teaser-paywall”
}
});
}

function timerSubscribe(variant) {
window.location.href = variant === ‘expA’ ?
‘https://subscribe.theglobeandmail.com/#/149OFFER1515?intcmp=paywall_cem1515_’ + variant :
‘https://subscribe.theglobeandmail.com/#/199OFFER1515?intcmp=paywall_cem1515_’ + variant;
}

// 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 _1515flattenObj(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 = 3) {
localStorage.setItem(‘isEnableTimerPaywall’, true);
}
}


].join(“”);
}
return template;
}

/**
* Generate a template for the label
* @param {String} label – the label text
* @returns {String}
*/
function displayLabel(label) {
var template = “”;
if (label === “opinion”) {
template = [

“,
“, label, ““,

“,
].join(“”);
}
return template;
}

/**
* Display “Follow”, “Following” buttons
* @param {Object} tData
* @returns {String}
*/
function displayFollowingButton(tData) {
var topicName = tData.topicName;
var topicSlug = tData.topicSlug;
var topicType = tData.topicType;
var topicImg = tData.topicImg;
var isAuthor = topicType === “author”;
var authorImg = isAuthor && topicImg
? “" + topicName + "
: “”;
var template = isAuthor ? “/authors/” : “/topics/”;
var href = window.tgam.env.baseRootAbsoluteUrl + template + topicSlug;
var linkClasses = isAuthor ? “c-topic-link c-topic-link–author” : “c-topic-link”;
return [
” “,
].join(“”);
}

/**
* Generates story card markup
* @param {Object} article – to display
* @param {Object} topicData – (topicName, topicSlug, topicType, topicVariation, topicImg)
* @param {Boolean} addFollowButton
* @returns {String} story card markup
*/
function storyCard(article, topicData, addFollowButton) {
// console.info(“[ARC-7130] storyCard”, { article: article, topic: topicData });
if (!article || !topicData) {
return “”;
}
var tName = topicData.topicName;
var tType = topicData.topicType;
var tVariation = topicData.topicVariation;
var followingTopic;
var timeTemplate;
var analyticsModifier = tType + “: “;

if (addFollowButton) {
// Display a follow button beside the topic name
followingTopic = displayFollowingButton(topicData);
timeTemplate = displayDateTag(article);
}
var label = getLabel(article);
var image = getImage(article, label);
var labelTemplate = displayLabel(label);
var imageTemplate = displayImage(image);
var headline = article.headlines.basic;
var href = window.tgam.env.baseUrl + article.canonical_url;
var sophiId = article._id;

var dataAnalyticsClick = JSON.stringify({
type: “link”,
feature: “following feed”,
contentId: sophiId,
label: analyticsModifier + tName.toLowerCase() + “: ” + headline.toLowerCase(),
page: “sec:homepage:personalized feed:” + tVariation,
hierarchy: 1
});

var cardMarkup = “”;
if (!followingTopic) {
cardMarkup = [
“,

“,

“,
“, tName, ““,

“,

“,
“, headline, ““,

“,
labelTemplate,

“,

“, imageTemplate, “

“,

].join(“”);
} else {
cardMarkup = [

“,
followingTopic,

“,
“,

“,

“,
“, headline, ““,

“,
“, timeTemplate, ““,

“,

“, imageTemplate, “

“,
“,
].join(“”);
}
return [

“,
cardMarkup,

“,
].join(“”);
}

/**
* Adds the overlay trigger dot class
* @param {String} type – “unread” or “no-follow”
*/
function addOverlayTriggerDot(type) {
overlayTriggerDotClasses.forEach(function fn(dotClass) {
if (dotClass === “c-your-globe__trigger–dot–” + type) {
overlayTrigger.classList.add(dotClass);
} else {
overlayTrigger.classList.remove(dotClass);
}
});
overlayTrigger.classList.add(“c-your-globe__trigger–dot”);
}

/**
* Removes the overlay trigger dot class
*/
function removeOverlayTriggerDot() {
overlayTriggerDotClasses.forEach(function fn(dotClass) {
overlayTrigger.classList.remove(dotClass);
});
overlayTrigger.classList.remove(“c-your-globe__trigger–dot”);
}

/**
* Returns a heading element to be displayed inside the overlay
* @param {String} text
* @returns {String}
*/
function overlayLabel(text) {
return “

” + text + “

“;
}

var overlayHeadingHasFollowed = (
overlayLabel(“The latest in topics and authors you follow”) +

View more in Following


);

var overlayHeadingNoFollowed = (
overlayLabel(“Get started: build your personal news feed”) +

    ” +

  1. Follow topics relevant to your reading interests.
  2. ” +

  3. Check back here or your Following page to view the latest articles on your topics.
  4. ” +


);

var upToDateMessage = “

You’re up to date on your Following feed. Check again later for new stories.

“;

// ************************************************
// Parse API response and inject markup into overlay
// ************************************************

// Story card markup

/**
* Stories originally came from the following locations in the API response:
* – data.articles[i].items[i].topics
* – data.articles[i].items[i].authors
* @param {Array} stories
* @returns {String} story card markup
*/
function latestStoryCards(stories) {
console.info(“[ARC-7130] Display latest stories based on these stories:”, stories);

var storyCards = stories.map(function fn(story) {
// The “topics” and “authors” arrays will only contain one item
// (i.e. the topic or author that the user is following)
var topic;
var topicData;

if (story.topics && story.topics.length) {
// Normal topic
topic = story.topics[0];
topicData = {
topicName: topic.name,
topicSlug: topic.slug,
topicType: “topic”,
topicVariation: “following”
};
} else if (story.authors && story.authors.length) {
// Author topic
topic = story.authors[0];
// Only authors have images associated with them – normal topics do not
var authorImg = topic.metadata && topic.metadata.image ? topic.metadata.image : null;
topicData = {
topicName: topic.byline,
topicSlug: topic.slug,
topicType: “author”,
topicVariation: “following”,
topicImg: authorImg
};
}
// Don’t display a follow button beside the topic because the user is already following it
return storyCard(story, topicData, false);
}).join(“”);

return storyCards;
}

/**
* @param {Array} topics
* @param {String} variation – “recommended” or “trending” (used for the click tracking analytics)
* @returns {String} story card markup
*/
function recommendedTrendingStoryCards(topics, variation) {
var uniqueStories = generateUniqueStory(topics);
var storyCards = uniqueStories.map(function fn(topic) {
// Grab one article
var story = topic.items[0];
// Only authors have images associated with them – normal topics do not
var authorImg = topic.authorTopic && topic.authorMetadata && topic.authorMetadata.image
? topic.authorMetadata.image
: null;
// Normally we’d display all of the topics that are assigned to an article, but
// this API groups articles by topic, so we only have access to that one topic.
// Even if we could display additional topics, we wouldn’t want to becuase having
// multiple follow buttons would junk up the UI.
var topicData = {
topicName: topic.name,
topicSlug: topic.slug,
topicType: topic.authorTopic ? “author” : “topic”,
topicVariation: variation,
topicImg: authorImg
};
// Display the follow button beside the topic because we’re suggesting new topics to follow
return storyCard(story, topicData, true);
}).join(“”);

return storyCards;
}

/**
* Topics originally came from the following locations in the API response:
* – data.recommendedAuthors
* – data.recommendedTopics
* @param {Array} topics
* @returns {String} story card markup
*/
function recommendedStoryCards(topics) {
console.info(“[ARC-7130] Display recommended stories based on these topics:”, topics);
return recommendedTrendingStoryCards(topics, “recommended”);
}

/**
* Topics originally came from the following location in the API response:
* – data.trendingTopics
* @param {Array} topics
* @returns {String} story card markup
*/
function trendingStoryCards(topics) {
console.info(“[ARC-7130] Display trending stories based on these topics:”, topics);
return recommendedTrendingStoryCards(topics, “trending”);
}

// Markup inside the overlay

/**
* @param {Array} stories
* @returns {Object} markup for the overlay’s header and body content areas
*/
function showLatestStories(stories) {
console.info(“[ARC-7130] Scenario: latest stories”);
var storyCardsMarkup = latestStoryCards(stories);
return {
header: overlayHeadingHasFollowed,
body: storyCardsMarkup
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function upToDateShowRecommended(topics) {
console.info(“[ARC-7130] Scenario: up to date, show recommended”);
var storyCardsMarkup = recommendedStoryCards(topics);
return {
header: overlayHeadingHasFollowed,
body: (
upToDateMessage +
overlayLabel(“Recommended for you”) +
storyCardsMarkup
)
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function upToDateShowTrending(topics) {
console.info(“[ARC-7130] Scenario: up to date, show trending”);
var storyCardsMarkup = trendingStoryCards(topics);
return {
header: overlayHeadingHasFollowed,
body: (
upToDateMessage +
overlayLabel(“Trending topics to follow”) +
storyCardsMarkup
)
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function notFollowingShowRecommended(topics) {
console.info(“[ARC-7130] Scenario: not following, show recommended”);
var storyCardsMarkup = recommendedStoryCards(topics);
return {
header: overlayHeadingNoFollowed,
body: (
overlayLabel(“Recommended for you”) +
storyCardsMarkup
)
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function notFollowingShowTrending(topics) {
console.info(“[ARC-7130] Scenario: not following, show trending”);
var storyCardsMarkup = trendingStoryCards(topics);
return {
header: overlayHeadingNoFollowed,
body: (
overlayLabel(“Trending topics to follow”) +
storyCardsMarkup
)
};
}

/**
* Parse data from the personalized API and inject markup into the overlay
* @see https://confluence.theglobeandmail.com/display/ARC/Logic+for+Embedded+on+Homepage++and+Your+Globe+Overlay
* @param {Object} data – topic and story data provided by the API
*/
function parsePerzonalizedTopicsData(data) {
console.info(“[ARC-7130] parsePerzonalizedTopicsData”, data);

var overlayHeader = qs(“.c-your-globe__overlay-header”);
var overlayHeaderText = qs(“.c-your-globe__overlay-header-text”);
var overlayBody = qs(“.c-your-globe__overlay-body”);

if (!overlayHeader || !overlayHeaderText || !overlayBody) {
return;
}
var totalTopicsFollowed = data.totalTopicsFollowed || 0;
var totalAuthorsFollowed = data.totalAuthorsFollowed || 0;
var recommendedTopics = data.recommendedTopics || [];
var recommendedAuthors = data.recommendedAuthors || [];
var latestStories = data.articles || [];
var topics = [];
var stories = [];
var markup = “”;
var headerBorder = true;

if (totalTopicsFollowed || totalAuthorsFollowed) {
if (latestStories.length) {
// Scenario 1: “Latest stories”
stories = generateLatestStories(latestStories);
markup = showLatestStories(stories); // Similar to displayLatestAndRecommended() in ARC-6292
addOverlayTriggerDot(“unread”);
} else {
if (recommendedTopics.length || recommendedAuthors.length) {
// Scenario 2: “Up to date, show recommended”
topics = recommendedAuthors.concat(recommendedTopics);
markup = upToDateShowRecommended(topics); // Similar to displayRecommendedTrendingTopicList(“rec”) in ARC-6292
} else {
// Scenario 3: “Up to date, show trending”
topics = data.trendingTopics || [];
markup = upToDateShowTrending(topics); // Similar to displayRecommendedTrendingTopicList(“trend”) in ARC-6292
}
}
} else {
topics = recommendedAuthors.concat(recommendedTopics);
if (topics.length) {
// Scenario 4: “Not following, show recommended”
markup = notFollowingShowRecommended(topics); // Similar to displayThreeTopicsOneStory(“rec”) in ARC-6292
} else {
// Scenario 5: “Not following, show trending”
topics = data.trendingTopics || [];
markup = notFollowingShowTrending(topics); // Similar to displayThreeTopicsOneStory(“trend”) in ARC-6292
}
addOverlayTriggerDot(“no-follow”);
headerBorder = false;
}
console.info(“[ARC-7130] Append markup”);

var spinner = qs(“.c-spinner”);
spinner && spinner.parentElement.removeChild(spinner);

overlayHeaderText.insertAdjacentHTML(“afterbegin”, markup.header);
overlayBody.insertAdjacentHTML(“afterbegin”, markup.body);

if (!headerBorder) {
overlayHeader.classList.add(“c-your-globe__overlay-header–no-border”);
}
addFollowingFunctionality();
}

// ************************************************
// API calls
// ************************************************

/**
* Get the personalized feed
* @param {String} hashId – user’s hash id
* @param {String} env – environment
* @see https://confluence.theglobeandmail.com/display/ARC/Logic+for+Embedded+on+Homepage++and+Your+Globe+Overlay
* @returns {Promise

‘,
].join(”);
} else {
document.getElementById(‘firstvisit-modal’).innerHTML = [

‘,

‘,
‘ ‘,
‘ ‘,
‘ ‘,

‘,
‘ ‘,
‘ <!–

‘,

–>’,

‘,
‘ Get access to newsletters, bookmarks, audio, special events and more’,

‘,

‘,
‘,

‘,


].join(”);
}

// dark background:
var bgdark = document.createElement(‘div’);
bgdark.setAttribute(“class”, “c-lightbox”);
bgdark.setAttribute(“id”, “firstvisit-bgdark”);
var refNode = document.getElementById(“firstvisit-modal”);
refNode.parentNode.insertBefore(bgdark, refNode);
}

function closeFirstVisitModal() {
document.getElementById(‘firstvisit-modal’).className = ‘ u-hidden’;
document.getElementById(‘firstvisit-bgdark’).className = ‘ u-hidden’;
document.getElementsByTagName(‘body’)[0].classList.remove(‘u-no-scroll’, ‘modal-open’);
}

function clickFirstVisitButton() {
mobileInterstitialPushAnalytics(‘clickRegisterToday’, ‘expB’);
var url = ‘https://’ + window.tgam.env.secDomain +
‘.theglobeandmail.com/user/?intcmp=registrations-cem1808_experienceB#/register’;
var headerRegBtn = document.getElementById(‘c-site-header-register-button’);
if (headerRegBtn) {
headerRegBtn.href = url;
headerRegBtn.click();
}

}

// label options: modalDisplay, clickRegisterToday
function mobileInterstitialPushAnalytics(action, variant) {
window.analyticsLayer.push({
“event”: “clickEvent”,
“clickEvent”: {
“testId”: “cem1808”,
“feature”: “promotions”,
“action”: action,
“type”: “test”,
“label”: action,
“variantName”: variant,
“segmentName”: “anony-modal”
}
})
}

Leave a Reply

Your email address will not be published. Required fields are marked *