-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prebid Click Tracking #6130
Comments
Someone with javascript chops might be able to add some code that listens for click events? Maybe set a variable like
|
Do you just want the clicks tracked in GAM, in the bidder reports, or in a Prebid Analytics report? |
Tracked in GAM. Thanks! |
I was thinking something like this -- https://stackoverflow.com/questions/2381336/detect-click-into-iframe-using-javascript/32138108#32138108 Prebid creatives are wrapped in an iframe, so maybe there's something we can do to detect clicks on that iframe without affecting the rest of the page? |
So I have been digging into this a bit and the <iframe> html tag supports global and event attributes so you are fine attaching event listeners to them like some of the above StackOverflow solutions. It seems like people are approaching this in generally 2 different ways. One way seems to be setting the focus and then listening to blur and focus events but when I was trying this with multiple iframes I was getting some weird interactions but could have just been me. Another way that I seemed to have a bit more success with was defining an object with fields related to different mouse events and then setting those to true or false using different event listeners. You can then build functions off the main object to send the data around. I haven't been able to figure out how to communicate this back to GAM though yet |
That link is fascinating, thanks Bret! There are a bunch of solutions
there. I would think we would want %%CLICK_URL_ESC%% to be added to the
creative in gam and then passed up in the post message, and
secure_creatives.js would need to receive it, does that sound right?
…On Thu, Feb 18, 2021 at 8:44 AM Chris Huie ***@***.***> wrote:
So I have been digging into this a bit and the <iframe> html tag supports
global and event attributes so you are fine attaching event listeners to
them like some of the above StackOverflow solutions. It seems like people
are approaching this in generally 2 different ways.
One way seems to be setting the focus and then listening to blur and focus
events but when I was trying this with multiple iframes I was getting some
weird interactions but could have just been me.
Another way that I seemed to have a bit more success with was defining an
object with fields related to different mouse events and then setting those
to true or false using different event listeners. You can then build
functions of the main object to send the data around.
I haven't been able to figure out how to communicate this back to GAM
though yet
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM25Z74TTDULTIHCH32TLLS7UKSXANCNFSM4U3ILZSQ>
.
|
A few links and implementations exampled in this issue for reference |
I don't see the resolution here, are you closing as 'won't do'
…On Wed, Feb 24, 2021, 10:19 AM Chris Huie ***@***.***> wrote:
A few links and implementations exampled in this issue for reference
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM25ZZYOTS2GT63GPUPZGTTAUDHXANCNFSM4U3ILZSQ>
.
|
@ChrisHuie - the goal here would be to add some documentation on the site giving an example and/or guidance. If you can post your experiments here, we can discuss how best to document. |
docs issue 3124 wasnt merged, why was this closed? |
One solution... we could document that the GAM creative passes the GAM click URL like:
The PUC now has access and can do ... something
|
IMHO the best thing to do would be that bidders are made aware of this
I understand that it may take years until the majority of bidders support it, but it's a viable way to go forward IMHO. |
Muki - I don't think we should be updating the bidder's creative if possible. Here's the general direction of what I'm thinking:
Difficulties:
|
https://docs.prebid.org/dev-docs/publisher-api-reference/renderAd.html#sidebar now documents how the renderAd function already can handle this. Listening for clicks inside frames seems to only work on desktop(is this true?), which is quite undesirable. I think modifying adm as Muuki suggests is the only possibility? |
@dgirardi - you're working in this area with the ${CLICKTHROUGH} macro, right? Can we assign this to you? |
Is this covered by CLICKTHROUGH though? that requires collaboration from the creative markup. Or can we drop a pixel without worrying about the "through" part? |
Would this work?
|
How does "listen for clicks" work? Is that an onMouseClick event on the iframe? Would it work for mobile? |
it would be a combination of |
How can I track prebid clicks in GAM? The bidder is AppNexus. Creative is below, but I am unsure where to put the click tracker in the creative tag.
<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>The text was updated successfully, but these errors were encountered: