> For the complete documentation index, see [llms.txt](https://mazingxr.gitbook.io/mazing-world/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mazingxr.gitbook.io/mazing-world/integration-shops/shopify.md).

# Shopify

How to shopify your script integration

## Step 1: Access Your Online Store Themes

Log in to your Shopify store and navigate to **Onlineshop > Themes** in the admin panel.

<figure><img src="https://3497237590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWzFDCBJYsAI1jsAj4WvF%2Fuploads%2FNnzY8sRNLmz6aFdvxQyk%2FScreenshot%202025-01-28%20192815.png?alt=media&amp;token=26c47587-aac6-4501-abdd-3b71f9ed160f" alt=""><figcaption><p>Click on Themes</p></figcaption></figure>

## Step 2: Edit your Code

Locate your **active theme** and click on the **three dots menu**. From the dropdown, select **Edit Code** to access the theme files.

<figure><img src="https://3497237590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWzFDCBJYsAI1jsAj4WvF%2Fuploads%2FN7Ze3DimL3wC0whXOvOB%2FBildschirmaufnahme2025-01-28193042-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=1d8a57ba-c40a-4712-b7e9-d4bfbd80a63f" alt=""><figcaption><p>Click on Edit code</p></figcaption></figure>

## Step 3: Add your mazing-integration script

* In the code editor, go to the **Assets** directory.
* Click on **Add a new asset** and create a new JavaScript file.\
  Name the file something like `mazing-integration.js`.
* In this new file, you can write your custom integration script.

{% hint style="info" %}
&#x20;You can find an example script here: [**Variant Integration Example**](/mazing-world/integration-types/gallery-integration.md).
{% endhint %}

<figure><img src="https://3497237590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWzFDCBJYsAI1jsAj4WvF%2Fuploads%2FLicrQ0jOK9VTMq9DMPxQ%2FScreenshot%202025-01-28%20192503.png?alt=media&amp;token=0aa49038-97fd-4d62-bfa0-cd311ea031b1" alt=""><figcaption><p>Add your custom mazing-integration script</p></figcaption></figure>

## Step 4: Integrate your script

Once your `mazing-integration.js` script is ready, you’ll need to integrate it into your Shopify theme by editing the `theme.liquid` file.

<figure><img src="https://3497237590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWzFDCBJYsAI1jsAj4WvF%2Fuploads%2FhVjrWKqu8aeL2m2xM248%2FScreenshot%202025-01-28%20192421.png?alt=media&amp;token=a337d596-b6ba-4c06-ab3d-c747b6953529" alt=""><figcaption><p>Open your theme.liquid file</p></figcaption></figure>

**Mazing CDN script**: Place this at the **end of the `<head>` element**.

<figure><img src="https://3497237590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWzFDCBJYsAI1jsAj4WvF%2Fuploads%2FTiT13QN5NazoC2nqJWva%2FScreenshot%202025-01-28%20192619.png?alt=media&amp;token=150f77f4-9b27-4384-af21-375e1e52de83" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

```
<!-- Add this to the <head> section -->
<script defer type="text/javascript" src="https://cdn.mazing.link/mzg-in.js"></script>
```

{% endhint %}

**Your `mazing-integration.js` script**: Place this at the **end of the `<body>` element**.

<figure><img src="https://3497237590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWzFDCBJYsAI1jsAj4WvF%2Fuploads%2FwWVCPB9zPGEk5W56D1C4%2FScreenshot%202025-01-28%20192550.png?alt=media&amp;token=a2d9f8f3-d319-4fd7-bc0e-bf955bf90306" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

```
<!-- Add this to the <body> section -->
<script defer type="module" src="{{ 'mazing-integration.js' | asset_url }}"></script>
```

{% endhint %}

#### 🎉 Congrats!

You’ve successfully integrated your own customized Mazing script into your Shopify store! 🚀

Your new script will now enhance your store with the desired functionality, providing a better experience for your customers.
