doujue9767 2016-12-14 13:01
浏览 60
已采纳

与“EVENT CATEGORY / EVENT ACTION / EVENT LABEL”组合的总事件相同的独特事件

I am implementing offline call tracking using PHP library of Google Analytics measurement protocol.

I am sending a call as an event with the following configuration:

EVENT CATEGORY:'CallTracking'
EVENT ACTION: 'Call'
EVENT LABEL: 'Caller: %CallerPhone%; Tracking: %TrackingPhoneNumber%; Destination: %DestinationPhone%'

All events are showing up in the stats but my problem is that when I send the same EVENT CATEGORY + EVENT ACTION + EVENT LABEL the number of unique event equals the number of total events, so no grouping is happening. E.g.: I am sending 3 event with the same EVENT CATEGORY + EVENT ACTION + EVENT LABEL combination, in the stats I have 3 total and 3 unique events. I expected to be 3 total and 1 unique.

Ultimately, what I am trying to achieve is that the unique events would be grouped by the CALLER PHONE. Also, I am wondering if the same caller calls twice, does the time interval count in grouping these events?

This is my tracking code:

// Initialize GA Tracker
$tracker = new GoogleAnalytics\Tracker(%ANALYTICS_ID%, %ANALYTICS_HOST%);

// Assemble Visitor information
$visitor = new GoogleAnalytics\Visitor();
$visitor->setIpAddress(%CALLER_IP%);

// Assemble Session information
$session = new GoogleAnalytics\Session();

// Assemble Campaign information
$campaign = new GoogleAnalytics\Campaign();
// ...adding here all the utm stuff and what needed for campaigns

// add campaign information to tracker
$tracker->setCampaign($campaign);

// GA Event Tracking
// This is how eventLabel must look: 'Caller:01234567890; Tracking:01234554321; Destination:01234567899'
$eventLabel    = 'Caller: %CallerPhone%; Tracking: %TrackingPhoneNumber%; Destination: %DestinationPhone%';
$eventAction   = 'Call';
$eventCategory = 'CallTracking';
$event = new GoogleAnalytics\Event($eventCategory, $eventAction, $eventLabel, $value);

// Track the event
$tracker->trackEvent($event, $session, $visitor);

Thank you!

--Steve

  • 写回答

1条回答 默认 最新

  • duanchifo2866 2016-12-14 13:42
    关注

    "Unique Events" means "unique events per Session" (so if a visitor triggers an event twice during a session you will have two events and one unique event).

    Your code (presumably) starts a new session for every call, which means you only have one event per session. That in turn means the number of events is identical to the number of unique sessions.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题