Skip to content

Commit

Permalink
Updated event handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gabros20 committed Jan 7, 2025
1 parent 8ec171a commit d309de8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 1 addition & 6 deletions src/components/Analytics/Plausible.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ import Script from "next/script";
export default function Plausible() {
return (
<>
<Script
defer
data-domain='celestia.org'
src='https://plausible.io/js/script.file-downloads.hash.outbound-links.pageview-props.tagged-events.js'
strategy='afterInteractive'
/>
<Script defer data-domain='celestia.org' src='https://plausible.io/js/script.tagged-events.js' strategy='afterInteractive' />
<Script id='plausible-setup' strategy='afterInteractive'>
{`
window.plausible = window.plausible || function() {
Expand Down
8 changes: 5 additions & 3 deletions src/components/Heroes/PrimaryHero.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ const PrimaryHero = ({ headline, subheadline, buttons, videos }) => {
}, []);

const handleButtonClick = (buttonText, url) => {
trackEvent("hero_button_click", {
button_text: buttonText,
destination: url,
trackEvent("Button: Hero Click", {
button: buttonText,
url: url,
location: "primary_hero",
path: window.location.pathname,
});
};

Expand Down

0 comments on commit d309de8

Please sign in to comment.