Add a product to the cart when a CTA is clicked (Shopify)

Lisa Fockens Updated by Lisa Fockens

On Shopify, we can add an item in the cart by redirecting the user to a given URL.

Prepare the URL

Let's first prepare the URL to add the item. You must find the variant ID to add to the cart. Follow the Shopify documentation to find a variant ID.

Assuming that the variant ID is 42, the URL should be:


Or if you want to add more than one of this product to the cart:


Configure the CTA

You can then create the button in your campaign. Choose the action "Load new page", and use the URL you prepared previously:

When a visitor clicks the CTA, the product is added to their cart and they're redirected to the cart page.

Don't hesitate to contact our support if you have any questions.

Add Custom Validation to Your Signup Forms

Collect the UTM parameters when a popup form is submitted