Browse Source

📈 site: fix recourse card click node

pull/13120/head
afc163 6 years ago
parent
commit
6b285439c4
  1. 5
      site/theme/template/Content/Article.jsx

5
site/theme/template/Content/Article.jsx

@ -35,12 +35,13 @@ export default class Article extends React.Component {
}
onResourceClick = (e) => {
if (!window.gtag && e.target.className !== 'resource-card') {
const cardNode = e.target.closest('.resource-card');
if (!window.gtag || !cardNode) {
return;
}
window.gtag('event', 'resource', {
event_category: 'Download',
event_label: e.target.href,
event_label: cardNode.href,
});
}

Loading…
Cancel
Save