Add user_agent and ip_address

as title.
am I doing it in the right way?
thx.