Skip to content

Commit

Permalink
Merge pull request #6897 from samvera/i1020-ga4-followup
Browse files Browse the repository at this point in the history
[i1020] - correct ga4 typo that prevents download tracking
  • Loading branch information
ShanaLMoore authored Sep 3, 2024
2 parents b02cd98 + ce01a3a commit e1160bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/assets/javascripts/hyrax/analytics_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ $(document).on('click', '#file_download', function(e) {
window.trackingTags.analytics().push([trackingTags.trackEvent(), 'work-in-collection', 'work-in-collection-download', collection]);
});
} else {
gtag('event', 'file-set-download', { 'content-type': 'file-set', 'content-id': $(this).data('label')})
gtag('event', 'file-set-in-work-download', { 'content-type': 'file-set-in-work', 'content-id': $(this).data('work-id')})
gtag('event', 'file-set-download', { 'content_type': 'file-set', 'content_id': $(this).data('label')})
gtag('event', 'file-set-in-work-download', { 'content_type': 'file-set-in-work', 'content_id': $(this).data('work-id')})
$(this).data('collection-ids').forEach(function (collection) {
gtag('event', 'file-set-in-collection-download', { 'content-type': 'file-set-in-collection', 'content-id': collection })
gtag('event', 'work-in-collection-download', { 'content-type': 'work-in-collection', 'content-id': collection })
gtag('event', 'file-set-in-collection-download', { 'content_type': 'file-set-in-collection', 'content_id': collection })
gtag('event', 'work-in-collection-download', { 'content_type': 'work-in-collection', 'content_id': collection })
});
}
});

0 comments on commit e1160bb

Please sign in to comment.