gtag_report_conversion

I am trying to call gtag_report_conversion within a button’s on_click event. I have included the Google Tag manager scripts in the section as well as my adWords scripts. None of my clicks are being reported and the Wix code viewer shows an “undefined” error. Not sure what I am doing wrong. Any ideas?

This forum is dedicated to Wix Code. For questions that are not related to code you can contact the Wix support team . You’ll get better help for your problem there.

YIsrael, thank you for your response. I believe this is a Wix code question. I am trying to call a Javascript function (located in the section of my page) from within the onclick event handler of a button (this event handler was created by Wix when I selected the event in the button’s property panel). Is the onClick event handler not consider Wix code?

You can’t embed HTML in a Wix Code page. You might want to consider using an HtmlComponent . For more information, see the article Working with the HTML Component in Wix Code .

A more secure way to handle web service requests is by using backend (server-side) code. Using backend code you can secure your passwords, API keys, and other secret information. The article Accessing 3rd Party Services explains how this is done.

I hope this helps,

Yisrael