> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.pandectes.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Auto blocker Setup Guide

Enabling Auto Blocker inside our app's Auto Blocker Settings page makes it easy to use. By default, the Auto Blocker works through our app embed. This means that our app can block any script that you have selected, which loads either through an app that loads as an app embed or as an app pixel. 

If you manually load scripts on your `theme.liquid`, or use apps that don't load as app embed (legacy apps), follow the **Manual Setup** below. Also, if you load scripts from Google Tag Manager, we have a [guide here](https://help.pandectes.io/en/article/integration-with-google-tag-manager-official-pandectes-template-6dbjz/) on how to make it work with our GTM template.

If you encounter any problems with Auto Blocker (for example, you still see a script running even though is was selected to be blocked before consent is given), you can follow the **Manual Setup** of our Auto Blocker, as explained below. 

### 1. Manual Setup

The manual setup includes injecting our `pandectes-rules.js` script on top of your theme.

1. Inside Shopify Admin of your store, go to **Online Store > Themes > Edit code (on your current theme)**.
    
2. On the left side, under the **Layout** folder, open the **theme.liquid** file.
    
3. Just after the opening `<head>` tag, paste this:

```
<!-- Pandectes Rules Manual Setup -->
<script src="{{ 'pandectes-rules.js' | file_url }}"></script>
```

4. Click **Save**.

![](https://i.imgur.com/7VSuu50.gif)

### 2. Test Manual Setup

Follow the steps below to check if the `pandectes-rules.js` script is properly loaded on your Shopify store:

##### 2.1 Steps

1. **Open Your Shopify Store's Website**

Navigate to your live Shopify store where the script should be installed.

2. **Open Developer Tools**

On Google Chrome
     
* Right-click anywhere on the page and select **Inspect**.   
* Alternatively, press `Ctrl + Shift + I` (Windows) or `Cmd + Option + I` (Mac) to open Developer Tools.

3. **Navigate to the Console Tab**

Click on the **Console** tab within the Developer Tools panel. This is where JavaScript logs and errors will appear.

4. **Run the Following Snippet in the Console**
 
In the console, type the following code snippet and press **Enter**:

```javascript
const scriptPath = "files/pandectes-rules.js";
const scripts = Array.from(document.getElementsByTagName("script"));
const scriptLoaded = scripts.some(script => script.src.includes(scriptPath));

if (scriptLoaded) {
   console.log(`Pandectes Rules script is correctly loaded!`);
} else {
   console.log(`Pandectes Rules script is NOT loaded.`);
}

if (window.PandectesBlocker || window.PandectesRules) {
  console.log("Pandectes Blocker object is available!");
} else {
  console.log("Pandectes Blocker object is NOT available.");
}
```

5. **Interpret the Results**

If the script is correctly loaded, you will see the message:
     
```
Pandectes Rules script is correctly loaded!
```

If the script is not loaded, you will see the message:
     
```
Pandectes Rules script is NOT loaded.
```

If the `Pandectes Blocker` object is present, you will see:

```
Pandectes Blocker object is available!
```

If the `Pandectes Blocker` object is not available, you will see:

```
Pandectes Blocker object is NOT available.
```

##### 2.2 Additional Notes

* Ensure that the script is added after the opening `<head>` tag of your Shopify theme.
* If the script is not loaded, check your theme files for the correct script injection, especially if there are issues with the URL or timing of the script loading.

### 3. Need help?

If you still have issues with the Integrations of our app and you need any assistance, please reach out to our support team via live chat from inside the app or by email at support@pandectes.io