window.articleName = jQuery('h1 span').text();
function sendGa(link) {
var sendGA = dataLayer.push({
'eventCategory': 'Articles',
'eventAction': 'favourite-icon',
'eventLabel': articleName,
'eventNonInteraction': 'true',
'event': 'gaEvent'
});
var sendGA2 = dataLayer.push({
'event': 'article_cta_click',
'event_name': 'articles_favourite_cta',
'content_name': articleName,
'link_classes': link.className,
'link_domain': link.hostname,
'link_id': link.id,
'link_url': link.href,
'link_text': link.text
});
console.log("Article favourite: " + sendGA);
console.log("Article favourite: " + sendGA2);
}
0
window.articleName = jQuery('h1 span').text();
function sendGa(link) {
var sendGA = dataLayer.push({
'eventCategory': 'Articles',
'eventAction': 'favourite-icon',
'eventLabel': articleName,
'eventNonInteraction': 'true',
'event': 'gaEvent'
});
var sendGA2 = dataLayer.push({
'event': 'article_cta_click',
'event_name': 'articles_favourite_cta',
'content_name': articleName,
'link_classes': link.className,
'link_domain': link.hostname,
'link_id': link.id,
'link_url': link.href,
'link_text': link.text
});
console.log("Article favourite: " + sendGA);
console.log("Article favourite: " + sendGA2);
}