I’ve successfully implemented custom pixels for GTM, GA4 and server-side integration on my Shopify store. Now I’m looking to capture the site’s country (locale) within these custom pixels.
I’ve reviewed the documentation but haven’t found any specific guidance on how to capture the site’s country. Has anyone here managed to do this? If so, could you please share the steps or code snippets that you used?
Any help or insights would be greatly appreciated!
Thanks for the detailed response!
However, my requirement is a bit different. I’m already capturing the user’s country via server-side using the request header called X-Appengine-Country. What I need is to capture the site’s country which is different from the user’s country.
For example, if my Shopify store is set to a specific locale (e.g., de-de, de-at), I want to capture this site-specific locale information within my custom pixels.
Could you please provide guidance on how to capture the site’s locale?