Skip to content

Commit 372ca3e

Browse files
authored
Merge pull request #26 from tlsnotary/matomo-event-tracking
Matomo Event Tracking
2 parents 2597c3a + 6f560f2 commit 372ca3e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

web/components/Steps/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export default function Steps(): ReactElement {
2929
const [screenName, setScreenName] = useState<string>('');
3030
const [exploding, setExploding] = useState<boolean>(false);
3131

32+
useEffect(() => {
33+
if (typeof window !== 'undefined' && window._paq) {
34+
window._paq.push(['trackEvent', 'Demo', 'Step', steps[step]]);
35+
}
36+
}, [step]);
37+
38+
3239
useEffect(() => {
3340
const checkExtension = () => {
3441
//@ts-ignore

0 commit comments

Comments
 (0)