Jump to content



Photo

Internal Analytics / Customer Tracking

Answered Go to the full post

  • Please log in to reply
4 replies to this topic

#1 generalt

generalt

    Neowinian

  • Joined: 09-May 07

Posted 20 March 2014 - 18:36

How does one build something like Clicky, which tracks users' movements, where they came from, etc? I want to learn more about my customers and I also want to learn more about web technologies and analytics, so I figured building Clicky-like features on my own would be a good place to start. The problem is, I'm not sure where to start. What sorts of things should I be learning more about (cookies, sessions, etc)?



Best Answer ncc50446 , 20 March 2014 - 22:02

It's a lot of work to build your own. I build my own, and it took a lot of work, and I'm still working on it lol I decided to make my own as something to learn more PHP.

 

You basically need to get their user agent, referer, current page, time/date, and location (I use GeoIP).

Then you need to decide if you're going to use flat files, or a database (I use a database, hate flat files lol).

Then you need to go through thousands of user agents to make a script to find out what browser/os they are using.

 

So if someone visits with a user agent of:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.11 Safari/537.36 OPR/21.0.1432.5 (Edition Developer)

You need your script to find out they are using Windows 7, and Opera 21.0.1432.5

There are thousands of user agents (You can thank bots for that..far too many bots..).

 

Then you need to compare dates, and the page they are on, and their previous page, to calculate how long they spent on the page.

 

Unless you have a bunch of time, it's just easier of using Google Analytics, BBclone, Piwik or Clicky lol No use re-invinting the wheel if you don't have to. Though I did enjoy building my own.

Go to the full post



#2 Kalint

Kalint

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 16-January 07

Posted 20 March 2014 - 19:31

How does one build something like Clicky, which tracks users' movements, where they came from, etc? I want to learn more about my customers and I also want to learn more about web technologies and analytics, so I figured building Clicky-like features on my own would be a good place to start. The problem is, I'm not sure where to start. What sorts of things should I be learning more about (cookies, sessions, etc)?

You can use stuff like Google Analytics for internal use as well.  https://analyticsaca...le.com/explorer



#3 ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 20 March 2014 - 22:02   Best Answer

It's a lot of work to build your own. I build my own, and it took a lot of work, and I'm still working on it lol I decided to make my own as something to learn more PHP.

 

You basically need to get their user agent, referer, current page, time/date, and location (I use GeoIP).

Then you need to decide if you're going to use flat files, or a database (I use a database, hate flat files lol).

Then you need to go through thousands of user agents to make a script to find out what browser/os they are using.

 

So if someone visits with a user agent of:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.11 Safari/537.36 OPR/21.0.1432.5 (Edition Developer)

You need your script to find out they are using Windows 7, and Opera 21.0.1432.5

There are thousands of user agents (You can thank bots for that..far too many bots..).

 

Then you need to compare dates, and the page they are on, and their previous page, to calculate how long they spent on the page.

 

Unless you have a bunch of time, it's just easier of using Google Analytics, BBclone, Piwik or Clicky lol No use re-invinting the wheel if you don't have to. Though I did enjoy building my own.



#4 OP generalt

generalt

    Neowinian

  • Joined: 09-May 07

Posted 21 March 2014 - 10:37

It's a lot of work to build your own. I build my own, and it took a lot of work, and I'm still working on it lol I decided to make my own as something to learn more PHP.

 

You basically need to get their user agent, referer, current page, time/date, and location (I use GeoIP).

Then you need to decide if you're going to use flat files, or a database (I use a database, hate flat files lol).

Then you need to go through thousands of user agents to make a script to find out what browser/os they are using.

 

So if someone visits with a user agent of:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.11 Safari/537.36 OPR/21.0.1432.5 (Edition Developer)

You need your script to find out they are using Windows 7, and Opera 21.0.1432.5

There are thousands of user agents (You can thank bots for that..far too many bots..).

 

Then you need to compare dates, and the page they are on, and their previous page, to calculate how long they spent on the page.

 

Unless you have a bunch of time, it's just easier of using Google Analytics, BBclone, Piwik or Clicky lol No use re-invinting the wheel if you don't have to. Though I did enjoy building my own.

THANK YOU! This was really helpful. I want to learn as much as I can about web applications so I'm excited to get started on building a mini-Clicky for my own site. So I'm bascially tracking user agents -- that's great. I'll get started!



#5 ncc50446

ncc50446

    Engage!

  • Tech Issues Solved: 1
  • Joined: 09-January 04
  • Location: Saskatchewan, Canada
  • OS: Windows 7
  • Phone: Android CM11 4.4.4

Posted 21 March 2014 - 18:16

THANK YOU! This was really helpful. I want to learn as much as I can about web applications so I'm excited to get started on building a mini-Clicky for my own site. So I'm bascially tracking user agents -- that's great. I'll get started!

No problem :)

You're tracking more than user agents, it's just the most time consuming part of the project.

Tracking the pages is fairly easy. You need to get the users current page. However, I recommend not tracking the pages of bots, or your database/flat file will grow too quickly too fast.

With tracking the users page, you can determine which pages are first visited by the user, and which page is the users exit page, and how many pages the average user visits.

With the referrer, you need to find lots of search engines too. Just like with the user agents, find the search engines, and determining the search terms can be time consuming, but useful (Except with Google and DuckDuckGo due to secure search).

 

Enjoy your project :)