Adding custom events after the Gift Card is added to the cart

Congratulations on getting started with Govalo. Now it may be time to add some custom events to your add to cart script in order to make sure Govalo flows through your site and feels like it belongs! This can be great for things like triggering a slide-out cart rather than directing to the cart page, for instance.

Let's dig in.


Open the Online Store > Themes section of your Shopify Admin:


Use the drop-down on your current theme to select Edit Code:


In the theme.liquid file, before the body tag, add the following code:

window.addEventListener("gvlo:cart:add", function () {   

	// Your code here 


In the Govalo app, go to Configure > Advanced gift card configurations and add "?" to the Custom Redirect field:


Save the file when you're done editing.

Still need help? Contact Us Contact Us