Skip to content

Commit 7397b43

Browse files
Test analytics
1 parent d02eb38 commit 7397b43

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/QuickStartPromptButton.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ export default function QuickStartPromptButton({ prompt = PROMPT }) {
4848
}, []);
4949

5050
const handleCopy = async () => {
51+
if (window.analytics) {
52+
console.log('Copying prompt', window.analytics);
53+
window.analytics.track('Clicked', {
54+
app: 'docs',
55+
button_text: 'Copy prompt',
56+
element: 'quick-start-prompt-button.copyButton',
57+
});
58+
}
59+
5160
try {
5261
await navigator.clipboard.writeText(prompt);
5362

0 commit comments

Comments
 (0)