Scroll to top

Install Canecto on a Drupal site

You can implement your Canecto script in a few simple steps. The Canecto script is made as Javascript and it will have to be implemented the say way as you would with similar Javasripts in your Drupal set up.

This guide will tell you how to do it in a few steps.

The two Step installation guide

Step 1: Open your welcome email

In your welcome mail from us, you will find your sites unique script. It looks like this:

<!– BEGIN Canecto Analytics –>

<script>

document.canecto = { id: {{ site_id }} };

</script>

<script async src=”https://resource.canecto.info/analytics.js”></script>

<!– END Canecto Analytics —>

You must copy the text from you email, so you can paste it into the right place in Drupal. Please DO NO paste the above text into your WordPress site as it is only an example and will not work on your site.

Step 2: Implement the script

Drupal 7

Please follow the procedures as recommended by Drupal on this page:

https://www.drupal.org/docs/7/api/javascript-api/managing-javascript-in-drupal-7

We recommend that you use “Method 1”.

Drupal 8

The set up in Drupal 8 is different from Drupal 7, so we recommend that you follow the procedures as described in the article from Drupal:
 https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module

Next steps

Canecto starts the learning process as soon as soon as you have installed the script. When the algorithms have learned enough about your user’s behaviour, you will be able to log in to Canecto. You will receive a mail when your insights are ready. It takes on average seven days for the system to get the learning it needs.