How can we help you?
Visitor API returns a JSON in the following format to the success handler function when it is called successfully. You can write your code in the handler function to personalize your web pages with the returned data.
When there is an error occurs, the API call will return an error code and an error message. The HTTP header is also set as the error code.
VisitorAPI does not require an API key because it’s designed to be used on the front-end, where API key can be exposed to the public and it is not a secure solution.
This document provides instructions on how to use VisitorAPI in React to detect a user’s location, currencies, languages and device info. The information will be stored in states to be used in your React application.
This article provides details on how to implement VisitorAPI in Google Tag Manager to trigger tags based on visitor data such as location and device.