Possible to use the IP address during a survey?

tgrayguytgrayguy New ZealandCommunity Member Qubie ✭

Possible to use the IP address during a survey?

Hi,

Is it possible to use the IP address while the survey is running? I tried ${e://Field/ipaddress} but this doesn't seem to refer to anything.

Thanks,
Thomas

Best Answers

Answers

  • t.bainbridget.bainbridge Community Member Qubie ✭

    @PraDeepKotian_Ugam

    I tried something that I think is equivalent to your solution through the 'web service' element in survey flow (see image). Unfortunately however, when I test it, records my IP as an amazon server in my country rather than my actual IP address. It seems to have something to do with this issue: https://github.com/rdegges/ipify-api/issues/19. I've tried similar services and had the same problem.

  • TomGTomG Raleigh, NCCommunity Member Wizard ✭✭✭✭✭
    edited October 2018

    @t.bainbridge - You can pipe ${loc://IPAddress}.

    The reason you get a server when you call the web service is because you are making the call from the Qualtrics server, so ipify.org is returning the IP of the server (they probably use Amazon cloud services).

  • tgrayguytgrayguy New ZealandCommunity Member Qubie ✭

    Yes, I also tried the web service option before realising, as @TomG points out, that it doesn't run client side.

    Just an additional note: the JavaScript solution works even when the IP address is not being saved (because Anonymize Response has been selected in the Survey Options). This is useful if you want to use the IP address in some way (looking up the country would be the obvious example) without storing it.

  • TomGTomG Raleigh, NCCommunity Member Wizard ✭✭✭✭✭
    edited October 2018

    @tgrayguy said:
    Just an additional note: the JavaScript solution works even when the IP address is not being saved (because Anonymize Response has been selected in the Survey Options). This is useful if you want to use the IP address in some way (looking up the country would be the obvious example) without storing it.

    GeoIP Location pipes (e.g., ${loc://IPAddress}) work regardless of whether Anonymize Response is turned on or not. The Anonymize Response setting only impacts what gets saved to the response data.

  • t.bainbridget.bainbridge Community Member Qubie ✭

    Thank you so much @TomG. I was looking for something like that, but couldn't find it anywhere. Works perfectly now.

Sign In to Comment