Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 2 votes

[Contribution] Leapfrog - Dynamic Visitor Tracking


181 replies to this topic

#41 MarthaD

  • Community Member
  • 93 posts
  • Real Name:Martha Dinkwaller
  • Location:Onratio, Canada

Posted 17 February 2007, 23:02

View PostSandbag, on Feb 17 2007, 04:33 PM, said:

Can you try this please. Open your browser and navigate to:

http://www.yourdomain.com/catalog/admin/leapfrog_feed.php?action=newclicks&lastclick=1

When that page appears, view the HTML source. There you will see the XML data Leapfrog uses to animate visitors.

Look for a <thumburl>, and <pageurl> tag and let me know what data string it contains. Some will be blank, but product info pages should contain the location of the image. If that url does not match the actual location of the image then please post that aswell.


A semi colon character was expected. Error processing resource 'http://www.mysite.net/admin/leapfrog_feed.php?act...

Says source is not available for viewing...

Edited by MarthaD, 17 February 2007, 23:03.


#42 cbx040

  • Community Member
  • 27 posts
  • Real Name:Simon
  • Location:Northamptonshire, UK

Posted 18 February 2007, 08:54

View PostMarthaD, on Feb 17 2007, 11:02 PM, said:

A semi colon character was expected. Error processing resource 'http://www.mysite.net/admin/leapfrog_feed.php?act...

Says source is not available for viewing...

Hi,

I had this problem, but I was able to view the source alright in firefox.

Regards,

Simon

#43 cbx040

  • Community Member
  • 27 posts
  • Real Name:Simon
  • Location:Northamptonshire, UK

Posted 18 February 2007, 09:11

View Postcbx040, on Feb 18 2007, 08:54 AM, said:

Hi,

I had this problem, but I was able to view the source alright in firefox.

Regards,

Simon


I added some tabs and newlines so I could view the xml better

in /admin/includes/functions/leapfrog.php

I rewrote my function lf_getClicks as

/**
	*  Get all visitor clicks past the fromTime
	*/
	function lf_getClicks($fromTime) {
		
		$query = "select customer_id, customer_name, session_id, ip_address, click_time, page_url, page_title, referer_url from leapfrog where click_time > " . $fromTime;
		
		$data_str = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<clicks>\n";
		
		$clicks = array();
		$result = tep_db_query($query);
		while ($row = tep_db_fetch_array($result)) {
			
			$data_str .= "\t<click>\n";
			$data_str .= "\t\t<pageurl>" . $row['page_url'] . "</pageurl>\n";
			$data_str .= "\t\t<pagetitle>" . $row['page_title'] . "</pagetitle>\n";
			$data_str .= "\t\t<visitorid>" . $row['customer_id'] . "</visitorid>\n";
			$data_str .= "\t\t<visitorname>" . $row['customer_name'] . "</visitorname>\n";
			$data_str .= "\t\t<clicktime>" . $row['click_time'] . "</clicktime>\n";
			$data_str .= "\t\t<visitorip>" . $row['ip_address'] . "</visitorip>\n";
			$data_str .= "\t\t<sessionid>" . $row['session_id'] . "</sessionid>\n";
			$data_str .= "\t\t<refererurl>" . $row['referer_url'] . "</refererurl>\n";
			
			// Get the product image if on product item page    
            $pattern = "/p-[0-9]+/";
            preg_match($pattern, $row['page_url'], $matches);
            $productPage = $matches[0];
        
            $productId = substr($productPage, strpos($productPage, "p-")+2);
            $productId = str_replace (".html", '', $productId);
            
            if ($productId == "") {
                $thumbUrl = "";
            
                } else {
                $itemQuery = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id='" . $productId . "'");
                $item = tep_db_fetch_array($itemQuery);                
                $thumbUrl = DIR_WS_CATALOG . DIR_WS_IMAGES . "" . $item['products_image'];
            }

			
			$data_str .= "\t\t<thumburl>" . $thumbUrl . "</thumburl>\n";
			
			$data_str .= "\t</click>\n";
		}
		
		$data_str .= '</clicks>';
		echo $data_str;
	}
	

I hope this helps.

Simon

#44 MarthaD

  • Community Member
  • 93 posts
  • Real Name:Martha Dinkwaller
  • Location:Onratio, Canada

Posted 18 February 2007, 15:09

Okay - i got it working finally with abra's code - i must have missed something late last night but BIG thanx to all who assisted!

However, I seem to have a new issue which I think is from the CSS/dhtml menus i am using.... If i click the product name from the dynamic menu, it now shows up twice in the leapfrog page, but only the second instance shows an image....

If i click a link from say a category listing, it works fine with only one instance being recorded...

#45 azer

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

Posted 19 February 2007, 09:47

as i wrote in pm to the authors

- is there any wy to embed or rewrite the html file so that the report run in a normal admin page , not a popup html file ?
- is it possible to have the title of the page defined in language file , english is not the unique language on oscommerce shop :-)

:blush:
MS2

#46 cbx040

  • Community Member
  • 27 posts
  • Real Name:Simon
  • Location:Northamptonshire, UK

Posted 19 February 2007, 22:42

View Postazer, on Feb 19 2007, 09:47 AM, said:

as i wrote in pm to the authors

- is there any wy to embed or rewrite the html file so that the report run in a normal admin page , not a popup html file ?
- is it possible to have the title of the page defined in language file , english is not the unique language on oscommerce shop :-)

:blush:

Hi,

I changed mine to be part of the admin page with an iframe.
I changed /admin/leapfrog.php
<!-- body_text //-->
<td>
<iframe src="http://www.yourwebsite.com/catalog/admin/includes/leapfrog/leapfrog.html" width="640" height="1450" frameborder="0" scrolling="no" title="<?php echo TEXT_LAUNCH; ?>">
<a href="http://www.yourwebsite.com/catalog/admin/includes/leapfrog/leapfrog.html" target="_blank"><?php echo TEXT_LAUNCH; ?></a>
</iframe>
</td>
<!-- body_text_eof //-->

Simon

#47 chee

  • Community Member
  • 35 posts
  • Real Name:chee

Posted 22 February 2007, 04:42

Great contribution!!

Is there a way:
1) To change the title instead of showing "LeapFrong - Realtime OSCommerce Visitor tracking"?
2) I got this sometimes on the product showing - HEADING_TITLE, any idea?
3) Is there a way to not showing customer login name when customer login? I am thinking to put this into a public access page to show that my site is really "Active", but not to violate any customer privacy! Showing "Guest" is fine!
4) Suggest also the "purge database" option to be set on the admin page instead of the showing page

Thank you!

#48 Sandbag

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

Posted 22 February 2007, 07:42

Hi chee,

Let me answer your questions:

1. Change title - this has been requested by more than one person. In future releases I think the title and strapline will be defined in a language file. That way you can change it to whatever you like

2. I think HEADING_TITLE appears when you are on a page that is not a product or category page, although on the default OSC store this is defined somewhere and shows up correctly. If you want to change it for you store goto 'catalog/includes/functions/leapfrog.php' and search for HEADING_TITLE. Its around line 99. Change it to what you want.

3. Yes you can do this. Open 'catalog/includes/function/leapfrog.php'. Find the following around line 45:

$wo_full_name = tep_db_input($customer['customers_firstname'] . ' ' . $customer['customers_lastname']);

Change it to:

$wo_full_name = 'Guest';

Showing IP address might also violate customer privacy so you can change that in the same file.

4. The contribution was not meant to be seen by public so controls were put into GUI. I like the idea of being able to do everything in one place, rather that having to wait for HTML page refreshes to change settings. However a quick Flex edit could remove the button. PM me for more about this.

So to conclude, 1, 2 & 3 are possible or will be very soon in version 1.2. 4 is very store specific and not a feature most people would want so won't be in the next version.

Ed

View Postchee, on Feb 22 2007, 05:42 AM, said:

Great contribution!!

Is there a way:
1) To change the title instead of showing "LeapFrong - Realtime OSCommerce Visitor tracking"?
2) I got this sometimes on the product showing - HEADING_TITLE, any idea?
3) Is there a way to not showing customer login name when customer login? I am thinking to put this into a public access page to show that my site is really "Active", but not to violate any customer privacy! Showing "Guest" is fine!
4) Suggest also the "purge database" option to be set on the admin page instead of the showing page

Thank you!

Edited by Sandbag, 22 February 2007, 07:43.


#49 markoven

  • Community Member
  • 18 posts
  • Real Name:mark

Posted 23 February 2007, 20:09

leapfrog was working good, when I put SSL connection on, i get the message in leapfrog: "Unable to connect to your store database", I tried to change the https to http, that went well, but when i changed the /admin/includes/application_top i'll get a fatal error in my admin-index.php that says: fatal error in line 209 ......application_top.php
Please help!

#50 Sandbag

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

Posted 23 February 2007, 22:48

Hi everyone.

I am ALMOST ready to release Leapfrog V1.2. It has several new features including:
  • Visitor country displayed
  • Length of page view displayed
  • Ability to show/hide spider and robot sessions
  • Now compatible with Ultimate SEO URLs 'out of the box'
  • Improved image handling - fixes problems people had seeing the product images
You can see the new version in action in the following locations:

Simulated demo - clicks generated artificially
Live demo - click around in my dummy shop and see your movements being tracked!

Before I release it, I need a couple of people to test it to make sure I haven't missed anything. This is to prevent a duff version being uploaded to the contributions sections. Anyone willing to test the new version, please PM me for a link. Only need one or two testers so if you want a sneak peak make sure you get PMing fast!

Thanks,

Ed

#51 Tomcat

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

Posted 24 February 2007, 21:00

View PostSandbag, on Feb 23 2007, 11:48 PM, said:

Hi everyone.

I am ALMOST ready to release Leapfrog V1.2. It has several new features including:
  • Visitor country displayed
  • Length of page view displayed
  • Ability to show/hide spider and robot sessions
  • Now compatible with Ultimate SEO URLs 'out of the box'
  • Improved image handling - fixes problems people had seeing the product images
You can see the new version in action in the following locations:

Simulated demo - clicks generated artificially
Live demo - click around in my dummy shop and see your movements being tracked!

Before I release it, I need a couple of people to test it to make sure I haven't missed anything. This is to prevent a duff version being uploaded to the contributions sections. Anyone willing to test the new version, please PM me for a link. Only need one or two testers so if you want a sneak peak make sure you get PMing fast!

Thanks,

Ed

Ed,

Nice work, very nice indeed. Can you make the referal field a bit wider (or in two lines) so that one can read all the referal url?

Thanks

Edited by Tomcat, 24 February 2007, 21:02.

Outside links in signatures are not allowed!

#52 Sandbag

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

Posted 24 February 2007, 22:46

View PostTomcat, on Feb 24 2007, 09:00 PM, said:

Ed,

Nice work, very nice indeed. Can you make the referal field a bit wider (or in two lines) so that one can read all the referal url?

Thanks

Unfortunately, the referal cannot be made longer. Stretching it onto two or more lines causes display problems.

However, did you know that by hovering over the referal text you will see the full text? Also, you can click on the text to be shown the full URL.

#53 analli

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

Posted 25 February 2007, 05:08

I've just upgraded from Leapfrog 1.1 to 1.2. I now get this message at the bottom of my store's main page (the footer):

1054 - Unknown column 'thumb_url' in 'field list'

I have removed the Leapfrog additions to the footer.php file until I get the issue resolved but would love to reinsert the lines.

How can I rectify this?

Thanks,
Anthony

#54 analli

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

Posted 25 February 2007, 05:34

I actually completely removed the 1.1 Leapfrog table then reinstalled the new SQL data. That resolved the footer issue.

Next problem, the Leapfrog admin page doesn't show anything except for the Settings button. There is a large blank flash field there but nothing in it.

Anthony

#55 Tomcat

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

Posted 25 February 2007, 06:14

View Postanalli, on Feb 25 2007, 06:08 AM, said:

I've just upgraded from Leapfrog 1.1 to 1.2. I now get this message at the bottom of my store's main page (the footer):

1054 - Unknown column 'thumb_url' in 'field list'

I have removed the Leapfrog additions to the footer.php file until I get the issue resolved but would love to reinsert the lines.

How can I rectify this?

Thanks,
Anthony

delete the existing leapfrog table and run the new sql statement included in package 1.2

I upgraded to version 1.2.3 as well and have a different issue: records are not written to DB, not even one and if I run admin/leapfrog.php with Firefox ( 1.5 or 2) the browser crashes...

Any help on that ?

Thanks

Edited by Tomcat, 25 February 2007, 06:15.

Outside links in signatures are not allowed!

#56 Sandbag

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

Posted 25 February 2007, 09:13

View Postanalli, on Feb 25 2007, 05:34 AM, said:

I actually completely removed the 1.1 Leapfrog table then reinstalled the new SQL data. That resolved the footer issue.

Next problem, the Leapfrog admin page doesn't show anything except for the Settings button. There is a large blank flash field there but nothing in it.

Anthony

Nothing should show except the settings button until someone actually clicks in your store. I know its an obvious suggestion but did you try that?

#57 Sandbag

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

Posted 25 February 2007, 09:19

View PostTomcat, on Feb 25 2007, 06:14 AM, said:

delete the existing leapfrog table and run the new sql statement included in package 1.2

I upgraded to version 1.2.3 as well and have a different issue: records are not written to DB, not even one and if I run admin/leapfrog.php with Firefox ( 1.5 or 2) the browser crashes...

Any help on that ?

Thanks

Two suggestions. First check that the file catalog/includes/functions/leapfrog.php is present and that it is V1.2. You can check this by looking at line 112. You should see a new if statement with the varialbe LEAPFROG_EXCLUDE_ROBOTS.

The second suggestion is to make sure that the code in catalog/includes/footer.php is still present. There should be a call to lf_update_tracking at the bottom of this file.

As for the browser crashing, what exactly is happening? Does Leapfrog display an error message or is it the entire browser which freezes?

#58 Sandbag

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

Posted 25 February 2007, 09:29

Actually, in relation to the above post I should mention something else.

Leapfrog will not start tracking until you visit the Leapfrog admin page. This is because on startup it inserts some configuration settings into the database. So, I think you will have to solve the browser crashing issue before any records will show in the DB.

#59 Tomcat

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

Posted 25 February 2007, 10:22

View PostSandbag, on Feb 25 2007, 10:29 AM, said:

Actually, in relation to the above post I should mention something else.

Leapfrog will not start tracking until you visit the Leapfrog admin page. This is because on startup it inserts some configuration settings into the database. So, I think you will have to solve the browser crashing issue before any records will show in the DB.


Hi,

I removed the if statement on line 112 and now works like a charm. Thanks
Outside links in signatures are not allowed!

#60 Sandbag

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

Posted 25 February 2007, 10:27

View PostTomcat, on Feb 25 2007, 10:22 AM, said:

Hi,

I removed the if statement on line 112 and now works like a charm. Thanks

I'm glad that fixed it, but it does mean that you can't use the settings menu to stop robots being tracked. Still not sure why that line would cause the admin to crash. Hmm...