Track Device Type on Website

Looking for Code Sample for what should be a simple solution.......

When someone comes to my website, I want to know what type of device they are on (For example: PC, Smartphone, or Tablet)

I do NOT need really detailed specifics ( For example, I do not need to know if it is Android or Apple)

I would like to quickly identify the device and then store that info in my database for reporting at a later time.

Website is ASP using SQL Server and running on IIS 7.

Thanks - D
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rainer JeschorCommented:
I would suggest the following way:
- Use WURFL.js to detect the device (type) on the client side
- Call a web page passing the type information asynchronously - that page can then write to the database

Assuming that you are really on classic ASP and NOT on ASP.NET (because you added that topic as well).

Just my 2ct

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave BaldwinFixer of ProblemsCommented:
what should be a simple solution
Well... it's not though we all wish it was.  Devices are identified by their "user agent strings".  There are well over 100 for Safari variations on the Apple products including computers, tablets, and phones.  This site lists over 100,000 different user agent strings you might see.  Note that there are more 'bots' than anything else.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.