How to Track “Open New Tab” traffic in Google Analytics

随声附和 提交于 2019-12-05 08:16:42

You can track as far as a click using JavaScript. This means a standard click, a middle-click (which many people use to open in new tabs), and a right-click (which could imply using the contextual menu to open the new tab).

While we can't use the middle and right-clicks as solid conversion data (well, you could, but you wouldn't be absolutely correct), we can use these context clues to imply a user intent. Google Analytics custom dimensions really help this situation because we can assign those events as "Intents". Now, when you view your analytics reports, you can associate the intents with probable new tabs.

Here is a jQuery snippet that reflects this:

jQuery('a.some-link').on('mousedown tap touch', function(e){
    eventIntent = ( e.which >= 2 )? 'Intent' : 'Explicit'; //If the mouse button is greater or equal to 2, then set the intent (otherwise, it is an explicit click).
    ga('set', 'dimension3', eventIntent); //Change the dimension index to match yours!
    ga('send', 'event', 'Category', 'Action', 'Label', 'Value'); //Send an event so the dimension is tracked!
});

From there you could use your standard reports, or create a custom report along with custom segments to improve your insights.

For more information, I wrote a post about this subject and other events that you can associate with intents: here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!