Most ads that are served (especially those created from templates) have some
special APIs baked in that tell the SDK an ad has been cilcked so it can perform the action. If you were to just make a custom creative with an onClick function in html, the content in the webview may change, but the SDK/app may not know about it.
If you have control over the creatives you're serving, DFP has a feature called
app events where you can have the creative send your app a message. There is a working example
here showing off app events. The creative calls admob.events.dispatchAppEvent("name", "info") to send the message.
Thanks,
Eric