Ready for the new Google Consent Mode v2?

Starting from March 13, 2024 you have to use Google Consent Mode v2 to comply with the latest regulations

×
Latest News, Updates, Tutorials and much more

Blog

Hero

Download and Host JavaScript Files

Sometimes it is faster and more reliable to store JavaScript files on your own server, usually same place as the website itself. This also allows web developers to edit JavaScript files directly and make changes on the fly.

For this purpose, we have created an option to download your generated JavaScript files, edit them and host them on your servers.

How to download a JavaScript file?

You can download the JS file from your banner page. Just go to the Install tab and find a section called "Download and host banner yourself".

Click on the Download JavaScript file button and the file will start downloading.

download

How to upload a file to your server?

You can upload files to any folder on your website or to a root of web directory. This can be done using an FTP client or any other method you use to upload files.

How to use files on your website?

Once you upload the file to your server, you can include it on your website. You can include the JS file in the header or just before closing the </body> tag. Here is an example of how to include JavaScript files to your website:

<script type="text/javascript" src="/903e0d0491c903e0d0491c903e0d0491c.js"></script>

If the file is placed in the root website directory. Change the file name to the one you have uploaded. Or:

<script type="text/javascript" src="/includes/903e0d0491c903e0d0491c903e0d0491c.js"></script>

If the file is placed in the “includes” directory.

You can change the file name to your own if you need.

Note that if you decide to download and host a JavaScript file yourself, it can’t be updated automatically by CookieScript  anymore. This means that no changes to Cookie Script items (ex. pop-up title, description, or custom colors) will take effect by themselves. To apply new changes, you have to re-download the JavaScript file and re-upload it on your server.

New to CookieScript?

CookieScript helps to make the website ePrivacy and GDPR compliant.

We have all the necessary tools to comply with the latest privacy policy regulations: third-party script management, consent recording, monthly website scans, automatic cookie categorization, cookie declaration automatic update, translations to 34 languages, and much more.