Object Google Universal Analytics事件跟踪的正确语法

Object Google Universal Analytics事件跟踪的正确语法,object,events,analytics,tracking,universal,Object,Events,Analytics,Tracking,Universal,从Google的事件跟踪功能中,您可以发送一个带有额外事件选项的对象,如下所示: ga('send', 'event', 'category', 'action', {'nonInteraction': 1}); ga('send', 'event', 'category', 'action', {'page': '/my-new-page'}); ga('send', { 'hitType': 'event', // Required. 'eventCategory

从Google的事件跟踪功能中,您可以发送一个带有额外事件选项的对象,如下所示:

ga('send', 'event', 'category', 'action', {'nonInteraction': 1});
ga('send', 'event', 'category', 'action', {'page': '/my-new-page'});
ga('send', {
  'hitType': 'event',          // Required.
  'eventCategory': 'button',   // Required.
  'eventAction': 'click',      // Required.
  'eventLabel': 'nav buttons',
  'eventValue': 4
});
ga('send', 'event', {
  'eventCategory': 'Category',
  'eventAction': 'Action',
  'eventValue': 55
}, {'nonInteraction': 1});
然后他们说你可以将一个field对象传递给“ga”函数,如下所示:

ga('send', 'event', 'category', 'action', {'nonInteraction': 1});
ga('send', 'event', 'category', 'action', {'page': '/my-new-page'});
ga('send', {
  'hitType': 'event',          // Required.
  'eventCategory': 'button',   // Required.
  'eventAction': 'click',      // Required.
  'eventLabel': 'nav buttons',
  'eventValue': 4
});
ga('send', 'event', {
  'eventCategory': 'Category',
  'eventAction': 'Action',
  'eventValue': 55
}, {'nonInteraction': 1});

但是,如何向第二种语法添加额外的选项呢?例如,如何添加{'nonInteraction':1}


我可以这样添加它吗:

ga('send', 'event', 'category', 'action', {'nonInteraction': 1});
ga('send', 'event', 'category', 'action', {'page': '/my-new-page'});
ga('send', {
  'hitType': 'event',          // Required.
  'eventCategory': 'button',   // Required.
  'eventAction': 'click',      // Required.
  'eventLabel': 'nav buttons',
  'eventValue': 4
});
ga('send', 'event', {
  'eventCategory': 'Category',
  'eventAction': 'Action',
  'eventValue': 55
}, {'nonInteraction': 1});
还是像这样

ga('send', {
  'hitType': 'event',          
  'eventCategory': 'button',  
  'eventAction': 'click',      
  'eventLabel': 'nav buttons',
  'eventValue': 4,
  'nonInteraction': 1
});

这可能是后者,但您也可以通过签入实时报告或复制代码并将其粘贴到控制台中,查看点击是否显示在“开发人员工具”网络选项卡中来尝试和验证。

这可能是后者,但您也可以通过签入实时报告或复制代码并将其粘贴到控制台中,并查看点击是否显示在“开发人员工具”网络选项卡中来进行尝试和验证。

应该是后者,但您也可以通过签入实时报告或复制代码并将其粘贴到控制台中,并查看点击是否显示在“开发人员工具”网络选项卡中来进行尝试和验证。

应该是后者,但您也可以通过签入实时报告或复制代码并将其粘贴到控制台中,查看点击是否显示在“开发人员工具”网络选项卡中来进行尝试和验证。

他们没有很好地解释这一点,正确的方法是:

ga('send', {
  'hitType': 'event',          
  'eventCategory': 'button',  
  'eventAction': 'click',      
  'eventLabel': 'nav buttons',
  'eventValue': 4,
  'nonInteraction': 1
});

他们没有很好地解释,正确的方法是:

ga('send', {
  'hitType': 'event',          
  'eventCategory': 'button',  
  'eventAction': 'click',      
  'eventLabel': 'nav buttons',
  'eventValue': 4,
  'nonInteraction': 1
});

他们没有很好地解释,正确的方法是:

ga('send', {
  'hitType': 'event',          
  'eventCategory': 'button',  
  'eventAction': 'click',      
  'eventLabel': 'nav buttons',
  'eventValue': 4,
  'nonInteraction': 1
});

他们没有很好地解释,正确的方法是:

ga('send', {
  'hitType': 'event',          
  'eventCategory': 'button',  
  'eventAction': 'click',      
  'eventLabel': 'nav buttons',
  'eventValue': 4,
  'nonInteraction': 1
});

只是好奇,但是你在那里用的是什么编程语言?@JuanRocamonde:JavaScriptJust好奇,但是你在那里用的是什么编程语言?@JuanRocamonde:JavaScriptJust好奇,但是你在那里用的是什么编程语言?@JuanRocamonde:JavaScriptJust好奇,但是你在那里用的是什么编程语言?@JuanRocamonde:JavaScript