Hey guys,
This is probably super simple, but it's late at night here and I've spent waay too much time trying to figure this out.
Looking to callout a users handset and OS. It was suggested that this is easily done with handsetdetection.com.
I've placed the javascript code on my lp:
<script type='text/javascript' src='http://api.handsetdetection.com/sites/js/MY_CODE.js'></script>
Now how would I actually call out the variables on the LP?
If I click on the .js it looks like there are variables like:
model : "",
os : "",
formfactor : "unknown"
Tried echo $model
echo $formfactor
But those just printed "echo $model"
Any ideas?
Here is the email that I got from Richard at handsetdetection on how to set it up:
1) Signup at www.handsetdetection.com & Login
2) Create a website profile with no redirection rules.
3) Grab the basic Express (javascript) snippet to paste into the <head> section of your web page. It'll look like this
<script type='text/javascript' src='https://localhost/sites/js/xxx.js'></script>
where xxx is your site id.
4) Access the information via the HandsetDeteciton object. Like this
<script>alert(HandsetDetection.vendor + " " + HandsetDetection.model);</script>
Use jQuery or javascript to put the vendor and model into your webpage.
Hope that helps.
Cheers
Richard
Thank You Sir
Awesome, this looks very useful
will give it a try
Been getting this added to my pages this week with even more variables to call out
Thanks! Just to add a bit to this:
<span style="text-transform: capitalize;"><script>document.write(HandsetDetecti on.model);</script></span>
will capitalize the first letter of the Phone
Loving this so far
the enterprise plan with 3.2m hits is a bargain. I would advise fellow IMers to analyse the variables youre detecting in handsetdetections interface and if you see any rogue entries like "unavailable" or "generic" write a few lines of javascript to swap these out for more fitting phrases. You dont want your landing page saying "congratulations Unavailable user" 
I actually havnt noticed a major difference from calling out the handset, i was expecting pretty big differences
The handset is usually just a random letter/number combination which many people may not even know is their phone. I find vendor makes more of an impression. Just my 2 british pence
(so about 3c)