> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.getgreenspark.com/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).

# How to display the Greenspark badge using Script Tags

In this article we will cover how to add the cart badge to your Shopify cart drawer.

# 1. Decide which Greenspark badge you want to add to your cart drawer

Within your Greenspark dashboard head to `Engagement Hub` -> `Badges & Widgets`.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/script-tag_1cnbpmq.png)

On the next page filter by `Cart` to and decide which one you want to use.

![](https://storage.crisp.chat/users/helpdesk/website/-/3/f/a/0/3fa02643ae649600/customer-cart-contirbution-5_1rv7bgo.png)

# 2. Copy the Shopify Script Tag

Once you have decided on your badge, select `Shopify Script Tag`

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/script-tag-3_13ps4pj.png)

Next you will need to decide whether or not to activate the pop-up then the widget is clicked.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/script-tag-4_15immlz.png)

|| The pop-up displays your overall impact and gives additional insights into the supported projects. An example is displayed below.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/water_hva92s.jpg)

Now you are ready to copy your script tag.

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/script-tag-5_amjgzr.png)

# 3. Add the Script Tag to your Shopify store

First choose the theme where you want to add the cart badge and click on `Edit code`

![](https://storage.crisp.chat/users/helpdesk/website/3fa02643ae649600/script-tag-6_3nv9yc.png)

Type in `Theme` into the files filter and click on the `theme.liquid` file.

![](https://storage.crisp.chat/users/helpdesk/website/-/3/f/a/0/3fa02643ae649600/script-tag-10_l5mk0w.png)

You can add the Script Tag anywhere in the `<head> </head>` section of the file. Paste the Script Tag you copied in step 2 above.

![](https://storage.crisp.chat/users/helpdesk/website/-/3/f/a/0/3fa02643ae649600/script-tag-11_fupgt7.png)


|| You always only need to add this script tag to your stores <head> </head> no matter how many widgets you are adding.

# 4. Add the widget to your cart drawer

Back in the Greenspark platform, copy the widget div tag.

![](https://storage.crisp.chat/users/helpdesk/website/-/3/f/a/0/3fa02643ae649600/script-tag-13_pj3hs1.png)

Then within your Shopify code editor type in `Cart` into the search and click on the `cart-drawer.liquid` under either Snippets or Sections.

![](https://storage.crisp.chat/users/helpdesk/website/-/3/f/a/0/3fa02643ae649600/script-tag-12_1dst9n9.png)

You can add the badge anywhere in the cart, but we recommend either above or below the checkout button. To quickly find this, click anywhere into your opened `cart-drawer.liquid` and then hit `command + F` to open the file search. Type `Button` into the search to find the correct button where you want to add the badge and paste the HTML tag you copied.

![](https://storage.crisp.chat/users/helpdesk/website/-/3/f/a/0/3fa02643ae649600/script-tag-14_1l05ad7.png)

Click `Save` and you should now be able to see your badge inside your cart drawer above or below the checkout button!

![](https://storage.crisp.chat/users/helpdesk/website/-/3/f/a/0/3fa02643ae649600/script-tag-15_14rdzpn.png)

