BluKai link tracking

Bronze Contributor
Bronze Contributor

Hi,

 

Can you please help me in debugging a javacsript extension with a scope to a BlueKai tag where I'm adding an event listener to a button and I'm populating some variables in it.

The goal is to send a call to BlueKai having the variables I've populated in the server call.

Unfortunately the code I've added to the listener runs after the call happens to BlueKai.

 

Can you please let me know how can I add my code before the call happens?

 

If you need other information please let me know.

 

Thanks,
Csaba

5 REPLIES 5

BluKai link tracking

Tealium Employee

@csaba_ozsvath

 

If I may ask, are you able to provide the code in question so we can take a closer look?

 

Thanks!

-Dan

BluKai link tracking

Community Manager
Community Manager

@csaba_ozsvath An extension to add an event listener should most likely be scoped to DOM Ready or Pre Loader. Learn more about Extensions scopes and execution order.

You can use the "Run Once" options in the JavaScript Code extension if you need more granular control of the timing.

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

BluKai link tracking

Gold Contributor
Gold Contributor
Hello csaba_ozsvath,

I can say you to use DOM ready with a scope to tag any tools. It may help you to populate the variables on a right way.

Hope it helps!! Also, please let me provide me the code so that we can debug and provide the explicit answer.

Have a great day!!!

BluKai link tracking

Bronze Contributor
Bronze Contributor

Hi guys,

 

Thanks for all your answers however we've managed to sort the issue by using another approach so basically we've removed the event listener and as there was already a listener on the object in scope we've used that to inject the required code.

 

Thanks,
Csaba

BluKai link tracking

Employee Emeritus

@csaba_ozsvath Great job figuring this out on your own. And MUCH APPRECIATED letting us know how you solved it! 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Public