ActivityWatch / activitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.
https://activitywatch.net/
Mozilla Public License 2.0
12.67k stars 565 forks source link

Can't categorize activities by URLs #352

Open salmivas opened 4 years ago

salmivas commented 4 years ago

Environment

Browser: Firefox 73.0.1 (64-bit) and Google Chrome Version 80.0.3987.122 (Official Build) (64-bit) Operating system: Windows 10 Pro 1909 OS Type: 64-bit

Debug info from plugin

Number of active tabs: 1
Tabs:
{
    "id": 20,
    "index": 0,
    "windowId": 109,
    "highlighted": true,
    "active": true,
    "attention": false,
    "pinned": false,
    "status": "complete",
    "hidden": false,
    "discarded": false,
    "incognito": false,
    "width": 1080,
    "height": 1824,
    "lastAccessed": 1582933480468,
    "audible": false,
    "mutedInfo": {
        "muted": false
    },
    "isArticle": false,
    "isInReaderMode": false,
    "sharingState": {
        "camera": false,
        "microphone": false
    },
    "successorTabId": -1,
    "url": "https://learn.javascript.ru/",
    "title": "Современный учебник JavaScript",
    "favIconUrl": "data:image/png;base64,..."
}

Appnames in the Watcher

image image

The issue

Hi, I use ActivityWatch with Chrome and Firefox extensions. But activities are only tracking by tabnames, not by URL in both browsers. For example, with these settings: image image or image i have no information about activity image but if I set like this: image my activties appear image

ErikBjare commented 4 years ago

Thank you for reporting!

This is unfortunately a known issue. I have an example with a fix in our research repo (aw-research) but we haven't yet figured out how to bring it to ActivityWatch in general.

I assume many want this feature (I know I do) and it will be available in an upcoming release, but I can't give an estimate of when right now.

On Sat, 29 Feb 2020, 00:53 Ivan Salmin, notifications@github.com wrote:

Environment

Browser: Firefox 73.0.1 (64-bit) and Google Chrome Version 80.0.3987.122 (Official Build) (64-bit) Operating system: Windows 10 Pro 1909 OS Type: 64-bit Debug info from plugin

Number of active tabs: 1

Tabs:

{

"id": 20,

"index": 0,

"windowId": 109,

"highlighted": true,

"active": true,

"attention": false,

"pinned": false,

"status": "complete",

"hidden": false,

"discarded": false,

"incognito": false,

"width": 1080,

"height": 1824,

"lastAccessed": 1582933480468,

"audible": false,

"mutedInfo": {

    "muted": false

},

"isArticle": false,

"isInReaderMode": false,

"sharingState": {

    "camera": false,

    "microphone": false

},

"successorTabId": -1,

"url": "https://learn.javascript.ru/",

"title": "Современный учебник JavaScript",

"favIconUrl": "data:image/png;base64,..."

}

Appnames in the Watcher

[image: image] https://user-images.githubusercontent.com/35002517/75595653-bcfd2880-5aa6-11ea-974f-dea358281aa3.png [image: image] https://user-images.githubusercontent.com/35002517/75595701-dc945100-5aa6-11ea-97c4-202fb713ac51.png The issue

Hi, I use ActivityWatch with Chrome and Firefox extensions. But activities are only tracking by tabnames, not by URL in both browsers. For example, with these settings: [image: image] https://user-images.githubusercontent.com/35002517/75594860-b9b46d80-5aa3-11ea-86d2-0843bf4331c2.png [image: image] https://user-images.githubusercontent.com/35002517/75594494-5e35b000-5aa2-11ea-88dd-df6cfa23ffa3.png or [image: image] https://user-images.githubusercontent.com/35002517/75594612-b8367580-5aa2-11ea-9ad8-750945db97a5.png i have no information about activity [image: image] https://user-images.githubusercontent.com/35002517/75594724-1d8a6680-5aa3-11ea-9191-7c79c709f42f.png but if I set like this: [image: image] https://user-images.githubusercontent.com/35002517/75594825-98538180-5aa3-11ea-80ab-e2cdf5485fa9.png my activties appear [image: image] https://user-images.githubusercontent.com/35002517/75594940-ff713600-5aa3-11ea-9466-2550dee1206c.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ActivityWatch/activitywatch/issues/352?email_source=notifications&email_token=AAKXDOWKCLFV5DFU7BQTA43RFBG6TA5CNFSM4K6DAQN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IRILO7Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKXDOWH5NLUVVLKXYHCYUDRFBG6TANCNFSM4K6DAQNQ .

ErikBjare commented 4 years ago

Here's the query I mentioned that merges web events into the full timeline of events (which are then classified): https://github.com/ActivityWatch/aw-research/blob/3d8b70255ccb4c32dc5e3e6ecc3647079633a93e/aw_research/classify.py#L249-L282

It has other issues though (which is why we can't just take it straight from there) but the general problem here is that the web UI does two queries: One for AFK + window events, and one for browser events. To fix this issue we'd need to merge those two queries into one.

salmivas commented 4 years ago

Oh, thanks! Looking forward for updates.

YAMLcase commented 4 years ago

I also am looking forward to the update. My use case is we use workfront for a ticketing system. when in a ticket, it doesn't display anything meaningful to regex on. i.e., only the subject of the ticket is present which makes each window title unique.

Tenome commented 4 years ago

Ahh, so this isn't a feature yet. Unfortunately this means it's useless for tracking, say, Reddit.com since it only counts it if it had Reddit in the tab name. Oh well, hoping it'll get updated in the future.

ErikBjare commented 4 years ago

@Tenome Unfortunately not. However, we just merged https://github.com/ActivityWatch/aw-webui/pull/203 which is about half of the work required. See my comment there https://github.com/ActivityWatch/aw-webui/pull/203#pullrequestreview-428074702 for what else is required to fix this issue :)

1000i100 commented 4 years ago

In activity Summary, i have Top Browser Domains and when i filter to see what's uncategorized, i have Top Browser Domains that match with my filter ex : GitHub (incensitive checked) and github.com is not catch and tagged.

yutotakano commented 3 years ago

Pardon my naive understanding, but is it a more general approach to perhaps add a classifier based on any event field? This would then allow extending into url: abc.com fields in the web-watcher, and file: /home/abc.js from vim-watcher or vscode-watcher.

ErikBjare commented 3 years ago

@yutotakano That's how it works right now.

The issue is that the url field is not in the events being categorized in the query. What's needed is something to merge the web events with the window events, like worked on in https://github.com/ActivityWatch/aw-server-rust/pull/179.

tbertels commented 2 years ago

Ping

ethanicus commented 2 years ago

Is there any progress on this as of late? Or some workaround? It's confusing to me that it shows youtube.com for instance as being used for ~15 minutes, and has it colored as the Videos category, and yet it doesn't actually seem to show up anywhere on the charts. Would love to have this working.

ErikBjare commented 2 years ago

@ethanicus I'm afraid this has stalled a bit due to the difficulty in getting the required transforms right.

Right now, the general workaround is to either:

  1. not rely on URLs if possible
  2. install a browser extension that appends the domain or full URL to the window title (like: this for Firefox, and this for Chrome). That way, you can at least still use URLs for categorization.

I've noted that this is getting a bit untenable (and def an understandable source of confusion), so upping the priority a bit.

nordson21 commented 2 years ago

Until the problem is resolved, this can be added to the top of the documentation. It is hard to imagine a person who does not use a browser and who does not need to create categories by domains. I spent several hours to come to your comment. Someone else just won't get to it and uninstall this great program.

2. install a browser extension that appends the domain or full URL to the window title (like: this for Firefox, and this for Chrome). That way, you can at least still use URLs for categorization.

singalen commented 1 year ago

Can you please describe the technical problem in more detail?

Somebody may be able to help, and this is a really vital feature.

For one, half of my productive and nonproductive time is spent in browser, and putting URLs into tab titles will hurt the quality of life.

reorx commented 1 year ago

I agree that browsers are becoming a major part of people's daily use, whether we admit it or not.

Although I find it frustrating that I can't categorize most of my browsing time accurately, I will continue to use ActivityWatch and hope that this problem will be resolved. This issue is the only thing preventing it from being a "great" software as opposed to just "usable". Post this reply to vote for it :)

tutunak commented 1 year ago

Tracking sites by domain names is a must-have feature. For what another purpose I need a extension for browser. I switch between different projects on different sites, and instead of seeing a site, I see a title. You have mentioned two extensions that add a full URL to the tab. If the can so, it means all extension have such information. Even without extension if I put a mouse over the tab I see the domain name.

Edited: I've checked you already have that information in the database, so why not implement that it's proved a boost in popularity of the app. I spend about half of the working day in browser .

endolith commented 1 year ago

So the only way to categorize things is through keywords? :/

DivineMK commented 7 months ago

+1

feerus23 commented 6 months ago

Is there any progress on this issue? After all, there are no messages from developers in this topic for more than two years.

DivineMK commented 6 months ago

Coming from #179, I wonder what is the issues? First of all, I would like to thank you for maintaining such useful tracking utilities. ActivityWatch has been one of the greatest changes to my productivity management. And so far, using the browser extension to add domain to window fits as a workaround. However, this workaround feels like an unnecessary quirk and hence this feature is still highly demanded to users, including myself. I am not a developer myself but I am certain amongst such large user base, many are willing to help you merge this high demand features 🫡. I hope this message reaches you @ErikBjare.

ErikBjare commented 4 months ago

What we need is something like https://github.com/ActivityWatch/aw-server-rust/pull/179

I have some ideas I might give a try, but it's tricky to get right/accurate (we need extensive tests for such transforms).