Sign in to follow this  
Followers 0
generalt

Internal Analytics / Customer Tracking

5 posts in this topic

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)?

Share this post


Link to post
Share on other sites

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://analyticsacademy.withgoogle.com/explorer

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.