⭐ Available in the following bundle: Code Bundle
⭐ Bundle included in the following plans: Scale
⭐ Available on the following legacy plans: Business
👀 Not sure which plan you're on? Check your subscription here.
❗ If your plan no longer includes custom code (e.g. after a downgrade or when your trial ends), your code stays saved but is no longer added to your flow the next time you publish. Flows that contain an HTML block can't be published until you delete the block or upgrade. After an upgrade, publish your flow again to restore the code.
When you want to integrate scripts, tools, and apps, that are not supported by Heyflow natively, you can often implement them through the Head Code.
❗ Custom code is your own code. Our support team can't write or debug custom CSS, JavaScript, HTML or Head Code for you. Test your flow thoroughly after every change.
You can find the Head Code editor in the code editor on the left side of the Build page:
Examples
No Index
In order to avoid Google indexing the flow, paste the following code in the Head Code section and publish your flow again:
<meta name="robots" content="noindex">
Google Analytics
For this guide, we assume that you want to manually integrate Google Analytics into a heyflow and that Heyflow does not already support Google Analytics natively.
When you set up a new Property in Google Analytics, you are asked to install the Google tag. If you choose to install manually, you are shown a code snippet that has some script tags (<script>...</script>). In the instruction, you are tasked to "Copy and paste it […] after the <head> element.".
To (almost) comply with that instruction, simply copy the code and paste it into the Head Code and save the changes in Heyflow. The script will be included in your heyflow's source code and executed on load.
This procedure should work for most script-based integrations. Remember that Heyflow is a Single-Page-Application, so the code will be executed once – not on every page.
💡 Use our native Google Analytics 4 integration where possible. If you add a tracking script via Head Code, it runs once when the flow loads. To track each screen, listen to the heyflow-screen-view event (see Heyflow Events API) and send the page view from there.
❗ Don't forget to save the head code and publish your flow to load!
💡 In A/B tests, each variant has its own CSS, JavaScript and Head Code. Edit the code in the variant you want to change.
💡 Other tracking pixels, e.g. Taboola can also be integrated via the Head Code. Let us know in the chat which integration you would like to see natively integrated into Heyflow!
❗ Heyflow's Cookie Consent only controls Heyflow's native integrations. Scripts you add via Head Code, JavaScript or the HTML block load regardless of the visitor's consent choice. Use a native integration where possible, see Cookie Consent: Intro.




