gtag.js user timing doesn't appear in report

时间:2018-02-03 10:42:57

标签: javascript google-analytics google-analytics-api gtag.js

I created a web page, tracked with Google's gtag.js, and I added a timing event using the syntax as per docs:

gtag('event', 'timing complete', {
  'name' : 'staring_blankly_into_space',
  'value' : 3549
});

The event is fired and sent properly.

When I look at my Analytics' reports:

  1. there is no trace of my time-tracking events in the User Timings section,
  2. I can find them in the Events section with:

Event category -> general, Event Action -> timing complete, Event Label -> not set

No trace of the 'name' field to be found.

Any insight on this? (I could try and use the 'event_label' field to set my timing description, but it's not how it's supposed to work.)

1 个答案:

答案 0 :(得分:1)

您的代码应为(带有下划线,请参见documentation):

gtag('event', 'timing_complete', {
  'name' : 'staring_blankly_into_space',
  'value' : 3549
});