Skip to content

The Tracking Script

View MD

After you sign up for Luigi’s Box, you will receive a unique tracking script. This script activates Luigi’s Box services, including Analytics, Autocomplete, Search, Product Listing, and Recommender.

Example:

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

Each tracking script is unique to a specific domain. Do not use the same script across different domains. Doing so will merge data from multiple sites into a single view, making analysis difficult. If you manage multiple domains, please contact us for separate tracking scripts.

Section titled “Option 1: Direct HTML injection (recommended)”

Locate your website’s main layout or header file. This file is typically responsible for the global header across all pages (e.g., header.php, theme.liquid, or head.phtml).

Paste the script tag anywhere between the opening <head> and closing </head> tags.

Example:

<!DOCTYPE html>
<html>
<head>
<script async src="https://scripts.luigisbox.tech/LBX-123.js"></script>
</head>
<body></body>
</html>

If you cannot modify the HTML directly, you may use Google Tag Manager.

You can refer to this step-by-step guide for GTM integration.

If your website enforces a Content Security Policy, add the following rules to allow Luigi’s Box services to communicate with your site:

CSP DirectiveRequired Values
connect-srchttps://api.luigisbox.tech https://live.luigisbox.tech https://app.luigisbox.tech
script-srchttps://scripts.luigisbox.tech https://cdn.luigisbox.tech
style-srchttps://cdn.luigisbox.tech