Adding custom code, pixels, javascript and CSS

While ConvertFlow's funnel builder is a no-code platform, you'll still need to occasionally add custom scripts, conversion pixels, and CSS to your campaigns.

ConvertFlow's custom code managers help you keep all your ConvertFlow-related custom code organized, and makes sure this code loads at the right time.

Table of contents:

Adding custom code to all landing pages

Want to add custom code, such as tracking tags and custom CSS, to all of your ConvertFlow landing pages?

Head to Settings > Website and you'll find a custom code setting for all landing pages. Click save after your edits.

Custom code added here will run as your landing pages' content loads.

Important: ConvertFlow has native integrations with Google Tag Manager, Google Analytics, and Segment, to handle installing their libraries and populating them with events.

Adding custom code to all popups & embed campaigns

Similar to adding code to all landing pages, you can do the same for all popup & embed campaigns, from Settings > Website. Remember to save after your edits.

Custom code added here will run when your campaign becomes visible (upon trigger for popups, upon scroll into view for embeds).

Adding custom code to specific campaign variants

First, enter the builder of a specific variant of your campaign. Then, click to the "Settings" tab. Last, click the custom code edit button. 

You'll find a code editor where you can place your custom code.

This custom code will run as soon as your campaign becomes visible (immediately for landing pages, upon trigger for popups, upon scroll into view for embeds).

Adding custom code to specific funnel steps

You can run custom code when a certain step of your funnel is reached.

To do this, select the funnel step in the builder. Then, click to edit its custom code.

Important: When using funnel step skip logic, custom code applied to the first step of the funnel will always run. However, any other skipped funnel steps' custom code will not run. 

Firing custom scripts when conversion elements are completed

When managing the actions of a conversion element (button, form, quiz etc), you can edit custom code.

This custom code will fire as soon as the conversion element is completed, such as a button element being clicked, form submitted, quiz completed, etc.

ConvertFlow's campaign content is dynamically loaded in using Javascript, based on rules such as conditions, split-testing, personalization etc.

Because it's not server-rendered HTML, which is evaluated upon the first rendering before javascript runs, we don't add custom scripts to the head. 

Custom scripts added through ConvertFlow's script manager get added to the end of the body tag, reflecting the actual load order that the script was added to the page.

This may not align with script installation instructions from various tracking script / conversion pixel providers, which tend to default to instructing installing their script in the head. 

However it should not cause errors, or prevent event tracking, unless their script needs to be ran synchronously.

Error handling

Any errors from custom javascript, added using ConvertFlow's custom script managers, will be caught and logged in the javascript console as a message with the stack trace accessible. 

This ensures there is no interruption to ConvertFlow's functionality, data processing and your visitors' funnel experience. The downside of this is errors from your custom scripts may not be logged in your website's javascript profiling tools.