On Fri, Jun 14, 2013 at 8:52 AM, Tedd Sperling <t...@sperling.com> wrote:
> Here's the problem --  I need to count the number of times a user activates a 
> LightBox -- how do you do that?

If you're using Google Analytics, you can use click tracking:


I recently setup click tracking on lightbox open, close and various
other modal window bits/pieces for a metered pay wall system.

For example, within the lightbox/modal window "open" method:


// Track this lightbox instance:
    '_trackEvent',                      // Method.
    'Paymeter Lightbox',                // Group.
    'Lightbox OPEN group ' + count_txt, // Append count to "action" text.
    count_txt + ' OPEN event'           // Prepend count to "label" text.


The advantage to using a common tool like analytics is that it's got a
ton of powerful ways to analyze the data.

Not sure the goal of your project, but I thought I would mention.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to