Track click on button (external JS widget) as a goal


Hello experts,

I have integrated a widget from OpenTable on a website (see appendix: example screenshot), which is generated by an external javascript, and whichs provides a “button”. The JS-code looks like this:

<script type="text/javascript" src=""></script>

Alternatively, you can use just a simple textlink without the “Booking Table”-button and the more of choices, which looks like this:

<a href="">Tischreservierungen</a>

Now I want to track both as a goal, the click on the Javascript widget button and clicking on the external simple link. The latter is already functioning properly:
Goal is triggered, when visitors
Click on a link to an external website
Where the external website URL contains Pattern opentable

–> But with this goal-configuration a click within the external Javascript widget is not counted.

How can I achieve that the user interaction within the widget will also be detected by the previously defined goal?

Thanks in advance.