LBX script

When you sign up for Luigi's Box you will receive a tracking script in the format as shown below.

<script async src="https://scripts.luigisbox.com/LBX-123.js"></script>

This is the master Luigi's Box script which allows us to activate Luigi's Box services. By default it contains code that will start to collect rudimentary analytics data. Upon your consent we can use this script to start tracking full analytics events and to integrate autocomplete, search, recommender, product listing or any other Luigi's Box service.

The tracking script is unique for your domain. You should not use the same script for different domains; if you do, your data will get mixed into a single view inside Luigi's Box, making any relevant analysis very difficult. If you want to track different domains, contact us for separate tracking scripts.

Do you need to include this script? Unless you plan to integrate 100% using API including the analytics, then the answer is yes.

Inside <head> element

We recommend that you insert the script tag inside the <head> element in your HTML code. Note, that the script is marked as async and thus will not impact your page load speed.

Google Tag Manager integration

If you are unable to insert the script tag directly into your HTML, you can use Google Tag Manager. Tracking script you insert into your HTML is the same you would use with Google Tag Manager, however using Google Tag Manager will impact the data collection process and some advanced features (e.g., fixit rules) will appear to be working slowly. We recommend that you always insert the script to <head> element for full experience.

Note that adblockers block GTM and in effect block all scripts that are included via GTM. If you include Luigi's Box master script via GTM, for a portion of your users the Luigi's Box script will be blocked by adblockers.

Content Security Policy

If your website is using Content Security Policy, you need to add following rules.

CSP directive Value
connect-src https://api.luigisbox.com https://live.luigisbox.com https://app.luigisbox.com
script-src https://scripts.luigisbox.com https://cdn.luigisbox.com
style-src https://cdn.luigisbox.com