How can I redirect to a specific page after customer fills out Email Signup form?
This can be done by using the return_to parameter https://shopify.dev/docs/api/liquid/tags/form#form-parameters if your theme uses shopify own form.
Also possible that form submission is handled by JS in which case it may be necessary to modify the JS code.
But hard to tell without seeing.
Where should I add this code?
For example the email sign-up is in a specific page called “opt-in”, do I add it in the .json or in theme.liquid?
You should look at relevant .liquid, find a {% form … %} tag and add this parameter.
Sometimes themes do not use Liquid {% form … %} tag, but output HTML <form …> tag instead, in this case you can add it like so:
Thank you but it is still not working. I added it in email-signup-banner.liquid.
Maybe I’ll just stick with Klaviyo