Skip to content

Commit 63aa741

Browse files
committed
Add analytics event to docs link
1 parent 017c3aa commit 63aa741

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: apps/reactotron-app/src/renderer/pages/home/welcome.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { shell } from "electron"
33
import styled from "styled-components"
44
import { reactotronLogo } from "../../images"
55
import { EmptyState } from "reactotron-core-ui"
6+
import { useAnalytics } from "../../util/analyticsHelpers"
67

78
const WelcomeText = styled.div`
89
font-size: 1.25em;
@@ -26,11 +27,15 @@ function openDocs() {
2627
}
2728

2829
function Welcome() {
30+
const { sendExternalLinkAnalyticsEvent } = useAnalytics()
31+
2932
return (
3033
<EmptyState image={reactotronLogo} title="Welcome to Reactotron!">
3134
<WelcomeText>Connect a device or simulator to get started.</WelcomeText>
3235
<WelcomeText>Need to set up your app to use Reactotron?</WelcomeText>
33-
<Container onClick={openDocs}>Check out the docs here!</Container>
36+
<Container onClick={()=>{
37+
sendExternalLinkAnalyticsEvent("docs")
38+
openDocs()}}>Check out the docs here!</Container>
3439
</EmptyState>
3540
)
3641
}

0 commit comments

Comments
 (0)