sheema
November 30, 2023, 8:40am
2
Hey @josh you can use both depending on what you are trying to achieve. Using window will help you if you are using web components or Shopify. Otherwise you can go ahead with state.
You can take a look at our docs and other forum posts for the reference:
If your page design is different for logged-in users, return visitors, query params, etc., here is a solution you'll to render those elements on the client.
When you're working on Pages, Sections, or Data previewing your content with working targeting and custom fields can help you understand exactly how your work will render when you publish. | Ship faster with less back-and-forth. Builder connects...
Hello, @chinawoodshed , and welcome to the Builder Forum!
Builder is able to access the URL parameters through its ‘state’ object. Since you are working on a page that is connected to Shopify, you can’t edit the previewing URL in the Visual Editor. While making this, you may need to open the Live Preview option and manually add the parameter to the URL until you publish the page.
Example
Let’s say you have a URL parameter called “paidAd” which has a value of “someProduct”.
www.website.com/page…