File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { useRouter } from 'next/router';
5
5
import { useState } from 'react' ;
6
6
import reactToText from 'react-to-text' ;
7
7
import { useCopyToClipboard } from 'react-use' ;
8
+ import { trackGoal } from 'fathom-client' ;
8
9
9
10
import { ClipboardCheckIcon , ClipboardIcon , LinkIcon } from './icons' ;
10
11
import { InlineCode } from './InlineCode' ;
@@ -256,6 +257,7 @@ function CustomPreformattedText(
256
257
onClick = { ( ) => {
257
258
copyToClipboard ( code ) ;
258
259
setCopied ( true ) ;
260
+ trackGoal ( 'QJ1G67BS' , 0 ) ;
259
261
260
262
setTimeout ( ( ) => {
261
263
setCopied ( false ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Link from 'next/link';
4
4
import { useClickAway } from 'react-use' ;
5
5
import cx from 'classnames' ;
6
6
import { DocSearch } from '@docsearch/react' ;
7
+ import { trackGoal } from 'fathom-client' ;
7
8
8
9
import '@docsearch/css' ;
9
10
@@ -284,6 +285,9 @@ export function Base({ children, headings }: BaseProps) {
284
285
< ExternalLink
285
286
href = "https://v1.dinerojs.com/"
286
287
className = "font-semibold text-white hover:underline"
288
+ onClick = { ( ) => {
289
+ trackGoal ( 'QHN9GSLE' , 0 ) ;
290
+ } }
287
291
>
288
292
Click here for v1.x documentation
289
293
</ ExternalLink >
@@ -305,6 +309,7 @@ export function Base({ children, headings }: BaseProps) {
305
309
const { url } = sites [ event . target . value as 'v1' | 'v2' ] ;
306
310
307
311
if ( url !== undefined ) {
312
+ trackGoal ( '49HTDWU1' , 0 ) ;
308
313
window . location . assign ( url ) ;
309
314
}
310
315
} }
You can’t perform that action at this time.
0 commit comments