Skip to content

Commit

Permalink
Track social sharing menu clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
zarino authored and struan committed Feb 28, 2024
1 parent 4661e1f commit 9ceadfc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hub/static/js/area.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ $(function(){

$('body.js-area-page').each(setUpAreaPage);

$('.social-sharing-menu a[target="_blank"]').on('click', function(e){
var $link = $(this);
trackEvent('social_share', {
'service': $link[0].innerText,
'page_location': window.location.href
});
});

$('[data-copy-text]').on('click', function(e){
e.stopPropagation();
if (navigator.clipboard) {
Expand Down

0 comments on commit 9ceadfc

Please sign in to comment.