Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道是否可以将 Google Analytics 事件跟踪添加到 HTML 选择框中,以便为选择框中的每个选项获取唯一跟踪
<select onchange="_gaq.push(['_trackEvent', 'Category','Action', this.value]);"> ^
忘记了右括号]...原始代码导致语法错误
]
<select onchange="_gaq.push(['_trackEvent', 'Category','Action', this.value);">
将使用选择选项的值作为值来跟踪事件。