Keeping failed javascript code from halting execution flow

Welp, I’m kind of weak on the JS side, so I’m a little worried that my question won’t even have the correct terminology, but here goes:

I have a multipart form that displayes each part (div) based on button clicks, and the client wants some google conversion tracking code (JS) executed on the first click. In other words, when the user goes from div one to div two, he considers that a conversion. He isn’t willing to have each part of the form be its own page. That would be too easy.

Anyway, how do you handle a case where on an event, you want more than one thing to happen, but you don’t want those things to depend on one another? Like, on a click, I want elements on the page to change, and also to make a call to an external service. Do I just put each of these desired outcomes in its own “onclick” event handler function?

It is always possible I’m misunderstanding something. Appreciate any help.