【发布时间】:2021-07-09 07:34:47
【问题描述】:
我有一个欧洲客户(意大利、挪威、英国、荷兰)使用的网站。当用户访问该站点时,会显示一个 cookie 同意弹出窗口。我想跟踪有多少用户接受了 cookie 和拒绝的用户数量。
点击接受按钮后,我可以向 Google Analytics 发送事件吗?例如
gtag('event', 'select_content', {
content_type: 'button',
item_id: 'cookieacceptbutton',
country_code :'UK'
});
点击拒绝按钮
gtag('event', 'select_content', {
content_type: 'button',
item_id: 'cookierejectbutton',
country_code :'UK'
});
或者有没有更好的方法来实现这一点?
【问题讨论】:
标签: google-analytics-4 gtag.js cookieconsent