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