Need to install a service worker in the root dierctory

I have the code written and its been tested but in order to use it in the https I need to install it in the root directory of my website… its in javascript btw, I am not familiar with WIX coding structure enough to feel confident and am looking for someone to give me a nice step by step walkthrough to properly place this code. Thanks

1 Like

Hi Michele,

It is not possible to upload files directly to the root directory of your Wix site.
These files are generated and managed automatically by Wix.

To learn more about Wix Code please see below

is this still the case? there are lead generation tools like subscribers.com that i can’t use if i can’t upload to the root directory.

Please advise, thank you.

This is an old post from 2018 and as Ido has said, you can’t get to the root of your Wix site.

You can however, add your html code from a third party to a new custom tool in Tracking and Analytics that you can put in your head, body or end section.
https://support.wix.com/en/article/embedding-custom-code-to-your-site
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site

Or, if the third party has a API (preferably REST), then you can expose your Wix site to their API.
https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api
https://www.wix.com/corvid/reference/wix-http-functions.html
https://support.wix.com/en/article/corvid-exposing-a-site-api-with-http-functions
Example:
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-myapi-and-myapiclient

Finally, check third parties own websites, like with Subscribers.com
https://subscribers.freshdesk.com/support/home
It is amazing what you can find there already…
https://subscribers.freshdesk.com/support/solutions/articles/35000119671-wix-installation

Please add a new post if you still require help with this issue