javascript - How to know when Google Analytics has saved data -
i have page i'm working on redirect page browser data before sending them off external site. it's white html page google analytics code , redirects kickstarter. problem don't know when can redirect them. want know when data sent servers can redirect them. can see how callback data custom tracking, want browser data.
i see code here: https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#hitcallback
but seems custom page view sends. there anyway general onload
event google analytics?
update: people finding question hard understand. i'll try make simpler although figured simple make it.
i'm doing nothing custom google analytics. want know when, on page has google analytics tracking code (the stuff copy , paste) has loaded , sent data google. so, in theory, ga.onload(function () { ... })
. hope helps?
oscar,
what's difficult picture in question navigation flow , pinpoint issue:
a page redirects page browser data before sending them off external site.
google recommends placing tracking code on redirecting page on landing page. way, redirecting page capture actual referrer information reports.
fundamentally, whenever user hits page tracking script request google sent notifying visit. however, browsers may redirect before javascript call code can made.
possible solutions:
- implement own counter inside redirect script, separated ga
- implement event before redirect happens
- implement event on redirect page usebeacon parameter
references:
Comments
Post a Comment