Commit 2efbd713 by Jason Jordan

send outbound link events to GA4

parent 1fcb7ac0
......@@ -257,11 +257,9 @@ function trackOutboundRepoLinks() {
// Send Outbound link clicks to Google Analytics for logging
function handleOutboundLinkClicks(event) {
if (typeof ga === "function") { // check for Google Analytics
ga('send', 'event', {
eventCategory: 'Outbound Link',
eventAction: 'click',
eventLabel: event.target.href
if (typeof gtag === "function") { // check for Google Analytics 4
gtag('event', 'outbound_repo_link', {
'holding_repo_url': event.target.href
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment