From fe52b843b04cd6ebb9ae49617b2ca0c789ea4b91 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Wed, 2 Mar 2022 18:55:11 +0100 Subject: [PATCH] Track download clicks --- app/components/InstallExtensionButton.jsx | 8 ++++++++ app/root.jsx | 1 + 2 files changed, 9 insertions(+) diff --git a/app/components/InstallExtensionButton.jsx b/app/components/InstallExtensionButton.jsx index 77fd0bb..3ab8a74 100644 --- a/app/components/InstallExtensionButton.jsx +++ b/app/components/InstallExtensionButton.jsx @@ -26,6 +26,11 @@ const BrowserIcons = { const DefaultLink = "https://github.com/getAlby/lightning-browser-extension"; function Install({ style }) { + + function trackDownload() { + plausible('Download'); + } + var parser = new UAParser(); const browser = parser.getBrowser(); function renderIcon() { @@ -43,6 +48,7 @@ function Install({ style }) { Install Alby @@ -69,6 +75,7 @@ function Install({ style }) { return ( {renderIcon()} @@ -80,6 +87,7 @@ function Install({ style }) { { + trackDownload(); alert( `We currently do not yet support ${browser.name}. But maybe you can install it from source.` ); diff --git a/app/root.jsx b/app/root.jsx index 9173595..b70ad7c 100644 --- a/app/root.jsx +++ b/app/root.jsx @@ -29,6 +29,7 @@ export default function App() { +