{"webLayers":[],"experiments":[],"constantManagedTags":[],"vars":{"data":[{"id":"66bcf15a103c8784611d3863","name":"Country (broken)","variable":{"type":"custom_function","custom_function":{"body":"fetch('https://www.selkirk.com/browsing_context_suggestions.json')\n    .then(response =\u003e {\n        if (!response.ok) {\n            throw new Error('Network response was not ok ' + response.statusText);\n        }\n        return response.json();\n    })\n    .then(data =\u003e {\n        console.log('data: ', data);\n        if (data.detected_values \u0026\u0026 data.detected_values.country \u0026\u0026 data.detected_values.country.handle) {\n            console.log('Country Handle:', data.detected_values.country.handle);\n            return data.detected_values.country.handle;  // Return the country handle\n        } else {\n            console.error('Country handle not found in the response.');\n            return null;\n        }\n    })\n    .catch(error =\u003e {\n        console.error('There was a problem with the fetch operation:', error);\n        return null;\n    });"}}},{"id":"66be5be8bc9085764de71c28","name":"Shopify.country","variable":{"type":"custom_function","custom_function":{"body":"return Shopify.country"}}},{"id":"66be5de8b53cabf1938fe933","name":"Country","variable":{"type":"custom_function","custom_function":{"body":"return window.userCountry;"}}}]}}