I am using the following eventListener
to get certain output from gpt
for each available slot
googletag.pubads().addEventListener('slotRenderEnded', function(event) {
gptForForm[count] = [ event.creativeId, event.lineItemId, event.size[0] + 'x' + event.size[1] ];
count++;
});
Now I want create an eventListener
that will let me know when someone clicks on an ad, I tried the following to no avail
googletag.pubads().addEventListener('click', function(event) {
console.log('this lineItemID: '+event.lineItemID+', size: '+event.size[0]+','+event.size[0]+' clicked!!');
});";
I know I can get a report from DFP but we are trying to collect this data right away and real-time CTR and Clicks without having to check the report every single time. Are there any suggestions that I have not tried?