Push visitor location, device and browser data into the GTM data layer — available as variables in every tag and trigger.
Google Tag Manager is powerful for managing marketing and analytics tags — but it has no built-in access to visitor location or device data. Without an external data source, you cannot fire a tag only for visitors from a specific country, personalise ad campaigns by region, or pass location context to analytics platforms. Server-side solutions are complex; client-side alternatives require custom code that bypasses GTM entirely.
The VisitorAPI GTM Custom Template is installed directly from the Google Tag Manager Template Gallery. Once configured with your project ID, it fires on page load, fetches visitor data, and pushes it into the data layer under the visitor-api-success event. From there, you create Data Layer Variables in GTM to map each field to a usable variable.
visitorApiCountryCode, visitorApiCity, and visitorApiBrowserSelect the option that fits your stack — each links to full documentation and setup instructions.
Start using VisitorAPI today and enhance your website with intelligent visitor detection.