From 7e739481e683b2c2f90eb504401ea5bdc4a00ec1 Mon Sep 17 00:00:00 2001 From: LWinterberg <87814144+LWinterberg@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:05:25 +0200 Subject: [PATCH] correct tracking --- src/components/button/DownloadMuseHubButton.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/button/DownloadMuseHubButton.jsx b/src/components/button/DownloadMuseHubButton.jsx index 390a2b5..54b36e7 100644 --- a/src/components/button/DownloadMuseHubButton.jsx +++ b/src/components/button/DownloadMuseHubButton.jsx @@ -8,11 +8,13 @@ function DownloadMuseHubButton() { useEffect(() => { setBrowserOS(platform.os.family); - }, []); function handleButtonClick(href) { - if (href !== "https://www.musehub.com/") { + if ( + href !== "https://www.musehub.com/" && + href !== audacityReleases.lin[0].browser_download_url + ) { if (typeof _paq !== "undefined") { _paq.push([ "trackEvent", @@ -21,11 +23,17 @@ function DownloadMuseHubButton() { `Download Muse Hub button ${platform.os.family}`, ]); } + } else if (href === audacityReleases.lin[0].browser_download_url) { + _paq.push([ + "trackEvent", + "Download Button", + "Download Audacity", + `Download Audacity button ${platform.os.family}`, + ]); } } function renderButton(href) { - return ( handleButtonClick(href)}