on 06-27-2023 10:32 AM
The Invoca tag currently does not have built-in support for capturing a user's IP address as marketing data attribution. To implement this functionality, customers should provide the following information:
By utilizing this information, custom code in the tag can be implemented to read the IP address from the specified data source and check if it is present in the list of blocked IP addresses. If the IP address matches one of the blocked addresses, the code can be set to prevent the Invoca tag from running accordingly.
// customers should provide the list for blocking and can maintain the list for future maintenance purposes. var IP_BLOCK_LIST = ['ip1', 'ip2']; // customer should provide the data source to read a user's IP address. In this example, it reads from the window object. var userIp = window.ipAddress; Invoca.Client.isUserBlockList = function () { return IP_BLOCK_LIST.includes(userIp) } // set autoRun as true if a user is not a block list. options.autoRun = !Invoca.Client.isUserBlockList()