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:
1 parent
3bd7001795
commit
21b274f91f
1207 files changed
+1349
-6
No files matched your search
@@ -1879,5 +1879,6 @@
|
||||
}, 300);
|
||||
});
|
||||
</script>
|
||||
<script src="/js/plausible-events.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user