你好,我有我的网页:https://arab-exchanges.org/conference/我正在尝试跟踪按钮"下载Agenda"。所有按钮我已经跟踪过了。如何跟踪此按钮?谢谢你
可以使用以下代码:
<script>
var getOutboundLink = function(url) {
gtag('event', 'click', {
'event_category': 'download agenda',
'event_label': 'https://arab-exchanges.org/wp-content/uploads/2021/02/AFE-SAUDI-2021-Agenda-1.pdf'
});
}
</script>
<a href="https://arab-exchanges.org/wp-content/uploads/2021/02/AFE-SAUDI-2021-Agenda-1.pdf" onclick="getOutboundLink('https://arab-exchanges.org/wp-content/uploads/2021/02/AFE-SAUDI-2021-Agenda-1.pdf'); return false;" target="_blank" class="elementor-button-link elementor-button elementor-size-sm" role="button"><span class="elementor-button-content-wrapper"><span class="elementor-button-text">Download Agenda</span></span></a>
https://support.google.com/analytics/answer/7478520?hl=en