> ## 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).

# Manual script blocking guide

**Follow our manual script blocking guide to enhance privacy and compliance in your Shopify store. **

Learn how to effectively block scripts with step-by-step instructions.

### Introduction

While [auto-blocking](/en/article/about-automatic-blocking-d7jlzr/) is a quick and easy way to prevent cookies from being set, there are several reasons to want to consider manually marking up script tags to prevent them from setting cookies prior to consent.

Manually blocking cookies has a far lesser impact on store performance and will prevent cookies from being set even if the Pandectes GDPR Compliance scripts fail to load.

There are also situations where [auto-blocking](/en/article/about-automatic-blocking-d7jlzr/) is not a viable solution, as it impacts the store to an extent that requires so many adjustments that manually marking up becomes a lesser ordeal.

### Video guide

${youtube}[How to block scripts manually in Pandectes](cKaZxsRRb0s)

### Using the data-cookiecategory attribute

In order to block a script, the markup uses two parts. The disabler prevents the script tag from loading and the enabler allows Pandectes GDPR Compliance to enable this script tag if the appropriate consent has been given.

The steps to make it happen are the following and work the same for inline scripts and for external script tags.

1. Set the `type` to "javascript/blocked".
    As this tells the browser to regard the script as blocked javascript, this essentially **disables** the script.
2. Add the `data-cookiecategory` attribute and assign it one of these values: "functionality", "performance" or "targeting".
    This attribute defines the condition under which Pandectes GDPR Compliance needs to **enable** and load the script.

**An example of marking up a script:**
The following is a basic inline script that sets a cookie named email:

```javascript
<script type="text/javascript">
document.cookie = "email=johndoe@email.org; expires=Sun, 31 Dec 2023 12:00:00 UTC; path=/";
</script>
```

To mark up this script to require consent to cookies in the "functionality" category we make it like this:

```javascript
<script type="javascript/blocked" data-cookiecategory="functionality">
document.cookie = "email=johndoe@email.org; expires=Sun, 31 Dec 2023 12:00:00 UTC; path=/";
</script>
```

The category may be one of the following: “functionality”, “performance”, and “targeting”. Setting the right category will ensure that the script will be unblocked once the visitor consents to the specified category.

The following is a basic script that loads externally:

```javascript
<script type=”text/javascript” src=”https://domain.com/common.js”></script>
```

To mark up this script to require consent to cookies in the "functionality" category you need to do it like this:

```javascript
<script type="javascript/blocked" data-cookiecategory="functionality" src="https://domain.com/common.js"></script>
```
