Streaming live at 10am (PST)

How to add js to individual html files?


#1

As per the suggestion posted in one of the earlier discussions, I added js code for invoking lightbox popup with forms. With number of pages increasing in my website, the number of corresponding lightbox popups have also increased. It appears that webflow currently allows addition of js code only at the site level. This causes issues as the entire js code appears in each page which is unnecessary. Is there a way to add js code individually for each page? This way, I could only include those js functions which are required in a page. This requirement is particularly prominent when I try to add Google code for A/B testing as I need to add the code only to the champion page. Please help!


#2

Hi @DesignerPC,

Thanks for the great question, adding custom code to the header can only be done at the site level, however you can add custom code to the body using the Embed widget. This is a great idea, and we would love your thoughts about it on this topic: http://forum.webflow.com/t/adding-custom-code-on-a-single-page/3739

We have this feature on the roadmap smile Cheers, Dave


#3