Vercel Logo

fingertipps

Showcase

getting started

first install the fingertipps-handshakes package

Fingertipps Servers needs a way to identify visitors and potential customers of your webpage. For this reason, we generate a random series of characters and assign it to each new visitor. We save this information in the local storage of their device. This process happens only once when someone visits your webpage for the first time. Here is our implementation.


export const UserId = () => {
    return useEffect(() => {
      const quest = JSON.parse(localStorage.getItem("quest"));
      if (!quest) {
        const id = uuidv4();
        const quest = id;
        localStorage.setItem("quest", JSON.stringify(quest));
        InitializeHandShake(API_key,quest); 
      }
    }, []);
  };

In your `app.js` file, import the "InitializeHandshake" function from the `fingertipps-handshakes` package. Then, provide your API keys and user ID that you generated.


import { InitializeHandShake } from "fingertipps-handshakes";

function App() {
InitializeHandShake(API_key,quest);  
  return (
    <div>
         ...
    </div>
  );
}