What Is The Best Way To Track The Number Of Button Clicks
Posted 16 years 3 months ago
I published an html module on the front page of a Joomla! 1.5.9 site. The html in the module has an image map with a hotspot ('click here' button) that links to an article inside the site. I'd like to be able to keep track of how many times this button is clicked from the front page. What is the best way to achieve this?
Re: What Is The Best Way To Track The Number Of Button Clicks
Posted 16 years 3 months ago
Pass it through a PHP 'redirect' script which records the click in a database and redirects the user to the article. Something along the lines of (this hasn't been debugged - nor will it - this would work for Joomla 1.0.x):
<?php
global $database;
$query = "UPDATE #__my_table SET hit = hit + 1";
$database->setQuery($query);
$database->query();
mosRedirect("index.php?option=however_you_get_to_the_article");
?>
Re: What Is The Best Way To Track The Number Of Button Clicks
Posted 16 years 3 months ago
I use
www.google.com/analytics/
and in the Content Overview - they have a click overlay that shows all the clicks and percentages for individual page. I only recently started using it and am still learning all the features. Best of all - it's free.
"You can learn a lot from a dummy. So, pay attention to yourself." Quote by me.