Introduction:It is not easy to create Unique Identification Number for the visitors who visiting your website or blog. Most of the web developers will use IP Address to identify the users and track them. They use the IP address for tracking return visitors and unique visitors etc. IP address of the user will change according to their network. So, We need something that create an Unique ID for each visitors who visits our website.
Demo Click here Download Click here
<script> var navigator_info = window.navigator; var screen_info = window.screen; var uid = navigator_info.mimeTypes.length; uid += navigator_info.userAgent.replace(/\D+/g, ''); uid += navigator_info.plugins.length; uid += screen_info.height || ''; uid += screen_info.width || ''; uid += screen_info.pixelDepth || ''; console.log(uid); document.write(uid); </script>The above script will generate UID and store it variable uid. The stored UID will be displayed using the "document.write(uid);". You can use the UID variable to store the Unique Identification Number to your database or cookie.
Suggested Articles for Webmasters:
- How to Create Website Layout Using Html Frameset.
- How to Find Difference Between Two Dates Using AngularJS.
- How to Run PHP Without Using Any Web Server.
- How to Send Realtime Push Notification to Website Using Pusher.