Increment Counter

5 posts by 4 authors in: Forums > CMS Builder
Last Post: June 9, 2012   (RSS)

Re: [design9] Increment Counter

By gkornbluth - June 7, 2012

Hi April,

Take a look at this post.

http://www.interactivetools.com/forum/gforum.cgi?post=92168

Hope it gives you some ideas,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Increment Counter

By design9 - June 8, 2012

This really doesn't work for me because I am using an image. So, I think I still need to figure out a way to do this. Example, I have a facebook icon which is an image and I want to be able to count how many times users click on the icon to visit the facebook page instead of just the page view. the user may go to the page but not click on the icon so counting the page view is misleading.

Thanks!
April

Re: [design9] Increment Counter

By Jason - June 8, 2012

Hi April,

There are a couple of approaches you could take here. The easiest I can think of is having your facebook icon click refresh your page with an extra variable in the URL. On your page, you can detect this variable, and then increment your counter before redirecting them to the facebook page. The user shouldn't notice a difference at all.

Hope this helps,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Increment Counter

By Toledoh - June 9, 2012

If you use Google Analytics, you can easily achieve this with their _trackPageview() JavaScript.

ie.

<a href="http://www.facebook.com" onClick="javascript: pageTracker._trackPageview("/links/facebook.com");">

If you're inserting links via CMSB, just put the link as the href and as the trackPageview.
Cheers,

Tim (toledoh.com.au)