How do I fire some code when the form is submitted?

There are 3 ways of getting conversion code or "pixels" to fire when a user completes your form:

1.) Recommended: Use our one-click integrations

If you need to fire a Google, Facebook, Google Analytics, Twitter Ads or Microsoft Advertising tag - we recommend using our 1-click integrations.

To do this, open up your form in the Growform builder and hit "Edit form settings" in the blue toolbar. Then, go to "Tracking & tagging" and follow the documentation for your chosen integration:

2.) Add the code to your thank-you page, hosted on your own website or blog

Another perfectly viable option is to simply add the pixel code to your thankyou page. This option has the advantage of keeping your conversion code all in one place, and means you can maintain it on your own website or blog.

To implement this, navigate to "Edit form settings". Then, under "Form completion action", choose "Redirect to custom URL". You can then enter your thank-you page URL before hitting "Save form settings".

3.) Fire some code with our "fire custom script" option

It's also possible to fire code from Growform. To do this, navigate to "Edit form settings". Then, under "Form completion action", choose "Fire custom script" and enter your script - including the <script> tags.

This method is usually suitable for most implementations, but may come with a few drawbacks - under the hood, the code is firing inside an iFrame - so you may experience tracking issues using this method.

4.) Use Google Tag Manager

Finally, you can use a custom Google Tag Manager setup to fire tags.

This allows for a high degree of flexibility but is entering developer territory.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.