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

# 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.

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

![](https://raw.githubusercontent.com/govalo/docs-images/main/images/0a366ad8f5370d1d.png)

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

![](https://raw.githubusercontent.com/govalo/docs-images/main/images/ec2dae1d24c40d05.png)

3.  In the _theme.liquid_ file, before the _body_ tag, add the following code:
    

    <script> 
    window.addEventListener("gvlo:cart:add", function () {   
    
    	// Your code here 
    }); 
    
    </script>
    	

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

![](https://raw.githubusercontent.com/govalo/docs-images/main/images/e94c294f1f72acc7.png)

5.  **Save** the file when you're done editing.