Develop a pure JS that is able to track, store and read data about users' browser version, device model and multiple other factors and match those to create a unique identifier and data should be pushed back google analytics or google sheets. As the user progresses to providing more data such as logging in and adding contact details, the script would match it to the fingerprint and increment new data.
Script will also have a function to match profiles across devices when user log's in i.e, if email id matches across different devices then combine the unique identifier into one.
Script will be implemented via Google tag manager.
To get started, provide examples of your previous work and how you would go about building this script.