Hopefully someone can help me with this issue of mine. It revolves around custom code and a form submit button:
I have created a landing page. On the page’s form, I have created the submit button entirely with custom code. It works when sending a message through the form; all information is submitted correctly. Here is the code I used for said submit button:
input type=“submit” value=“Nachricht senden” data-wait=“Wird gesendet…” class=“btn-blue w-button” (the < and > arrows are correctly placed. But the Webflow forum doesn’t show correctly if I leave them there).
Now, I want to add an onclick attribute inside this HTML embed that tracks conversions. This is the code I need to add:
So, when I add it, the final code looks like this:
input type=“submit” value=“Nachricht senden” data-wait=“Wird gesendet…” class=“btn-blue w-button” onclick=“return gtag_report_conversion(‘https://goodnity-kpi.workspex.de’);” (again, arrows < and > are correctly in place).
However, adding this onclick attribute destroys the form’s funcionality! The redirect works, but no form data is sent. Neither to my email, nor is the data shown on the project settings console (so, submission count does not go up either).
Any idea what I am doing wrong? How can I make this onclick conversion tracking work?
Thank you in advance!
P.D. My read-only link is here: https://preview.webflow.com/preview/goodnity-suite?utm_source=goodnity-suite&preview=9f5d40b22e7180d89ea3cf0f58099c7a
However, I don’t think a preview link would help since this is a coding question. But just in case! Inside the preview-link, you will need to go to the navigator, open the “form-pop” symbol, and style it with display:flex. It is display:none right now so that it triggers as a pop-up.