You can hide the “Last Seen” in whatsapp but the Online status is shown to strangers to and this can be used to monitor your sleeping pattern and can correlated with other persons online activity. A lot of data can be mined from this simple 1 bit data Online or offline.
If you want to track whatsapp with coding you may try WhatsSpy Public, the code repo is available on github the developer published it as a proof of concept. Now the repo admin says its no more working but you can use it with some modification to adopt with the new changes in communication protocol. Anyway its time consuming frustrating to update code which i don’t understand. So i tried my own method with minimal or no coding.
A screenshot from Whatspy Public, Showing online time of two different persons which may be a online meeting between both users.
The easyway is whatsapp web version, the UI shows user online or not(even from non friends/strangers). So here you just need a way to log the text in a specific node of the HTML code rendered on the screen. That is very easy with Chrome Devtools. Open the Devtools (CTRL+SHIFT+I) find the ID of the element showing online status with selector tool. Now try the element on console whether you got the right name
So this is the right element, now write the script to repeat this with logging. i have added exceptions to avoid the error lines
var dt = new Date();
var time = dt.getHours() + “:” + dt.getMinutes() + “:” + dt.getSeconds();
var lastSeen = document.getElementsByClassName(“emojitext O90ur”).innerText;
console.log(time +’ ‘+lastSeen);
Now for whatsapp web its necessary the phone client should be online too. Keeping a phone online always is not easy. Run it with Nox player(bluestack will not work). Now Connect the in web client, for this you need a camera on the nox. you may use a webcam or an android remote cam(droid cam) for this. Once both clients logged in run the script there. when you want to store the data right click on console to save the data collected.
But still if you have time try WhatsAPI or ChatAPI, you may extend that to very good revenue making Android/iphone App. All the Best.