I have been using the iper-famous plugin for WordPress Contact Form 7 for ages.
Among the less known features, you can trace IP address and user agent (what browser) of the sender of the message.
The syntax as today’s version is:
Remote IP: [_remote_ip]
User Agent: [_user_agent]