Help with Geolocation Redirect Code in Pipeline Theme

Hi everyone,

I’m currently working on implementing a geolocation redirect for my Shopify store using the Pipeline theme. I want visitors from Toronto to be redirected to a specific Toronto content page, while users from other locations see the existing homepage.

Here’s the code I implemented in the theme.liquid file:


And heres the separate page template I created in templates/page.toronto.liquid:


{% layout 'page' %}

    
    

        
    

    
    
        # Welcome, Toronto Customers!
        

Explore exclusive offers available only in Toronto.

        
        
        [Order on UberEats](https://www.ubereats.com/ca/toronto)
    

I’ve replaced ‘/pages/your-toronto-page’ with the actual URL of my toronto page. However, the redirect doesn’t seem to be working as expected.

Has anyone encountered a similar issue or can anyone suggest what might be wrong with my code? I’d really appreciate any help or guidance!

Thank you!