Script Weasel

Looking to find out what users are doing on your site, or problems your users are having ? All you need to do is set up the Weasel script.

How to install the Weasel script ?

Go to “Script Setup” (Configuration / Script Setup) and answer the quizzes.

Then click on “copy” and paste the script into your site.

Sample script

Here is an example of a script generated by Weasel Spark:

        id:"AV-CXPAMR4mHrpELMnsf", icon:"alwaysShown", resp:"responsive",
        bottomLeft:true, disableArrow: false,
        ignoredWeaselIdList: ["credit_card", "do_not_track_this_id"]

        var a=document.createElement("script");

        var b=document.getElementsByTagName("script");

Explanation of the script

Does that script strike you as mysterious? No problem.

Here is an explanation:

The wslParams attribute of Window gives the script the parameters chosen during the questionnaire:

  • id is the identifier of your site on weaselSpark.
  • icon is the Weasel icon that appears on your site.
  • resp means that your site is also used on tablet or mobile.
  • bottomLeft means that you want the icon at the bottom left or at the top right.
  • disableArrow means if you want a message to appear explaining the role of the icon during the first login of a user.

In addition, the function retrieves the weasel script that you will use.

The script is in javascript with the id “_weaseltracker”.

Sensitive domains

Weasel does not follow password Domains for privacy. If you do not want to look up a simpler domain and add the attribute ignore-weasel to your html tag.


<input type="text" id="credit_card" ignore-weasel="true">

You can also provide an ID list in the Weasel setting: ignoredWeaselIdList

    id:"AV-CXPAMR4mHrpELMnsf", icon:"alwaysShown", resp:"responsive", ignoredWeaselIdList: ["credit_card", "do_not_track_this_id"]

Configure your tags

You can configure your own tags to display hidden information in sessions simply by adding CustomAttribute (s) to the ‘wslCustom’ object of the window object.


window.wslCustom = {123: 'soleil', test1: '1', test2: '2'};

// setting a tag
window.wslCustom.myKey = 'myValue';

// deleting a tag
window.wslCustom.myKey = undefined;