Jump to content



* * * * - 7 votes

Support Thread for Supertracker Contribution


  • Please log in to reply
683 replies to this topic

#1   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 19 August 2005 - 07:55 AM

Now uploaded to the contributions area here : http://www.oscommerce.com/community/contributions,3453

WHAT IT IS FOR
==============
The supertracker contrib is designed to give you more information on which to base marketing decisions for your osCommerce store. I created the supertracker contrib because, although there were some contribs around that provide a more detailed who's online tool, nothing quite gave me the information I was after.

Here is the information that is recorded for each customer arriving at your site:

referring page
referring query (so we can get at keywords used if search engine)
landing page (including query string - important for Pay Per Click campaign assessment)
arrival time
exit time
exit page
IP address
Number of clicks on the site (accuracy is not 100% as this is recorded based on session ID)
Products viewed
Customer ID (if signed in)
Order ID (if order was placed)
Were products added to cart (true/false)
Did the customer Checkout (true/false)

This allows lots of interesting reports to be generated about customer activity on your site, without the need of a 3rd party service, such as :
Question which supertracker can currently help you answer are the following:
How do my customers find my site?
Which referring sites generate the most sales?
Are there any trends to the pages on which baulking customers leaving without completing their purchase?
Am I getting enough visitors from the countries I am targetting?
Is my Pay Per Click Campaign delivering pay customers, rather than just expensive hits?

Current Reports Available are as follows:
Top Referrers
Top Sales Generating Referrers
Top Exit Pages (No Sale)
Top Exit Pages (No Sale, but added to cart)
Search Keywords Used
Average Clicks on Site by referrer
Average Time Spent on Site by referrer
Last Ten Visitors

Remember, this is just a beta version, so it's quite unpolished, but generally functional. The idea is to get feedback, develop, improve, etc.

Edited by equilla, 19 August 2005 - 07:59 AM.


#2   baluvee

baluvee
  • Members
  • 69 posts
  • Real Name:hilton

Posted 19 August 2005 - 09:35 AM

Great Start
Keep Up the good work Man

#3   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 19 August 2005 - 10:33 PM

Hello All,

First bug discovered   :o

Not enough to warrant a new update as yet, but if you replace this line in /catalog/admin/supertracker.php :-

$referrer = $lt_row['referrer'] . $lt_row['referrer_query_string'];

with this :

$referrer = $lt_row['referrer'] . '?' . $lt_row['referrer_query_string'];

you should find that when you click on the "Referred by:" link (yes, it is a hyperlink!) in the Last Ten Visitors report, it works much better.

Cheers,

#4   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 19 August 2005 - 10:37 PM

Oh bum, that'll teach me to drink wine and try to code!

You also need to change the next line from this:

if ($referrer == '') $referrer = 'Direct Access / Bookmark';

to this :

if ($referrer == '?') $referrer = 'Direct Access / Bookmark';

Cheers,

#5   rockadrome

rockadrome
  • Members
  • 13 posts
  • Real Name:Dennis

Posted 20 August 2005 - 07:31 AM

Quote

<?php
/*
  $Id: reports.php,v 1.5 2003/07/09 01:18:53 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright © 2002 osCommerce

  Released under the GNU General Public License
*/
?>
<!-- reports //-->
          <tr>
            <td>
<?php
  $heading = array();
  $contents = array();

  $heading[] = array('text'  => BOX_HEADING_REPORTS,
                     'link'  => tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, 'selected_box=reports'));

  if ($selected_box == 'reports') {
    $contents[] = array('text'  =>

'<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_VIEWED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '','NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_PURCHASED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_MONTHLY_SALES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_MONTHLY_SALES . '</a>');
  }

  $box = new box;
  echo $box->menuBox($heading, $contents);
?>
            </td>
          </tr>
<!-- reports_eof //-->

Here's my reports.php, when I add this (I took it back out as you can see):

'<a href="' . tep_href_link('supertracker.php, '', 'NONSSL') . '" class="menuBoxContentLink">Supertracker</a><br>' .

I get a parse error on line 30 or something that I can't seem to figure out. Can you help?? Everything else is already installed.

Thanks.

#6   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 20 August 2005 - 08:21 AM

Hi,

sorry - that's my fault as there is a mistake in the instructions. The line should read :

'<a href="' . tep_href_link('supertracker.php', '', 'NONSSL') . '" class="menuBoxContentLink">Supertracker</a><br>' .

(missed a quote after supertracker.php originally).

I'll correct in the download package shortly.

Regards,

#7   rockadrome

rockadrome
  • Members
  • 13 posts
  • Real Name:Dennis

Posted 20 August 2005 - 09:01 AM

equilla, on Aug 20 2005, 03:21 AM, said:

Hi,

sorry - that's my fault as there is a mistake in the instructions. The line should read :

'<a href="' . tep_href_link('supertracker.php', '', 'NONSSL') . '" class="menuBoxContentLink">Supertracker</a><br>' .

(missed a quote after supertracker.php originally).

I'll correct in the download package shortly.

Regards,

<{POST_SNAPBACK}>


:D  Thanks!!! I must have looked at that line 20 times for missing this or that! Doh! Nice contribution!

Edited by rockadrome, 20 August 2005 - 09:02 AM.


#8   gscreations

gscreations
  • Members
  • 459 posts
  • Real Name:graham

Posted 20 August 2005 - 06:27 PM

have the above alterations been added to the second download ?

or do i have to make them changes ?

also i do not seem to have the GeoIP.dat file ?

#9   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 20 August 2005 - 06:52 PM

Hi there,

yes, these fixes are included in the second version of the download.

You have to download the GeoIP.dat file from Maxmind's site as a .tar.gz archive - I have included the URL in the readme file at Step 5. It's done this way for licensing reasons and also because the contribution zipfile would be unecessarily large.

Regards,

#10   redbank199

redbank199
  • Members
  • 3 posts
  • Real Name:Peter C.

Posted 20 August 2005 - 09:50 PM

I downloaded and installed the second version today. Great contribution. Thanks.

Two questions:

1. The products id stored in products_viewed column in supertracker table has data such as *621?  where it should be just the product id 621 (i. e, two extra
characters * and  ?). Has anyone seen this ?

2. Readme file step 4 states: "You will also need to add this new box in Administrator -> File Access from the admin menu. " I have osCommerce MS2.2.
Does this apply to osCommerce or CRE Loaded ? If so, what does it mean ?

#11   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 20 August 2005 - 10:52 PM

Hi,

thanks for your obvservations. The answers are as follows:

1. The * and ? around the product id's was necessary because of the way I designed the code that tracks products viewed. As i was using the substr() function to check whether a product was already registered as viewed, I couldn't use a simply comma separated list. Consider the case where a customer first views product_id = 104 and then product_id =10, for example. With the simple comma separated list approach, when processing the second product, a search for "10" would result in a false positive (because 10 matches the first 2 characters of 104) and this product view would not be recorded - hence I needed to mark both the start and the end of the product_id's to guard against this. Of course, there are many less "interesting" ways to solve this problem - I could just have used an array and serialised it to store this information, but that it is another matter!

2. Yes, this part is just for CRE Loaded users. I can see it could be slightly confusing as written so will update that part so it is clearer at the next update. The next update, which adds more functions and tidies up the presentation of the admin screen is already underway and should be available within the next week (should be a simple replacement of a couple of files for existing users).

Regards,

#12   dantotec

dantotec
  • Members
  • 12 posts
  • Real Name:Dantotec GmbH
  • Location:Germany

Posted 21 August 2005 - 05:13 PM

Hi,
Im not that familiar with php. Please help.

I installed all the require files and added the lines on my locally intalled "test" platform (the real site is on Dantotec without that supherb contribution yet)

error message at admin level:

Warning: main(includes/classes/supertracker.php) [function.main]: failed to open stream: No such file or directory in D:\apachefriends\xampp\htdocs\shop\admin\includes\application_top.php on line 217

Fatal error: main() [function.require]: Failed opening required 'includes/classes/supertracker.php' (include_path='.;D:\apachefriends\xampp\php\pear\') in D:\apachefriends\xampp\htdocs\shop\admin\includes\application_top.php on line 217


What is wrong?

When I remove the lines and make a rollback to the original status I can log in as admin and Im able to administrate my "test site" on my notebook

Tanks in advance

Alex from Dantotec

#13   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 21 August 2005 - 05:23 PM

Hi,

the problem seems to be that at step 3 in the instructions you have made the changes that were meant for /catalog/includes/application_top.php to /catalog/admin/includes/application_top.php.

Take that code out of /catalog/admin/includes/application_top.php and put it in /catalog/includes/application_top.php and hopefully all will be well.

Regards

#14   houseofebook

houseofebook
  • Members
  • 22 posts
  • Real Name:Naved

Posted 21 August 2005 - 11:48 PM

i have installed everything according to the instructions.
i am noto getting any error

BUT supretracker is not logging any activity eighther
is there anything wrong ?

Pls help.

#15   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 22 August 2005 - 12:33 AM

Hi,

Can you just check again for me that you have added the necessary lines of code to /catalog/includes/application_top.php? This is the most obvious think I can think of that would cause what you are seeing.

If this is not a live store, another way to check that the code on the catalog side is being run would be to temporarily rename the file supertracker.php in the /catalog/includes/classes folder to something else. If code to include this file has been correctly inserted, you should get an error message generated when you try an access your site.

If these checks don't reveal where the problem is, come back to me and I'll see if I can assist you further with resolving the problem.

Regards,

#16   houseofebook

houseofebook
  • Members
  • 22 posts
  • Real Name:Naved

Posted 22 August 2005 - 02:57 AM

Thanks for your quick reply  :P

i checked and its exactly same you provided in the readme.

 
//Do the superstats business	
  require(DIR_WS_CLASSES . 'supertracker.php');
	$tracker = new supertracker;
	$tracker->update();

ALTHOUGH, I forgot to mention that i am using creloaded, does it make difference ?? because you have mentioned only at 1 place about creloaded and i did that..

Everything is seems to be right even admin section i can see links... Only problem is this script is not logging / capturing any data into database

Let me know what else can be done. Its not live store yet... as i am playing with contribs.

Thank you

#17   equilla

equilla
  • Members
  • 344 posts
  • Real Name:Mark Stephens
  • Location:UK

Posted 22 August 2005 - 07:54 AM

Hi again,

is this running on a webserver on the internet (as opposed to running on a local machine)?

If so, any chance you can PM me over some details of how to access it as I'd like to see what is going on for myself - obviously one of the purposes of releasing a early rough-and-ready version was to look for problems on different setups and it's possible that we've got one here. If that's the case, I may need to adjust the code to allow for it.

Regards,

#18   baluvee

baluvee
  • Members
  • 69 posts
  • Real Name:hilton

Posted 22 August 2005 - 09:26 AM

houseofebook, on Aug 22 2005, 08:27 AM, said:

Thanks for your quick reply  :P

i checked and its exactly same you provided in the readme.

 
//Do the superstats business	
  require(DIR_WS_CLASSES . 'supertracker.php');
	$tracker = new supertracker;
	$tracker->update();

ALTHOUGH, I forgot to mention that i am using creloaded, does it make difference ?? because you have mentioned only at 1 place about creloaded and i did that..

Everything is seems to be right even admin section i can see links... Only problem is this script is not logging / capturing any data into database

Let me know what else can be done. Its not live store yet... as i am playing with contribs.

Thank you

<{POST_SNAPBACK}>


Hi check your supertracker table.delete all the rows in that table and try again

#19   houseofebook

houseofebook
  • Members
  • 22 posts
  • Real Name:Naved

Posted 22 August 2005 - 12:54 PM

1. I am using a webserver and not local machine as a server.
2. As i said its not logging any activity so there is nothing getting stored in the database table to delete.
3. Mark, I am going to setup a admin username so that you can checkout, I will PM you the same..

Thank you for your support.

#20   houseofebook

houseofebook
  • Members
  • 22 posts
  • Real Name:Naved

Posted 22 August 2005 - 05:31 PM

Hey Mark,

You are awesome,

Its working now  :thumbsup:
You really helped me the way i never expected. I will go thru now all the features and may disturb you again if i need any help,

As of now i just need to know how to change path of Flag images in the code ??
as default its taking admin/images/uk.gif ... but i think its more feasible if its
admin/images/flags/uk.gif

Once again, Thank you

Cheers


Naved
==========