News

Latest News, Updates, Tutorials and much more

Latest news

worldlanguages

Today we are happy to introduce translations - one of the most requested functionalities for Cookie-Script. From now on you can translate single Cookie-Script item to many languages and cookie popup will be shown in proper language automatically. 

You can find all translations for current item in the Translations tab

How website language is detected? 

There are few ways you can set up Cookie-Script to detect currently selected website language: 

1 Disabled: do not use translations

2 Auto detect language: try to detect language with HTML tag and if that fails, try to detect language with current webpage URL.

3 HTML tag only: This is most common option. Usually website has currently selected language written in HTML tag, which makes it usefull for any automated software to detect website language. HTML tag is a top parent element for all other elements on the page.

Example: 

<html lang="it">

4 Website URL only: Current page link is analyzed for any existing languages, Translation is applied if language code is found in the link. 

Example:

https://example.com/it/somepage.html

would trigger Italian translation since page URL contains /it/

How do I add new translations?

Adding new translations is pretty straight forward, just click + Add translation button, choose translation language and fill in all the translatable fields. You can add many translations to same item. If some languages are not needed, you can delete them with Delete translation button.

Note: If user agreed to cookie usage in one language, his choice will be remembered in other language.
Note: In case certain translation string is not available in translation, original (non translated) text will be used.

In order to add Cookies-Script (or any other custom code) to wix.com you must have Premium membership on wix.com
Adding a Cookie-Script snippet to wix.com is possible only via HTTPS protocol.

To add your Cookie-Script snippet to your wix.com site:

1 Go to Settings in your wix.com site's dashboard.
2 Click the Tracking & Analytics tab under Advanced Settings.

wix menu
3 Click + New Tool and select Custom from the dropdown.
4 Copy your Cookie-Script code (it should be HTTPS protocol)

Screenshot 2hiuhiu5
5 Paste copied Cookie-Script snippet as shown below 

Screenshot 25HIU

6 Click Apply.

How to add a Cookie-Script snippet to wix.com via "Google Tag Manager"

It is assumed that you have already had experience with GTM and your GTM account is created, also you created a website container in GTM and added the GTM container snippet to your website as required: https://support.google.com/tagmanager/answer/6103696.

1 Go to Settings in your wix.com site's dashboard.
2 Click the Tracking & Analytics tab under Advanced Settings
3 Click + New Tool and select Google Tag Manager from the dropdown.
4 Enter GTM Container ID:
5 Click Apply.

To make your job with Cookie-Script snippet easier and more enjoyable we have created a WordPress plugin. All you need to do is install and follow instructions:

1 Download plugin from https://wordpress.org/plugins/cookie-script-com/ or find it in your Wordpress dashboard: click on Plugins > Add New. Then type your “Cookie Script” into the search box on the top right and then click Install Now

1

2 Go to the Plugins Search “Cookie-Script” and click Activate

2

3 Go to the Plugins again, and click Settings under “Cookie-Script.com”

3

4 Finally, you have to copy-paste Item ID from your Cookie-Script.com account. Do not forget to pick Script Type (HTTP,HTTPS or HTTPS + GEO Targeting)

4

You can easily install Cookie-Script via Google Tag Manager (GTM) by following these step-by-step instructions.

It is assumed that you have already had experience with GTM and your GTM account is created, also you created a website container in GTM and added the GTM container snippet to your website as required: https://support.google.com/tagmanager/answer/6103696.

Implementing the Cookie-Script popup box in GTM

In your GTM Workspace create a new tag by clicking New tag > Custom HTML Tag. In the HTML field, insert Cookie-Script code copied from your item. Code should look similar to the one below:

<!--Start Cookie Script--> 
<script type="text/javascript" charset="UTF-8"
src="http://chs03.cookie-script.com/s/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js">
</script> <!--End Cookie Script-->

Next, click Add trigger choose DOM Ready and apply a name to your tag.

Your final tag configuration window should look like this. (unique number of .js file have been changed ):

cookie code

In the end, click "Publish" to apply your changes to your website.

That is all.