Jump to content
equilla

Support Thread for Supertracker Contribution

Recommended Posts

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

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites
<?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.

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites
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,

 

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

Edited by rockadrome

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites

Hi,

I?m 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 I?m able to administrate my "test site" on my notebook

 

Tanks in advance

 

Alex from Dantotec

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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,

Share this post


Link to post
Share on other sites
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

 

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

==========

Share this post


Link to post
Share on other sites

I got it how to change image folder in the code...

 

sorry for bothering you..

 

keep us informed if you make any update to this great contrib.

 

wish you good luck

Share this post


Link to post
Share on other sites

I have suggestion,

 

Can we add a delete button infront of these logs ??

So that we can keep only required info ??

 

It came in my mind, because i am browsing myself and its occupying the database with my information which is not required. So if there is a button infront of these rows then i can delete unwanted stuff.

Share this post


Link to post
Share on other sites

Hi,

 

glad you figured it out.

 

The version I have running here now includes a box where you can enter a number to delete the oldest "x" rows - handy when your logs extends to many tens of thousands of entries and your want to prune it.

 

I will probably also include a facility to stop your own IP address being recorded in a future version too.

 

In the meantime you can always use a custom query in phpmyadmin once in a while: "DELETE from supertracker where ip_address='xxx.yyy.zzz.aaa'" where xxx.yyy.zzz.aaa is your IP address.

 

Regards,

Share this post


Link to post
Share on other sites

Hi All,

 

Note, new development thread is now open for this contrib : http://forums.oscommerce.com/index.php?showtopic=166839

 

That thread is the place for feedback and requests for new functionality - this one will remain available for help in getting the contrib to work.

 

Newest version with many improvements will be posted very shortly...

 

Cheers,

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

×