Add click tracking on YouTube banner

This commit is contained in:
Kamran Ahmed
2021-09-14 20:34:24 +02:00
parent 69ef7615fe
commit 9a63e576c7
3 changed files with 13 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ export function firePageView(url: string) {
}
// https://developers.google.com/analytics/devguides/collection/gtagjs/events
export function event(props: { action: string; category: string; label: string; value: string; }) {
export function event(props: { action: string; category: string; label?: string; value?: string; }) {
const { action, category, label, value } = props;
if (!window.gtag) {
console.warn('Missing GTAG Analytics disabled');