How to implement your script

To use any of our products you need to add a small snippet of code on your website. This guide will show you were to find it, how to implement it, advanced options and how to debug it.

You will get your script in a separate e-mail when you first sign up, or you can find it by going to your data source settings and select "Script" in the left side menu.

The code consists of a single HTML script tag that is unique and only works on your website. This tag will fetch and run JavaScript from Extellio’s server in order to show surveys and track visitors if you use that web analytics.

The JavaScript is designed to not interfere with your other resources and will not delay page load if implemented correctly.

Extellio uses cookies that you might have to disclose to your visitors. Check out our cookie guide to see which cookies Extellio uses and how Extellio handles your data

Important! If your website uses Content Security Policy (CSP) you need to add our domain to the allowed sources. The easiest way is to add *.extellio.com to the “default-src” policy which will allow all types of content from our domain. If you want more fine-grained control of what is allowed you can add these policies.

Required for script to work: “script-src” script.extellio.com

Non-pop up surveys: “frame-src” survey.extellio.com

Analytics: “script-src” m.extellio.com

Analytics: “connect-src”: m.extellio.com

Tag manager: "script-src" matomo.extellio.com 

Tag manager: "base-uri" matomo.extellio.com m.extellio.com

Implementation with Google Tag Manager

If your website uses Google Tag Manager follow these instructions.

Add a new tag named “Extellio”, with tag type “Custom HTML”. Insert your Extellio script as the HTML content. The tag should be triggered as late as possible so a “Window loaded” trigger is optimal but the default “All pages” page view trigger is also fine. The tag should trigger on all pages, any custom URL targeting is configured in the Extellio platform. Save and publish your tag.

google tag manager*Note: The script in the image above is an example only. You will get your script in a separate e-mail.

Implementation directly on site

If you don’t use Google Tag Manager or have other reasons to add the script directly to your website follow these instructions.

Add your Extellio script as close as possible to the closing body-tag on your page. Usually in a footer or similar content that is at the end of the page. The script should be added on all pages of the website.

 <script async src="https://script.extellio.com/example.min.js"></script>

</body>

</html>

*Note: The script in the image above is an example only. You will get your script in a separate e-mail.

Advanced usage

If you want to control when the script runs (shows surveys and collects information about the visitor) you can load it with the parameter “autoStart” set to “false” ( https://script.extellio.com/example.min.js?autoStart=false ). This will load the script and any other features but will not track anything or set any cookies until it’s started.

The script exposes a public variable called “extellio” with some methods.

  • start – Starts the script (time tracking, page views, surveys).
  • Stop – Stops all surveys and tracking.
  • isStarted – Information if its running

For example, you can start the script by running “extellio.start()” in the javascript console.

Debug mode

You can check the implementation of the script by using the debug mode. You enter the debug mode by adding the query parameter "extellio_debug=true" to the URL where you want to check the implementation. E.g. you enter the debug mode for the URL www.example.com by entering www.example.com/?extellio_debug=true. A blue bar that indicates script status will show up at the bottom of the screen.

From the debug bar you can start and stop the script and preview any distribution for the website, even before they are active.

Support

If you need help with or have any problems implementing the script please contact customersuccess@extellio.com