Apply code to a button

Hey guys,

I am trying to integrate SnipCart on my website using these instructions but I can’t understand how to add this code to a button. Can somebody please help me?

Thanks!

<button class="snipcart-add-item"
  data-item-id="starry-night"
  data-item-price="79.99"
  data-item-url="/paintings/starry-night"
  data-item-description="High-quality replica of The Starry Night by the Dutch post-impressionist painter Vincent van Gogh."
  data-item-image="/assets/images/starry-night.jpg"
  data-item-name="The Starry Night">
  Add to cart
</button>

Hello,

When you clic on your button, at the right sidebar, you can insert custom attributes :

Or you can add a code widget and paste your code on it !

Just use the Snipcart Integration build in Blocs.
https://help.blocsapp.com/knowledge-base/interactions/

Try using the Code Widget. Just copying and paste your code into the widget.

I answered too quickly, @Jerry has the best/easyest solution!

Thanks very much for the help!