简体   繁体   English

Google Analytics(分析)点击事件跟踪

[英]Google analytics click event tracking

I am trying to set up click tracking on a link on an acquisition page. 我正在尝试在获取页面上的链接上设置点击跟踪。 I have added the following code just below my google analytics JS snippet: 我在Google Analytics(分析)JS代码段的下面添加了以下代码:

 jQuery(".submit-button").click(function(){

  ga('send', {
  hitType: 'event',
  eventCategory: 'register',
  eventAction: 'click',
  eventLabel: 'registrations'
});
 });

First question is do I need to add a value to the object above or will the default value be 1? 第一个问题是我需要在上面的对象中添加一个值,还是默认值为1?

Secondly to see the click reporting in google anayltics I have set up a Goal in the admin panel that has the following settings: 其次,要查看Google anayltics中的点击报告,我在管理面板中设置了一个目标,该目标具有以下设置:

Goal setup: custom 目标设置:自定义

Goal Description: Event 目标描述:事件

Goal Details: Category - Equals to - register, Action - Equals to - click, Label - Equals to - registrations, Value - Equals to - (this field is set to blank) 目标详细信息:类别-等于-注册,操作-等于-单击,标签-等于-注册,值-等于- (此字段设置为空白)

Second question: is this the correct way to intercept my click event in the GA interface? 第二个问题:这是在GA界面中拦截点击事件的正确方法吗?

Sorry if this is an obvious question but online documentation isn't 100% clear with click events 很抱歉,如果这是一个明显的问题,但单击事件并未完全清除在线文档

Yes, the code is correct (provided the ga code has been loaded before and a tracker with the default name has been created). 是的,该代码是正确的(前提是之前已加载ga代码并且已创建具有默认名称的跟踪器)。 Goal setup looks okay, too. 目标设置也可以。

No, value will not default to one, it will default to zero - which is probably want you want anyway, because the event value is a metric (number) that is used to monetize goals that are not transactions. 不,值将不会默认为1,而是将默认为零-无论如何,这可能是您想要的,因为事件值是用于将非交易目标货币化的指标(数字)。 If you set a value it would for example be used in the Adwords reports when calculating the ROAS (return on advertising spend). 如果您设置了一个值,则在计算广告支出回报率(广告支出回报)时,该值将例如在“ Adwords”报告中使用。 Typically you would put a number there that reflects how much value you assign to a goal conversion, and that value will mpst of the time not be "1" (unless 1 Dollar/Euro/etc is your expected revenue from a goal conversion). 通常,您会在此放置一个数字,该数字反映您为目标转化分配的价值,并且该时间的mpst值不会为“ 1”(除非1美元/欧元/等是您从目标转化中获得的预期收入)。 If you do not assign a monetary value to the goal conversion just skip it, it's optional (so your setup is fine). 如果您没有为目标转化分配货币值,则只需跳过它即可,它是可选的(因此您可以进行设置)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM