Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding Stat counter to every page.... What do you think....


hyepo

Recommended Posts

Posted

I really have no idea what I'm doing... only by trial and error have I configured my store.... that being said... I had a request (of myself)

 

I wanted to track each visitor on my site... what pages they came in on and where from as well as where the went on the site (what products they looked at, what they added to their cart, etc).

 

I signed up for a free stat counter at statcounter.com and set up an account for my domain name.

then I copied the standard code (java script) and added this to the footer.php file at the end in catalog/includes/footer.php

 

now every visitor's movement on the site is tracked...

 

 

it works great.

 

Now for the $50,000.00 question: what security risks have I invited if any.

 

If none, this is a easy way to track visitor movement and it only involves one bit of java script added to one php file.

 

Any thoughs?

 

 

added code below:

 

<div class="grid_24" style="text-align: center; padding-bottom: 20px;">

<?php echo tep_display_banner('static', $banner); ?>

</div>

<?php

}

?>

<script type="text/javascript">

$('.productListTable tr:nth-child(even)').addClass('alt');

</script>

 

 

<!-- Start of StatCounter Code for Default Guide -->

<script type="text/javascript">

var sc_project=0000000;

var sc_invisible=1;

var sc_security="xxxxxxx";

var scJsHost = (("https:" == document.location.protocol) ?

"https://secure." : "http://www.");

document.write("<sc"+"ript type='text/javascript' src='" +

scJsHost+

"statcounter.com/counter/counter.js'></"+"script>");

</script>

<noscript><div class="statcounter"><a title="web analytics"

href="http://statcounter.com/" target="_blank"><img

class="statcounter"

src="http://c.statcounter.com/0000000/0/xxxxxxxxxx/1/"

alt="web analytics"></a></div></noscript>

<!-- End of StatCounter Code for Default Guide -->

Posted

Highly unprofessional for a e-commerce shop to install a hit counter in my opinion.

 

Why not Google Analytics ?

Built in module in 2.3.

Posted

I did preface my post with....

 

Posted Yesterday, 10:08 PM

I really have no idea what I'm doing... only by trial and error have I configured my store.... that being said... I had a request (of myself)

 

 

I guess its time to bring myself up to date... and use the google analytics.... statcounter is something i was used to using... hidden, and full of info about the visitor's movements... to better help me design my site... it's not google, its me not wanting to take time to learn...

 

thanks for the reply just the same... prompted me to move forward... LOL

Posted

Google analytics seems to be the market leader in tracking visitors on a site.

 

So it might be a good idea to learn about it and see what it can do.

 

Cheers

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...