Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 2 votes

[Contribution] Leapfrog - Dynamic Visitor Tracking


181 replies to this topic

#81 analli

  • Community Member
  • 76 posts
  • Real Name:Anthony Nalli

Posted 26 February 2007, 14:45

It's strange. I still get the LDF004 error when I first start Leapfrog and then go on to my store's main page. Then a few clicks in (usually when I finally reach a product page) Leapfrog displays properly.

A

#82 abra123cadabra

  • Community Member
  • 853 posts
  • Real Name:Ulrike
  • Location:Dublin

Posted 26 February 2007, 14:54

I didn't dig into the code to see how exactly it is determined that the click belongs to a certain visitor. There is a number before the page title (obviously that's the number of pages loaded for this visitor) but the click number is lower. When does the click number increase? Same goes for the time left of the clicks number.

A feature I would like to see is an addition to "Guest". If they were logged in before but are logged out, show the customer name in brackets like this: Guest (Customer Name).

Another feature you already mentioned is some stats like: visitor has added something to cart (yes/no) and maybe the cart value.

How about adding the landing url in addition to the referal url. Hits from my ads carry some variables in the url that allow me to see which ad they clicked on. It would be nice to see like this if the visitor was referred by organic or paid search results.

I know, most of these features are part of the supertracker contribution which I'm using but I really like the dynamic element about leapfrog.

abra
The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

Feedback and suggestions on my shop welcome.


Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

#83 Tomcat

  • Community Member
  • 192 posts
  • Real Name:-
  • Gender:Male
  • Location:Tuscany - Italy

Posted 26 February 2007, 14:58

View PostSandbag, on Feb 26 2007, 02:58 PM, said:

I understand your points about language id and manufacturer now. I will try and put these ideas into the next release. So far we have:
  • Display page language
  • Display manufacturer
  • Auto delete tracking data after a set period of time
Any more?

possibility of interacting with the guest ? I mean by java chat or something ?
Sometimes I see scammers I don't want to be on the website and I feel like saying:<<..don't even think of using your flipping cards on my website, you're just waisting your (and my) time..>> :lol:
Outside links in signatures are not allowed!

#84 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 26 February 2007, 15:14

View PostTomcat, on Feb 26 2007, 02:58 PM, said:

possibility of interacting with the guest ? I mean by java chat or something ?
Sometimes I see scammers I don't want to be on the website and I feel like saying:<<..don't even think of using your flipping cards on my website, you're just waisting your (and my) time..>> :lol:

:lol: This is possible but would require quite a bit of work. Maybe not the next release but sometime in the future.

abra - all good suggestions. The click count at the bottom of each visitor box should display the total number of clicks they have made. This is based on sesssion id. Unfortunately, when they switch between SSL and a standard page, the session id changes. This means that the click count resets. This is a bug and needs fixing.

The time to the right of the page title updates when the user clicks off that page. It shows how long they spent looking at that page.

Edited by Sandbag, 26 February 2007, 15:17.


#85 danielSilly

  • Community Member
  • 2 posts
  • Real Name:DanSill

Posted 27 February 2007, 04:09

- Noticed that if you use any html: <br>,<p>, etc. in your pageHeading on any page that a vistor would visit, it will trip leapfrog and you would then see the "Unable to connect to the database" LDF004 error. :-"

The above post: "L" to lower case"l" works both ways.

I like the idea also of Cart-Session (Yes/No) and cart total - from abra above,
How about bot UserAgent inplace of [BOT].? googlebot,yahoobot,. or mabe the line where referer is. I like botz.
SEO in a flash.. you made it fun. thanks again, can't wait for the next Ver.!

: D

#86 chee

  • Community Member
  • 35 posts
  • Real Name:chee

Posted 27 February 2007, 05:27

View PostSandbag, on Feb 26 2007, 01:58 PM, said:

I understand your points about language id and manufacturer now. I will try and put these ideas into the next release. So far we have:
  • Display page language
  • Display manufacturer
  • Auto delete tracking data after a set period of time
Any more?

1) Remove the "setting" option on the page itself and put on somewhere else so that the page can show to the public just like a "live show"! The whole concept of this flash is to able for any shop owner to showcase its real-time customer to the public (assume you have good hits or otherwise your customer will run away!)

2) Option to set own css or color of the page intead of plain white

#87 Tomcat

  • Community Member
  • 192 posts
  • Real Name:-
  • Gender:Male
  • Location:Tuscany - Italy

Posted 27 February 2007, 08:25

What about making the IP clickable with link to dnsstuff whois ?

You know ? I have a problem with sessions: Even though I downloaded and installed the latest spiders.txt I have many robots getting the session_id. I have this on my catalog/functions/leapfrog.php
if ($wo_session_id != 0 ) {
			$insert_query = "insert into leapfrog" .
											" (customer_id, customer_name, session_id, ip_address, click_time, page_url, page_title, referer_url, thumb_url)" .
											' values ("' . $wo_customer_id . '", "' . $wo_full_name . '", "' . $wo_session_id . '", "' . $wo_ip_address .
											'", "' . $current_time . '", "' . $wo_last_page_url . '", "' . $page_desc . '", "' . $referer_url . '", "' . $page_thumb . '")';
      tep_db_query($insert_query);
		}

and this on my application_top.php:

// start the session

  $session_started = false;

  if (SESSION_FORCE_COOKIE_USE == 'True') {

    tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);



    if (isset($HTTP_COOKIE_VARS['cookie_test'])) {

      tep_session_start();


   // user_tracking modifications
   if (!$referer_url) {
    $referer_url = $HTTP_SERVER_VARS['HTTP_REFERER'];
        if ($referer_url) {
            tep_session_register('referer_url');
        }
    }

      $session_started = true;

    }

  } elseif (SESSION_BLOCK_SPIDERS == 'True') {

    $user_agent = strtolower(getenv('HTTP_USER_AGENT'));

    $spider_flag = false;



    if (tep_not_null($user_agent)) {

      $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');



      for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {

        if (tep_not_null($spiders[$i])) {

          if (is_integer(strpos($user_agent, trim($spiders[$i])))) {

            $spider_flag = true;

            break;

          }

        }

      }

    }



    if ($spider_flag == false) {

      tep_session_start();

      $session_started = true;

    }

  } else {

    tep_session_start();

    $session_started = true;

  }

what can it be ?
Outside links in signatures are not allowed!

#88 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 27 February 2007, 08:48

Unfortunately, spiders getting sessions is to do with osCommerce rather than Leapfrog. Not sure how to rectify this.

#89 abra123cadabra

  • Community Member
  • 853 posts
  • Real Name:Ulrike
  • Location:Dublin

Posted 27 February 2007, 10:54

Thanks for clarifying the page count. I guessed that already. As soon as the visitor logs in, the session changes but he keeps that session if he logs out again. Ah well, don't mind.

As my shop is not too busy right now and I'm a very curious observer, I added just a few more info to the page title. This is to get info if the visitor is clicking through a product listing as generated on a lot of pages (index.php for products in a category or for a manufacturer, advanced search results, what's new listing etc.). I also wanted to see which keywords they used when using the search function. I'm using other contribs too like allproducts listing (allprods.php).

Here is the code that I added to /catalog/includes/functions/leapfrog.php. Just find the first lines of the snippet and add the if statements following. If you have other pages in your shop where variables are passed via the URL, you can easily extend the mod to show even more info.

		} else {
			// Just use the page title
			$page_desc = tep_db_input(HEADING_TITLE);
			$page_thumb = "";
			}
			// The following modifications allow for more tracking info to be displayed
			// Add keywords if advanced search is used
			if(isset($HTTP_GET_VARS['keywords']) && $HTTP_GET_VARS['keywords'] != ''){
			$page_desc = $page_desc . ' (' . stripslashes($HTTP_GET_VARS['keywords']) . ')';
			}
			// Add character selected if allproducts contrib is used
			if(isset($HTTP_GET_VARS['fl']) && $HTTP_GET_VARS['fl'] != ''){
			$page_desc = $page_desc . ' (' . stripslashes($HTTP_GET_VARS['fl']) . ')';
			}
			// Add page number viewed when clicking through a listing
			if(isset($HTTP_GET_VARS['page']) && $HTTP_GET_VARS['page'] != ''){
			$page_desc = $page_desc . ' (page ' . stripslashes($HTTP_GET_VARS['page']) . ')';
			}

Come to think about this, there is no need to add the landing page in the leapfrog any more as my ads pass a variable in the URL too. I'll just add this in for my own entertainment.

abra
The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

Feedback and suggestions on my shop welcome.


Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

#90 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 27 February 2007, 11:00

Some great suggestions there abra. Never knew that was how to find the search keywords.

The problem I am finding at the moment is the lack of screen space. In an ideal world I would show as much information as possible for each visitor, but when I do this the boxes get bigger and things start to look ugly. (I try and design things with lower screen resolutions in mind).

One option is to have another box that appears to the left of right of the ladder, when you click on a visitor. This would show more detailed info about that person. I will be looking into how well this method works.

#91 abra123cadabra

  • Community Member
  • 853 posts
  • Real Name:Ulrike
  • Location:Dublin

Posted 27 February 2007, 11:30

Well, I thought that too. Some things are much easier to do than one might think!

These modifications usually add just a little text to the right of page title where the title is pretty short anyway. So no space problem there. Only with the search keywords, that can get out of hand. People are typing in funny things...

I like the idea of having more info on a visitor opening in a separate box.

abra
The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

Feedback and suggestions on my shop welcome.


Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

#92 azer

  • Community Member
  • 842 posts
  • Real Name:azer
  • Location:Paris, france

Posted 01 March 2007, 01:43

Quote

Here is the code that I added to /catalog/includes/functions/leapfrog.php. Just find the first lines of the snippet and add the if statements following.

could you give more detail where to put this code ?

Suggestions : if we want the GUEST to be shown , at least it would be usefull to have GUEST 1 , GUEST 2 etc ...
MS2

#93 abra123cadabra

  • Community Member
  • 853 posts
  • Real Name:Ulrike
  • Location:Dublin

Posted 01 March 2007, 17:29

In catalog/includes/functions/leapfrog.php, replace lines 96 to 102 with the code above to show page number etc.

abra
The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

Feedback and suggestions on my shop welcome.


Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

#94 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 11 March 2007, 13:15

Leapfrog V1.3 has been released!

It includes the following new features:

* IP lookup added
* Visitor real name displayed after they have logged out
* Added auto-purge feature that automatically clears Leapfrog tracking data from the database after a set period of time
* Bot/spider name displayed
* Guests given unique number to help identify them

Hope you like it :).

PS. If you are upgrading from a previous version, you MUST still run the SQL commands on your database.

#95 Tomcat

  • Community Member
  • 192 posts
  • Real Name:-
  • Gender:Male
  • Location:Tuscany - Italy

Posted 11 March 2007, 17:05

View PostSandbag, on Mar 11 2007, 02:15 PM, said:

Leapfrog V1.3 has been released!

It includes the following new features:

* IP lookup added
* Visitor real name displayed after they have logged out
* Added auto-purge feature that automatically clears Leapfrog tracking data from the database after a set period of time
* Bot/spider name displayed
* Guests given unique number to help identify them

Hope you like it :).

PS. If you are upgrading from a previous version, you MUST still run the SQL commands on your database.

Hi Ed,

Just installe version 1.3

All fine except for the fact that I have google and inktomi recorded by leapfrog even though I've excluded robots in settings (IP 74.6.74.205 for ink and 66.249.65.46 for google )

any ideas why ?

Thanks
Franco
Outside links in signatures are not allowed!

#96 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 11 March 2007, 17:18

View PostTomcat, on Mar 11 2007, 05:05 PM, said:

All fine except for the fact that I have google and inktomi recorded by leapfrog even though I've excluded robots in settings (IP 74.6.74.205 for ink and 66.249.65.46 for google )

any ideas why ?

Spider recognition is based on the code already found in MS2. The HTTP_USER_AGENT variable is checked against entries in the catalog/includs/spiders.txt file. If there is a match, then OSC knows it's a spider.

It is possible that google and inktomi have changed their HTTP_USER_AGENT ids, and are no longer picked up.

Can you look in your logs and see what the HTTP_USER_AGENT variable is for these two bots? They usually look something like:

Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)

Then add the name to spiders.txt. So in the above example you would add the line 'Yahoo! Slurp'.

Let me know if that works.

#97 mijman2

  • Community Member
  • 229 posts
  • Real Name:Steve

Posted 12 March 2007, 02:30

I like leapfrog, but the new version has made it stopped working on my website. I have gone over all the instructions three times! >_<

It looks like nothing is being recorded in the database - and I have checked and reconfirmed the part in footer.php...

Site: www.ipodxtras.com

Any suggestions?

#98 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 12 March 2007, 09:13

View Postmijman2, on Mar 12 2007, 02:30 AM, said:

I like leapfrog, but the new version has made it stopped working on my website. I have gone over all the instructions three times! >_<

It looks like nothing is being recorded in the database - and I have checked and reconfirmed the part in footer.php...

Site: www.ipodxtras.com

Any suggestions?

If anyone is having problems with data not being recorded in the database then here's a quick hack. BEAR IN MIND that changing this will mean that the 'Exclude Robots and Spiders' button in the settings window will not work. All visits will be tracked. But at least you will have a working Leapfrog.

Open catalog/includes/functions/leapfrog.php and find the following line (143):

if ( (LEAPFROG_EXCLUDE_ROBOTS == 'true' && $spider_flag != true) || LEAPFROG_EXCLUDE_ROBOTS == 'false') {

Change this to:

if (true) {


#99 Tomcat

  • Community Member
  • 192 posts
  • Real Name:-
  • Gender:Male
  • Location:Tuscany - Italy

Posted 12 March 2007, 09:51

View PostSandbag, on Mar 11 2007, 06:18 PM, said:

Spider recognition is based on the code already found in MS2. The HTTP_USER_AGENT variable is checked against entries in the catalog/includs/spiders.txt file. If there is a match, then OSC knows it's a spider.

It is possible that google and inktomi have changed their HTTP_USER_AGENT ids, and are no longer picked up.

Can you look in your logs and see what the HTTP_USER_AGENT variable is for these two bots? They usually look something like:

Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)

Then add the name to spiders.txt. So in the above example you would add the line 'Yahoo! Slurp'.

Let me know if that works.

Hi,

well, for some reasons I can't access my logs right now, so I can't really check the user agent. I had a look at my spider.txt and found that either googlebot and slurp where already there. Do you think the names must be written the same way ? I mean capital letter like "Googlebot" or is googlebot the same thing ?

Since spiders were recorded despite I excluded them from settings I had to change functions/leapfrog.php to only write into DB the hits with a session ID assigned. The exclusion via settings wasn't working for me...

Thanks
Outside links in signatures are not allowed!

#100 Tomcat

  • Community Member
  • 192 posts
  • Real Name:-
  • Gender:Male
  • Location:Tuscany - Italy

Posted 12 March 2007, 09:52

I also noticed that leapfrog disconnects from DB quite often, saying that "...can't connect to DB". does anybody has the same problem ?

Edited by Tomcat, 12 March 2007, 09:56.

Outside links in signatures are not allowed!