Dynamically inserting a collection-page specific HTML Embed with <Script> Tag

@nate Can you help me with this also? I can’t seem to get it to work.

I got it. Add the JS to the Body not the Head section

@nate Can you use a script tag in this?

If so, its not working.

Bump. Any help with this?

Hi @colourfulchris,

Are you trying to embed the same html embed code? If not, can you help to create a new post with the site details, read-only link to show how you have it setup, and share the custom code you are trying to embed?

Thanks in advance

I am trying the same but I wanted to see if this method could work on Script Tag. Do you still want me to create a new one?

@nate create a method to insert a Dynamic HTML embed.

The issue I am running into is it won’t accept JS tags.

Need help with the code.

Can anyone help with this?

Here’s how to ask for help


Hi @colourfulchris,

Did you check the browser console on your published site to see if there are any errors?

Can you tell us the page where you want to add the script?


@Blaise_Posmyouck Thanks for your help. See screenshot.

What about published link and screenshot of console?

It seems that you are missing <style> tags in the HTML field of Ad 1 item, in your Blog Ads collection.

Not sure you can use the embed widget like this without tags tho… In the browser inspector, it seems that your embed code is empty for both Ad 1 and Ad 2:


Hope this can help, still trying to figure it out…


On http://appcues.webflow.io/post/11-ways-to-check-customer-fit-for-customer-success

I can see

Actual generated value of the field:

&lt;!--[if lte IE 8]&gt; &lt;script charset=&quot;utf-8&quot; type=&quot;text/javascript&quot; src=&quot;//js.hsforms.net/forms/v2-legacy.js&quot;&gt;&lt;/script&gt; &lt;![endif]--&gt; &lt;script charset=&quot;utf-8&quot; type=&quot;text/javascript&quot; src=&quot;//js.hsforms.net/forms/v2.js&quot;&gt;&lt;/script&gt; &lt;script&gt; hbspt.forms.create({ css: &#39;&#39;, portalId: &#39;305687&#39;, formId: &#39;32c16b1b-720e-412f-a993-57e0587997ea&#39; }); &lt;/script&gt;

In designer,

You cannot directly insert HTML code from the designer, explained here

The workaround mentioned here only works for HTML without containing script tags (like links, images, text):

You might want to go with workaround two instead, so that the external script can be loaded on page load.

Also, feel free to contact me for further code help and/or customization of third-party plugins


Sorry I didn’t get a notification for this. I am reviewing the answer now.

What I am trying to accomplish here is to create ads for each blog post. There would be multiple ads created as a collection using Script tags and and HTML.

Reviewing your answer as a solution may not work. Still working through to a solution.

Hi, I’m looking to embed unique html for each individual collection posts.

The code from @nate works for the most recent post, but the content of that post then overrides all the html from previous posts and I just see duplicates of the most recent post on the published site.

I’m not sure if I’m missing something or if I need a different code snippet.

Share link is here, the collection is “Message Feeds” and it’s in that section on the Intranet page. https://preview.webflow.com/preview/wernig-laboratory?utm_source=wernig-laboratory&preview=210a5dfb3f39ff5dfb46afdcaecec42e

Thanks for any help :pray:

I just published a how-to on my blog. Follow along and give it a go. You can let me know if you are successful following my instructions.

1 Like