When I export leads, I want to know who is an Android user, who’s an iPhone user, etc.
That’s a great idea, will add that one to our suggestions list.
In the meantime, this is a bit of a hack, but you could…
- Add a hidden field to your forms and name it “user agent”.
- Add the following script to your page using our Scripts tool (place it “After Body Tag”):
https://raw.github.com/gist/2285441/2…
You should now get the browser/OS for each lead submitted. You can tweak the code near the bottom if you’d like to change what gets captured. Note that Android phones will show up as “Linux/Mozilla”.
Really hope that helps until we can get something into the product.
It works! 🙂
Hi, the link to the script on github doesn’t work. Could you re-post the link?
Hi Mark, and anyone else reading this Ð
We’re not exactly sure what happened to Carl’s script, but try this: https://gist.github.com/markwainwrigh…
It’ll place the lead’s user-agent string in a hidden field. This string gives you information on what browser and operating system the visitor is using, as well as the version of each.
Here’s an updated script for anyone else looking to achieve this functionality:
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('input#user_agent').value = navigator.userAgent;
});
</script>
Hi Jess,
Should I name the Hidden Field “user_agent” then as per your script ? or still “user agent” ?
Thanks
David
Reply
Log in to the Unbounce Community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.