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.
Anybody has any idea on this one?
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.
Try that and see how it goes
Hi, I think you misunderstand me.
It’s not Google Analytics tracking code.
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.
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
Here is info on the read-only link:
I guess this is somewhat trickier. You’re talking about the adwords conversion code, right @zedexes?
I think you’ll need to do something like this http://stackoverflow.com/questions/11296781/execute-google-analytics-code-after-ajax-request
…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.
why not just put it on the success page?
you cant put in success page, cause form has success column
Has anyone figured out how to add the conversion code tracking when a webflow form is fired?
A. adding to the success DIV does not work.
B. Adding to the page does not work.