Skip to content

Netro42/obfuscate_ip_js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obfuscate_ip_js

Get user IP using ipify.org with JSONp and then obfuscate results for use with analytics packages, where full IP addresses are considered to be identifiable data.

Code Example

window.obfuscated_ip = getObfuscatedUserIpAddress();

Will return '192.30.252.xxx' for example. Alternatively...

window.obfuscated_ip = getObfuscatedUserIpAddress("255.255.255.255");

Will return '255.255.255.xxx' and not fetch an IP from ipify.

Installation

<script src="/path/to/your/js/obfuscate_user_ip.min.js"></script>
<script>var obfuscated_user_ip = getObfuscatedUserIpAddress();</script>

Contributors

Please get in touch with @netro42 if you would like to contribute.

About

Get user IP with JSONp and then obfuscate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published