Tracking content in a lightbox

Jeremy_Bosch2
Level 2

Tracking content in a lightbox

We are working on a new website currently, and would like to have certain content pieces open in a lighbox when clicked.  What would the requirements be on the Marketo end so I could track this?  Would we need to have the lightbox generate a unique URL?  Other suggestions out there?

7 REPLIES 7
Anonymous
Not applicable

Re: Tracking content in a lightbox

What exactly are you looking to have tracked? If the link is properly coded (and therefore understood by munchkin.js) it will show up as a Clicked Link in Marketo. Let us know what your end goal is to help clarify...thanks     

SanfordWhiteman
Level 10 - Community Moderator

Re: Tracking content in a lightbox

If the link is properly coded (and therefore understood by munchkin.js) it will show up as a Clicked Link in Marketo.

Not really: lightbox links often use an anchor link as a placeholder (href="#hash" only ) and such links are specifically excluded by Munchkin.

Anonymous
Not applicable

Re: Tracking content in a lightbox

Guess it depends on lightbox implementation, etc. That's why I want to understand the requirement, what's not showing up that he expects to show up, etc.

Do you ever sleep Sanford?

SanfordWhiteman
Level 10 - Community Moderator

Re: Tracking content in a lightbox

Do you ever sleep Sanford?

The question is whether I ever do actual work. (kidding/not kidding)

SanfordWhiteman
Level 10 - Community Moderator

Re: Tracking content in a lightbox

Jeremy, whether an in-page lightbox link needs special treatment is determined by how your lightbox library works.

A link like this, where the content is determined by a data- attribute, will require special treatment:

<a href="#" class="lightboxme" data-lightbox-content="http​://example.com/my.pdf">

A link like this this will not require special treatment, even if the default <a> behavior is short-circuited and the contents of the href are displayed in a lightbox:

<a href="http​://example.com/my.pdf" class="lightboxme">

A link like this also is not special, although the Clicked Link event will be logged for the HTML-level href, which may not be the actual content loaded into the 'box:

<a href="https://nation.marketo.com/my.pdf" class="lightboxme" data-lightbox-content="/example.net/my-other-file.jpg">

There are other considerations, too: a <button> or generic element used to launch the lightbox will also not be tracked by default.

Tracking single-page apps with Munchkin (which is pretty much what you're doing, but on a limited scale) can require special attention. Every such problem can be solved but the out-of-the-box experience may not work.

Anonymous
Not applicable

Re: Tracking content in a lightbox

Hi Jeremy,
You could try using a "Custom Data Event" if you want to use a <button> to open the lightbox: http://developers.marketo.com/javascript-api/web-personalization/custom-data-events/

I'll admit I haven't done this with Marketo yet, but I use basically the same thing to pass data through to Google Analytics and it works pretty well.

Let us know what you end up using and how it all goes.


Cheers,
H

SanfordWhiteman
Level 10 - Community Moderator

Re: Tracking content in a lightbox

CDEs are part of Web Personalization, a separate paid product. No reason to use WP for this when Munchkin works just fine.