Call on HTML-link click

Bronze Contributor
Bronze Contributor franzel

I want to trigger a Google Conversion when a user clicks on a HTML link. I achieve this with a JavaScript Extension which add an event handler on the click and then call with data layer parameter which make Tealium call the Google Conversion. But when the HTML-Link redirects to another page it occurs that the new page loads before the request is sent (especially when Google redirects three times before the conversion is submitted).


I think the solution would be to prevent the execution of the link and redirect the user after the and all consecutive events are finished. Can this be accomplished by using the callback-parameter in


Or is it better to call the conversion directly like described in the google docs ( without using at all?


Or am I completely missing something?


Call on HTML-link click

Employee Emeritus

Hello @franzel. Have you tried using the jQuery onHandler Extension instead to track your event? Let me know!

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.

Call on HTML-link click

Tealium Employee

Hi @franzel,


There are a couple of things you can try.


1) Mousedown vs. click

In the event handler logic, if you are executing on a click, the other logic on the page may execute before the occurs. Try replacing the 'click' logic with 'mousedown'. This may trigger the prior to the page processing the href click.


2) The pixel is fired but you are not seeing it

Without all the details this is a shot in the dark. If, for example, you are using Chrome and viewing the Network panel for verification of the pixel being sent, make sure the option Preserve Log checked to ensure the list remains intact when the new page loads. 


Let me know if either of these suggestions help.


Thank you, David

Call on HTML-link click

Gold Contributor
Gold Contributor Srinivasan

Hi @franzel,


Nevertheless, we can use jQuery event.stopPropagation() Method,  if you are executing on a click/Mousedown on the page may trigger the prior to the page processing the href click.



    alert("The span element was clicked.");
    alert("The p element was clicked.");
    alert("The div element was clicked.");


Hope it helps out!!!