Join the Webstudio community

Updated 3 weeks ago

Webflow to Webstudio (Custom Code)

I have a question. I am using a template from osmo.supply. I can copy this to Webflow without any problems. However, when I copy it from Webflow to Webstudio, the effect no longer works. I still have to integrate external scripts and custom Javascript. In Webflow, I copy the JavaScript under Site Settings in the Custom Code ‘Before </body> tag’ section. This is not possible in Webstudio. How can I integrate this here for the entire project and not just for one page?
In Webflow, I work with Slater, because I can structure and edit the code better there. What can you recommend for Webstudio?
J
s
4 comments
If you are trying to add custom code, you can use an HTML embed. Or am I misunderstanding the question?
Ok, I wasn't sure whether I could use these elements for <script>. Would I also be able to store this element in slots so that I only have one place to go when I want to make changes and don't have to go into each page, or would Project Settings/General/Custom Code be the better choice? I was just unsure because in Webflow this is added in the site settings.
Sorry for all the questions.
Yeah you can use a slot. from docs

Custom Code – Global field to output scripts in the head. Custom Code is often used to add analytics scripts such as Google Analytics, PostHog, Plausible, and any other scripts/code you want to output on every page. Please note that this code does not output in the Builder, so your scripts aren't tracking Builder page views. For outputting a script in the body on every page, use a Slot. For example, add HTML Embed(s) to your Footer Slot so that it outputs on every page.


In Webflow, html embed does not render on the canvas which is partially why site settings are the go to. In Webstudio, your html embed scirpts can run on canvas (there is a toggle on them as you may not always want them to execute), so HTML embed is a great place for them
Perfect. Thanks a lot for the information.
Add a reply
Sign up and join the conversation on Discord