Skip to content

Commit

Permalink
chore(topics): track clicks on trending topics
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Dec 14, 2024
1 parent 23bd030 commit 1a4e5ac
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions static/js/NavSidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -590,12 +590,18 @@ const AboutTopics = ({hideTitle}) => (


const TrendingTopics = () => (
<div data-anl-feature_name="Trending">
<div data-anl-feature_name="Trending" data-anl-link_type="topic">
<SidebarModule>
<SidebarModuleTitle>Trending Topics</SidebarModuleTitle>
{Sefaria.trendingTopics.map((topic, i) =>
<div className="navSidebarLink ref serif" key={i}>
<a href={"/topics/" + topic.slug}><InterfaceText text={{en: topic.en, he: topic.he}}/></a>
<a
href={"/topics/" + topic.slug}
data-anl-event="navto_topic:click"
data-anl-text={topic.en}
>
<InterfaceText text={{en: topic.en, he: topic.he}}/>
</a>
</div>
)}
</SidebarModule>
Expand Down

0 comments on commit 1a4e5ac

Please sign in to comment.