Re: LightBox click detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 14, 2013 at 8:52 AM, Tedd Sperling <tedd@xxxxxxxxxxxx> 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:

<https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide>

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:

[code]

// Track this lightbox instance:
window._gaq.push([
    '_trackEvent',                      // Method.
    'Paymeter Lightbox',                // Group.
    'Lightbox OPEN group ' + count_txt, // Append count to "action" text.
    count_txt + ' OPEN event'           // Prepend count to "label" text.
]);

[/code]

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.

Cheers,
M

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





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux