![]() | ![]() | ||||||||
| | #1 |
| HyperActive Warrior War Room Member Join Date: Jan 2010 Location: Northern Michigan
Posts: 209
Thanks: 120
Thanked 13 Times in 10 Posts
|
Hi, I have an 'add to cart' button, not using paypal, and would like to track how many times someone clicks on that image button. The button can be seen on the site, Claim Back Your Ex Bret |
| | |
| | |
| | #2 |
| Content Guru War Room Member Join Date: Sep 2009 Location: Pittsburgh, PA US
Posts: 982
Thanks: 48
Thanked 242 Times in 221 Posts
|
Gowebmkt, You could use Google Analytics and track using virtual page views. This requires that you have an account with Google, install the tracking code at least on the page that you are tracking (whole site would be better), and that you add a line of JavaScript code to the link where the button is. Another solution is to use event tracking as virtual page views may skew your page view metric however if you don’t use Analytics for any other data but tracking clicks on that button it won’t really matter. Here is a video on how to implement, Hope that helps, Shawn |
![]() We customize your blog, eBook, press release and backlink content with your message. The Content Authority | |
| | |
| | #3 |
| HyperActive Warrior War Room Member Join Date: Jan 2010 Location: Northern Michigan
Posts: 209
Thanks: 120
Thanked 13 Times in 10 Posts
|
I forgot to mention, I do have GA on the site pages. Ill check out the video for the JS code to use. Thanks! |
| | |
| | |
| | #4 |
| Digital Carpenter War Room Member Join Date: Aug 2012 Location: Pennsylvania
Posts: 829
Thanks: 159
Thanked 198 Times in 166 Posts
|
If it was me Id do it with JQUERY and PHP add to image-- onclick="$.post("trackclick.php");" PHP file: trackclick.php <?php $File = "clickcount.txt"; $fh = fopen($File, 'r'); $Clicks = fread($fh, filesize($File)); fclose($fh); $Clicks=$Clicks+1; $File = "clickcount.txt"; $fh = fopen($File, 'w') or die("can't open file"); fwrite($fh, $Clicks); fclose($fh); ?> |
| | |
| | |
| | #5 |
| HyperActive Warrior War Room Member Join Date: Sep 2012 Location: Ohio, USA
Posts: 140
Thanks: 8
Thanked 35 Times in 31 Posts
|
Here's an excellent article on using google analytics event tracking: Idiot's Guide to Event Tracking | .eduGuru This is the way to go! |
| | |
![]() |
|
| Bookmarks |
| Tags |
| add, button, cart, clicks, code, tracking |
| Thread Tools | |
| |
![]() |