Hey @paulson1 ,
Yes, you can also achieve this using Shopify Forms instead of Klaviyo. Shopify Forms can be customized to trigger on specific actions like a button or link click, though it requires a few steps to ensure the form is shown only when the user clicks the link. Here’s how:
Follow These Steps:
- Create or Select a Shopify Form:
-In your Shopify admin, go to Marketing > Shopify Form and either create a new form or select an existing one.
-Ensure the form is set up as a popup rather than an embedded form.
- Set Display Option:
-Configure the form’s display rules to show only on custom triggers or actions, if available.
-Some themes or apps might offer the ability to restrict the form to show only when manually triggered.
- Insert JavaScript for the Trigger:
-To trigger the form via a click on a specific link, you’ll need to use a custom JavaScript snippet in your theme. Add the following code to your theme, usually in the theme.liquid or a JavaScript file that’s globally loaded on your site.
-Here’s a sample code snippet:
Click here to sign up!
- Finding the Form’s ID or Method:
-Shopify Forms doesn’t always expose a simple form ID. Depending on your form setup, you may need to inspect the form’s code to find the right trigger method.
-If your theme or form app provides a custom trigger function (like Shopify.Form.popup.open() ), use that to open the form on demand. This approach may vary depending on the specific theme and form integration.
-Preview your changes on the storefront and test the form popup on the link click. Confirm it displays only when triggered by the link.
Thanks