That script is likely calling multiple hostnames (one which advertises only an IPv6 address and/or another which only advertises an IPv4 and then correlating the responses. A visitor is only ever visiting your site using one or the other and not all visitors will have both.
No, I have interaction with 2 websites, but one it shows ipv4, other it shows ipv6 and it counts as different user. I want to detect both as whatismyip.com does.
I am not sure what you are asking. It will show different types of addresses, because the requests come in on different types of connections. Thats it and there is nothing you should or could do about that.
The reason is because, when I track visitor ip to database, and after when user installs the app,
in the app there is also tracker and the ips dont match sometimes because of this ip type peoblem. So what happens if I disable ipv6 ? it only shows ip4 yes ?