dongyu7074 2013-04-16 03:04
浏览 26
已采纳

跟踪访问的最后一页[关闭]

I am trying to track visitors, who visits my website. I am using codeigniter for the development of the site. What i am interested in is to track the last visited page before they close the webpage. Is there anyways to do it?

What I have been thinking is to save their last visited page in session and then when they close save information in the database. What happens when user closes a browser or the website(tab in the browser) or when they click on the link (in the webpage) and is redirected to another website? does it send close connection request to the server?

What is the best way to keep track of it?

Also would like to mention the visitors are public and they cant login to the website. And also i am using google analytics but what to create a custom one for my website to get more accurate results.

  • 写回答

2条回答 默认 最新

  • douzhuo3233 2013-04-16 03:09
    关注

    Save/update a database entry on the current page they are loading. That way it doesn't even matter if their computer crashes it will still record the last page they were on. You could even restore them to the last place they were this way if they came back to the website later (if you needed this functionality).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 对于这个问题的代码运行
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败