Is there any possible to track no.
(有没有可能追踪没有。)
of seconds user was on our webpage after they closed browser window or tab?(用户关闭浏览器窗口或标签后进入我们网页的秒数?)
We need to add a cookie after they click close window/tab.
(他们单击关闭窗口/选项卡后,我们需要添加一个cookie。)
From there, we can track how much seconds they are away?(从那里,我们可以追踪到他们有多少秒?)
If user came back or restore window after 10 mins.. we need to redirect user to particular page.(如果用户在10分钟后返回或恢复窗口,则需要将用户重定向到特定页面。)
Tried below code, to track close function.. not some how its not working as expected.
(尝试过下面的代码,以跟踪关闭功能..尚无法正常运行。)
window.onbeforeunload = function (event) { var message = 'Important: Please click on \'Save\' button to leave this page.'; if (typeof event == 'undefined') { event = window.event; } if (event) { event.returnValue = message; $.cookie('cookiesession', true, { path: '/', expires: 80000, secure: window.location.protocol.indexOf('https:') != -1 }); } return message; };
Thanks
(谢谢)
ask by TDG translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…