# Javascript not appearing on hubspot webpage

**URL:** <https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059>\
**Category:** Blog, Website & Page Publishing\
**Tags:** free\
**Created:** [February 27, 2025, 8:52pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059 "2025-02-27T20:52:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anasser6](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Anasser6](https://community.hubspot.com/u/Anasser6)\
**Post date:** [February 27, 2025, 8:52pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/1 "2025-02-27T20:52:28Z")

</div>

I have followed the steps from this knowledge article: [Create and add a JavaScript file to HubSpot](https://knowledge.hubspot.com/design-manager/add-a-javascript-file-to-hubspot)  
- I created a Javascript file

- I copied the file’s public URL and added it to the specific web page’s Footer under the Advanced Settings \> Footer HTML, and formatted it as follows:  
\<!-- start Main.js Do Not Remove --\>  
\<script src=‘PATH URL PASTED HERE’\>\</script\>  
\<!---End Main.js--\>.  
I even tried pasting this under Settings \> Content \> Pages \> Site footer HTML for the domain I wanted but no luck. When I load the test page and view page source (using google chrome) I don’t see the javascript anywhere.  
Any ideas on what I’m missing?

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [February 28, 2025, 10:25am UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/2 "2025-02-28T10:25:41Z")

</div>

Hi @Anasser6 and welcome, it’s such a pleasure to see you here! 🎉  
Thank you for asking the HubSpot Community!  
Can you please share with us the URL of the page where you added the Javascript?  
I’d love to put you in touch with some of our Top Experts: Hi @stefen, [@Syeda\_Fatima](https://community.hubspot.com/t5/user/viewprofilepage/user-id/114957) and @jonchim do you have suggestions to help @Anasser6, please?  
Have a wonderful weekend and thanks so much! ❤  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![Anasser6](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Anasser6](https://community.hubspot.com/u/Anasser6)\
**Post date:** [February 28, 2025, 3:06pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/3 "2025-02-28T15:06:22Z")

</div>

Hi [@BérangèreL](https://community.hubspot.com/t5/user/viewprofilepage/user-id/230185),

Thank you for your message.  
The site URL is: [https://test-242118198.hubspotpagebuilder.net/test](https://test-242118198.hubspotpagebuilder.net/test)

---

<div class="post-metadata">

**Author:** ![jonchim](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jonchim/32/88818_2.png) [@jonchim](https://community.hubspot.com/u/jonchim)\
**Post date:** [February 28, 2025, 1:23pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/4 "2025-02-28T13:23:08Z")

</div>

Hi @Anasser6,  
You shouldn’t need the script tags if the javascript file you created lives in your theme folder  
it should look something like this {{ require\_js(get\_asset\_url(“../../js/NAME\_OF\_FILE.js”)) }}  
If you uploaded it to the file manager that you should be able to use script src=“URL”

---

<div class="post-metadata">

**Author:** ![Anasser6](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Anasser6](https://community.hubspot.com/u/Anasser6)\
**Post date:** [February 28, 2025, 3:16pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/5 "2025-02-28T15:16:50Z")

</div>

Hi @jonchim,

Thank you for your response. I’m not familiar with theme folders - when creating the javascript file I saved it in the root folder (see screenshot).  
Also, how would I reference the file path for the script you included? Would it be like this?  
{{ require\_js(get\_asset\_url(“FOLDER\_NAME/js/NAME\_OF\_FILE.js”)) }}

![Anasser6_0-1740755582516.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/1/114a52a4eaf01c41ca7f4df5eeaf887ed7fd0234.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![jonchim](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jonchim/32/88818_2.png) [@jonchim](https://community.hubspot.com/u/jonchim)\
**Post date:** [February 28, 2025, 3:38pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/6 "2025-02-28T15:38:45Z")

</div>

Hi @Anasser6,

If you’re using the default theme/base theme, in your theme folder, there should be a js folder which you can move the file in there.  
If it’s in the root folder try this code  
{{ require\_js(get\_asset\_url(“../../NAME\_OF\_FILE.js”)) }}

---

<div class="post-metadata">

**Author:** ![Anasser6](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Anasser6](https://community.hubspot.com/u/Anasser6)\
**Post date:** [February 28, 2025, 10:39pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/7 "2025-02-28T22:39:29Z")

</div>

Hi @jonchim,

I tried the code you mentioned but no luck. I also don’t see an option to move my file into any folder from my file settings - see screenshots. The only folder I see is the @hubspot folder - is this the default one you’re referring to? From within that folder the only subfolder that had a js folder was the cmsdefaultsystempages.

 ![Anasser6_2-1740782097582.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/e/7ebad8b73488462088a9fe03a3d483871089ed98.png)

 ![Anasser6_3-1740782187041.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/8/686cce915fcc59ed8769270696a81c3bc2c13730.jpeg)

---

<div class="post-metadata">

**Author:** ![jonchim](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jonchim/32/88818_2.png) [@jonchim](https://community.hubspot.com/u/jonchim)\
**Post date:** [March 3, 2025, 2:49pm UTC](https://community.hubspot.com/t/javascript-not-appearing-on-hubspot-webpage/127059/8 "2025-03-03T14:49:44Z")

</div>

hey @Anasser6, okay looks like you haven’t created/using a custom theme. I think best solution for you would be to navigate to file manager [https://app.hubspot.com/files/](https://app.hubspot.com/files/%7B%7B)YOUR PORTAL ID  
Drop the file in there, once you have that you can click on Copy URL  
and then in your page settings just use \<script src=“URL”\>\</script\>

 ![Screenshot 2025-03-03 at 9.48.37 AM.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/c/c6c5d93bebefac332bdfb79b89a2025535ced732.png)
