Home > Paid Traffic Sources > Mobile

handsetdetection.com - How To Call Out The Users Handset (9)


01-08-2014 06:24 PM #1 ret39982 (Member)
handsetdetection.com - How To Call Out The Users Handset

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?


01-08-2014 06:41 PM #2 rollerkoaster (Member)

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


01-08-2014 07:23 PM #3 ret39982 (Member)

Thank You Sir


01-08-2014 08:04 PM #4 mykeyfocus (Member)

Awesome, this looks very useful will give it a try


01-08-2014 09:24 PM #5 stackman (Administrator)

Been getting this added to my pages this week with even more variables to call out


01-09-2014 09:48 PM #6 Adamw (AMC Alumnus)

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


02-07-2014 04:21 PM #7 mykeyfocus (Member)

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"


02-08-2014 06:48 PM #8 stackman (Administrator)

I actually havnt noticed a major difference from calling out the handset, i was expecting pretty big differences


02-08-2014 09:57 PM #9 mykeyfocus (Member)

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)


Home > Paid Traffic Sources > Mobile