Google Universal Analytics开放地图应用事件跟踪

时间:2021-07-25 00:26:22

We've currently set up an event that tracks when a user clicks on an "Open in Mapps App" button, but it's not firing in Analytics after 24 hours or so. Here's what the code looks like. Any suggestions on where we're going wrong?

我们目前正在设置一个事件,用于跟踪用户点击“在Mapps应用程序中打开”按钮的时间,但是在24小时左右后才会在Google Analytics中触发。这是代码的样子。关于我们哪里出错的任何建议?

<a class="button map-app aligncenter" title="View in Maps App" href="https://google.com/maps/yp6z2" onclick="ga('send', 'event ', 'Open Maps App', 'On Click');" target="_blank" style="    margin-top: 0px !important;
margin-bottom: 0px !important;">Open in Maps App</a>

1 个解决方案

#1


0  

I c/p'ed your code into my site and ran it and saw this:

我将您的代码添加到我的网站并运行它,看到了这个:

Google Universal Analytics开放地图应用事件跟踪

which shows that you have an extra space after "event" in

这表明你在“事件”之后有一个额外的空间

ga('send', 'event ', 'Open Maps App', 'On Click');

Remove the space and you should see the event hit go through.

删除空间,您应该看到事件命中通过。

#1


0  

I c/p'ed your code into my site and ran it and saw this:

我将您的代码添加到我的网站并运行它,看到了这个:

Google Universal Analytics开放地图应用事件跟踪

which shows that you have an extra space after "event" in

这表明你在“事件”之后有一个额外的空间

ga('send', 'event ', 'Open Maps App', 'On Click');

Remove the space and you should see the event hit go through.

删除空间,您应该看到事件命中通过。