How Can I Use JavaScript in Act-On?

  • Updated

JavaScript works in Act-On, but not everywhere — some components block it outright for security and deliverability reasons, while others support it by design.

Why this matters: If your custom script or tracking code silently disappears after you save, it's usually not a bug — it's Act-On stripping JavaScript from an area that doesn't support it. Knowing which areas do support it saves you from troubleshooting the wrong thing.

Where JavaScript Is Blocked

  • JavaScript is never permitted in email messages and will be automatically removed by Act-On if detected in an email being sent out.
    • Many recipient email clients or email security appliances will remove JavaScript automatically from incoming mail, or not deliver/blocklist any mail containing JavaScript (due to security concerns).
  • In the Legacy Email Composer, it is disabled in Custom Stationery, Custom Content Blocks, and Rich Text Blocks by default.
    • It can be enabled in these areas if your account is configured with a subdomain.

Where JavaScript Is Supported

JavaScript is enabled and supported in other areas of Act-On.

  • The External Web Analytics Support text area in a form's settings supports JavaScript by default. See the article Customizing Form Appearance and Functionality.
  • The Script button in the Landing Page editor allows you to enter JavaScript.
    • This will embed your script at the bottom of your landing page document.
    • This is an appropriate solution for most third-party analytics codes (such as Google's various tracking scripts).

If JavaScript is entered into an unsupported section of Act-On (or if the enhanced JavaScript support is not enabled for your account), your scripts will be automatically removed or hidden. These restrictions are for security reasons, but the above-mentioned sections of the application which do support scripts make it possible to import your custom design or functionality.

Was this article helpful?

Have more questions? Submit a request