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
.
On the next page find the Cart based widgets
and decide which one you want to use.
2. Copy the Shopify Script Tag
Once you have decided on your badge, select Shopify Script Tag
Next you will need to decide whether or not to activate the pop-up then the widget is clicked.
Now you are ready to copy your script tag.
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
Type in Cart
into the files filter and click on the cart-drawer.liquid
under either Snippets or Sections.
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 Script Tag you copied in step 2 above or below it.
Click Save
and you should now be able to see your badge inside your cart drawer above or below the checkout button!
Updated on: 31/03/2025
Thank you!