Streaming live at 10am (PST)

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


#1

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


Dynamically inserting a collection-page specific HTML Embed
#2

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


#3

@nate Can you use a script tag in this?

If so, its not working.


#4

Bump. Any help with this?


#5

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


#6

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?


#7

@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.


#8

Can anyone help with this?


#9

Here’s how to ask for help


#10

https://preview.webflow.com/preview/appcues?preview=e3300aac6b702d0a6f959060bdabb99f


#11

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?

Thanks


#12

@Blaise_Posmyouck Thanks for your help. See screenshot.


#13

What about published link and screenshot of console?


#14

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:

Appcues

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

Best


#16

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


#17

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


#18

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.