Skip to content

Commit

Permalink
Merge pull request #166 from dgmstuart/fix/twitter-js
Browse files Browse the repository at this point in the history
Add twitter analytics event code back
  • Loading branch information
dgmstuart authored Mar 24, 2023
2 parents b3f94f8 + 0892ad0 commit ca47e39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/javascript/application/listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ import { format } from 'timeago.js'
});
};

add_tweet_share_analytics_event = function() {
return $('.share_button.twitter').click(function() {
return _gaq.push(['_trackEvent', 'Share Button', 'twitter', this.href]);
});
};

add_facebook_share_analytics_event = function() {
return $('.share_button.facebook').click(function() {
return _gaq.push(['_trackEvent', 'Share Button', 'facebook', this.href]);
Expand Down

0 comments on commit ca47e39

Please sign in to comment.