Track outbound clicks as Plausible custom events

js/plausible-events.js classifies every outbound click:
  Affiliate Click  — host in AFFILIATES map, or rel=sponsored
  Outbound Click   — any other external link
props: network, destination, destination_path, placement (utm_medium),
link_text, lang. Internal links, in-page anchors, mailto: and tel: are ignored;
data-plausible-skip opts an element out. Adding a new partner is one line in
AFFILIATES. Loaded on 1206 pages before </body>.

Create the two goals in Plausible (Settings -> Goals -> Custom event) named
exactly 'Affiliate Click' and 'Outbound Click' for them to show as conversions.
This commit is contained in:
Hermes Agent committed 2026-10-24 18:42:02 +00:00
1 parent 3bd7001795
commit 21b274f91f
1207 files changed
+1349 -6

No files matched your search

@@ -1621,5 +1621,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -2162,5 +2162,6 @@
</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1369,5 +1369,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1098,5 +1098,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1902,5 +1902,6 @@
});
}
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1268,5 +1268,6 @@
setTimeout(pulse, 3000);
}
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
+1
View File
@@ -793,6 +793,7 @@
<!-- Directory Card Fix Script -->
<script src="/js/directory-fix.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
<!-- Vercel deployment fix --><!-- Force redeploy Mon, Aug 4, 2025 7:24:05 AM -->
@@ -829,5 +829,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1162,5 +1162,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1569,5 +1569,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1521,5 +1521,6 @@ const initializeScrollAnimations = () => {
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1395,5 +1395,6 @@ setInterval(cleanupResources, 30000);
banner.init();
}
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1575,5 +1575,6 @@ const initializeScrollAnimations = () => {
banner.init();
}
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1623,5 +1623,6 @@ document.addEventListener('DOMContentLoaded', () => {
const cookieBanner = new CookieBanner();
cookieBanner.init();
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1149,5 +1149,6 @@
}, 100);
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1169,5 +1169,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -901,5 +901,6 @@
.attr('stroke-dashoffset', 0);
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1321,5 +1321,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -850,5 +850,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -872,5 +872,6 @@
}, 100);
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -836,5 +836,6 @@
}, 500);
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1261,5 +1261,6 @@ document.addEventListener('DOMContentLoaded', () => {
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1336,5 +1336,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1199,5 +1199,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1333,5 +1333,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -816,5 +816,6 @@
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -724,5 +724,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -447,5 +447,6 @@
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1056,5 +1056,6 @@
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1180,5 +1180,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1279,5 +1279,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -945,5 +945,6 @@
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -857,5 +857,6 @@
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -923,5 +923,6 @@
`;
document.head.appendChild(additionalStyles);
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -362,5 +362,6 @@
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1126,5 +1126,6 @@ ul li strong {
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1074,5 +1074,6 @@ ul li strong {
initializeVisualizations();
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -1131,5 +1131,6 @@
});
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -891,5 +891,6 @@ ul li strong {
}
});
</script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -293,5 +293,6 @@ ul li strong {
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>
@@ -293,5 +293,6 @@ ul li strong {
<script src="/components/footer.min.js"></script>
<script>document.write(/*W6-static*/null);</script>
<script src="/js/cookie-banner.min.js"></script>
<script src="/js/plausible-events.js" defer></script>
</body>
</html>