I’m using my webflow pages for Google Adwords marketing, and as such I need to include a conversion code which need to run ONLY when the form successfully filled and sent.
It means I can’t put it into the form-success-done div, because that is executed every time when the page loads.
I can imagine a solution where I call a separated file which contains the thankyou message and the conversion code, but I would like to keep the AJAX form on the webflow pages if possible.
Hi @zedexes, you can drag an embed widget into your form, then paste your google adwords conversion code there in your embed widget. Then save your changes and republish and test. This I have seen to work for others.
That embed widget and the google script will be invisible to the person submitting the form, it will not be displayed.
This piece of code should be executed or read by the browser only if the form is submitted.
If I put this embed widget anywhere on the landing page, its executed instantly after page load, and it means for me that every visitor on my landing page also converting, which is unfortunately not true…
So any other idea please, it would be a great help.
Hi @zedexes, sorry for the late reply. What I mean’t, is that you put the conversion code INSIDE of the form element using an embed widget, and this should not get triggered unless the form is submitted. Have you tried that yet? If you get stuck, please let me know
It is inside the Form element, in the success DIV to be more precise, and its always triggered regardless the form is submitted or not.
So no, thats not good.
Anything else?
I think it would need to go somewhere into webflow.js where it sends the form details along, maybe I could put it there, just an idea (but still don’t know where exactly within the file).
hmm, do you have a link to the site, and I can take a look at the way it is setup? I have seen other people get this setup ok in the past, so I would like to check this and try to help
…which as far as I understood means including all of the google conversion script but leaving out the image (which does the “success”-request to the google server) and load that image with ajax AFTER your form has been sent.
However, I haven’t done that and don’t know if it’s possible with webflow.