Send interactions events
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import { page } from '$app/stores'
|
||||
import { getContext } from 'svelte'
|
||||
import reveal from '$animations/reveal'
|
||||
import { sendEvent } from '$utils/analytics'
|
||||
// Components
|
||||
import Icon from '$components/atoms/Icon.svelte'
|
||||
|
||||
@@ -20,6 +21,9 @@
|
||||
*/
|
||||
const toggleSwitcher = () => {
|
||||
isOpen = !isOpen
|
||||
|
||||
// Record opening event
|
||||
!isOpen && sendEvent({ action: 'switcherOpen' })
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { sendEvent } from '$utils/analytics'
|
||||
|
||||
|
||||
/**
|
||||
* Throttle function
|
||||
*/
|
||||
@@ -150,6 +153,9 @@ export const mailtoClipboard = (node: HTMLElement) => {
|
||||
detail: { email: emailAddress }
|
||||
}))
|
||||
|
||||
// Record event in analytics
|
||||
sendEvent({ action: 'emailCopy' })
|
||||
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user