Cozy Country Redirect: Redirection Speed Up Guide
Sometimes you might have noticed after you have enabled auto-redirection or confirmation on your store there comes a small delay before the redirection takes place or the popup/bar shows up. This is caused because the script created by our app is async in nature and therefore it loads after the store content is loaded. Usually, this doesn’t cause too much trouble but if it is too delayed for you, just follow this tutorial and it will be sped up in no time.
How to Speed Up Redirection?
Let’s proceed into this step-by-step:
Note: Make sure you make a copy of your theme.liquid before proceeding since we will be adding a new script into it
Log in to your Shopify store and navigate to Apps section. Launch the Cozy Country Redirect app from the list of apps. Once the app is open navigate to “Fix Slow Redirect” menu present at the top right of the app page.
After opening the “Fix Slow Redirect” menu you will be directed to an instruction page which will be containing a code snippet wrapped inside a selectable yellow container. This code snippet is the speed up script that needs to be added inside your theme.liquid file.
Remember: The code script generated is unique for each store. So if you have multiple stores make sure you log out of this one completely then follow Steps 1 and 2 again for your other store.
Once you have copied the code snippet as discussed in the previous step go back to your Shopify Admin Page. Navigate to Online Store>>Themes.
Click on the dropdown button titled “Actions” and select “Edit Code” option.
After clicking on “Edit Code” as instructed in the previous step you will open up the “Theme Code Editor”. Click on “theme.liquid” under the heading Layout in the left pane right beside the code. This will open the “theme.liquid” file for editing. If it’s already open it will become the active file instead.
Once the theme.liquid is opened/became active try finding the </title> tag. Refer to the below image for more details.
Note: If you are unable to find the </title> tag don’t worry because its not abnormal and actually possible. Some themes don’t have the <title></title> tags. If your theme comes in that category just skip forward to Step 6.
After you’ve found </title> tag, all you need to do is add a new line next to it and paste the code snippet you copied in Step 2 as shown in the image below:
Step 6 (Only for users with no </title> tags in their theme):
This step is only for users who were unable to find or didn’t have <title> tags in their theme.liquid.
Since you don’t have <title></title> tags in your theme you can place the code snippet before </head> tag. It would still work normally. And your theme will definitely have a </head> tag so if you are not finding it you need to try harder 😀
Following the above steps will help you increase the speed of redirection or the speed by which popup/bar loads. If you face any trouble feel free to contact us at email@example.com and kindly send a staff invite at the same email with access to themes and apps and we will help you out.