Render Better provides code for Shopify themes to help with the integration between Render Better and Shopify and to make it easier to control Render Better from within Shopify. During the onboarding to Render Better, the below code changes should be made to a Shopify theme before launching a Shopify site on Render Better.
Why is the support code needed?
During the installation of Render Better, your website’s primary domain is pointed at Render Better and a subdomain is created to point directly at Shopify. The subdomain is needed to pull the website content for Render Better to optimize (the HTML, CSS, JavaScript, images, etc.) and to redirect visitors to when they go to checkout (Shopify does not allow Render Better to sit in front of Shopify’s checkout page). Typically, that subdomain is a shop subdomain on your domain, such as shop.your-shopify-store.com
, that is set up during your onboarding.
Provided the two domain set up, the Shopify theme support code is meant to ensure…
- … visitors don’t accidentally end up on that Shopify subdomain directly
- … cookies are properly shared between the Render Better site and the Shopify subdomain
- … search engines don’t index the Shopify subdomain
In addition to the above, the theme support code makes it easy to enable or disable Render Better and change a few of it’s settings through the Shopify Theme Customizer.
Steps to install the support code
Before you get started, it’s important understand the two domains needed by Render Better that have been set up for your site (as explained above) since they will need to be replaced in the code we provide in our support code installation instructions below.
Typically, these two domains will be:
- Render Better Domain
- Typically www.<domain>.com or <domain>.com
- This is the domain that Render Better will be optimizing and where visitors will be sent
- Shopify Subdomain
- Typically shop.<domain>.com
- This is the the Shopify subdomain, where visitors will be sent to checkout. Render Better will make sure visitors that aren’t currently checking out are sent to the Render Better domain.
Toggle each of the steps below and follow the directions provided to implement Render Better’s support code.
snippets/renderbetter-support.liquid
layouts/theme.liquid
canonical
link tagtemplates/robots.txt.liquid
codeconfig/settings_schema.json
codeAnd you’re done! If you have questions, please reach out to success@renderbetter.com
.