Add custom script content to your Forms and Landing Pages
By adding scripts to your Forms and Landing Pages, you can enrich them with content and tracking analytics from third-party apps.
Here's how:
Adding your script
Go to Landing Pages & Forms under the Grow tab in the navigation, and open your Form or Landing Page.
Hover your cursor over the part of the Form or Landing Page where the script should go. Click the + icon menu that appears, and select Script.
A script block will be added to your Form or Landing Page. Click its Edit button to open the Edit Script window.
In the Container Height field, fill out the height—in pixels—of the container (or section) that will hold your script.
Choose a height that lets you fully show your script's content on the Form or Landing Page. Leave the height as zero if your script won't display any content.
NOTE: If you aren't sure what the height should be, fill out an arbitrary number (e.g., 100 pixels) first. When you test your script, you'll be able to preview its content on your Form or Landing Page. You can then click the script block's Edit button to adjust the height as needed.
Next, type or copy and paste your script into the Edit Script window's Source field.
Click Save when you're done.
Testing your script
The script won't have any visible effect in the Form or Landing Page builder. To test it, click Preview at the top right of the builder.
You'll see a preview of the script on the live version of your Form or Landing Page.
If the script works correctly, continue editing your Form or Landing Page as needed, and publish it when it's ready.
Troubleshooting your script
The script isn't working
If your script doesn't seem to work, check that you've typed or copied your script into the Edit Script window's Source field correctly.
Then, if your script is supposed to display content on your Form or Landing Page, check that you've filled out a value for the Edit Script window's Container Height field.
If this field is left at its default value of zero, the script's container will not appear on the Form or Landing Page. The script will still run, only that you can't see its content (if any).