DTM - How to use Client IP address as a rule condition



I'd like to know how to use the client's IP address as a rule condition in DTM.  I'd like to be able to include or exclude based on IP address using regular expressions for matching.  Is there a clean way to do this? 




Accepted Solutions (1)

Accepted Solutions (1)




Unfortunately IP address is not exposed directly in the browser via HTML/Javascript for security reasons. The only way that DTM could use IP address is if your site actually set the user's IP address in a Javascript variable on every page, or if you used an AJAX call to an outside server to get this information.  The latter of these is not the preferred option given that it adds additional latency to the processing of your DTM rules (because it has to wait for the remote server to respond), but on the plus side it is something that you would be able to implement and try out without involving your IT department to update the code on the page.

Here's a link to check out with some ideas on how this might be done (note that this is an external site so none of the code has been vetted/tested by Adobe):

Hope this helps!


Answers (0)