Skip to content

Commit

Permalink
feat(topics): add analytics data to topics page
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Aug 27, 2024
1 parent 121a7f4 commit b7d7b12
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions static/js/TopicPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ const TopicPage = ({
}
} else {
sidebar = (
<div className="sideColumn">
<div className="sideColumn" data-anl-panel_type="topics" data-anl-panel_number={0}>
<TopicSideColumn
key={topic}
slug={topic}
Expand Down Expand Up @@ -684,7 +684,7 @@ const TopicPage = ({

const currentLang = getCurrentLang()

return <div className={classStr} data-anl-topicSlug={topic}>
return <div className={classStr} data-anl-project="topics">
<div className="content noOverflowX" ref={scrollableElement}>
<div className="columnLayout">
<div className="mainColumn storyFeedInner">
Expand Down Expand Up @@ -804,14 +804,12 @@ const TopicPageTab = ({


const TopicLink = ({topic, topicTitle, onClick, isTransliteration, isCategory}) => (
<div data-anl-event={"click"} data-anl-topicLink={topic} data-anl-batch={JSON.stringify({yo: 1, sup: 2})}>
<Link className="relatedTopic" href={`/topics/${isCategory ? 'category/' : ''}${topic}`}
onClick={onClick.bind(null, topic, topicTitle)} key={topic}
title={topicTitle.en}
>
<InterfaceText text={{en:topicTitle.en, he:topicTitle.he}}/>
</Link>
</div>
<Link className="relatedTopic" href={`/topics/${isCategory ? 'category/' : ''}${topic}`}
onClick={onClick.bind(null, topic, topicTitle)} key={topic}
title={topicTitle.en}
>
<InterfaceText text={{en:topicTitle.en, he:topicTitle.he}}/>
</Link>
);
TopicLink.propTypes = {
topic: PropTypes.string.isRequired,
Expand Down

0 comments on commit b7d7b12

Please sign in to comment.