I have setup outbound event tracking for Google analytics as per instructed by Google:
var trackOutboundLink = function(url) {
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){document.location = url;}
});
}
I am trying to determine if it is working properly eg if the event is being tracked.
When I view the click in my developer tools, it says the 'collect' request sent to google analytics was cancelled.
However, if I set the link to open in a new tab, the 'collect' request does not get cancelled.
I am wondering if it matters that collect was cancelled, eg even though my network tools are saying it was cancelled, was it really sent to google and my browser thinks it was cancelled because it did not register a response - which in this case we do not need we are redirecting away from the page anyway?
I know it is accessing 'hitcallback' as the code inside executes - so I assume this means the call back has happend as intended?
The reason I ask is because for iphone, I cant get the link to open in a new window, and I will to wait 1+ days to see if the iphone event is tracked