activitywatch icon indicating copy to clipboard operation
activitywatch copied to clipboard

Can't categorize activities by URLs

Open salmivas opened this issue 4 years ago • 20 comments

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

salmivas avatar Feb 28 '20 23:02 salmivas

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, [email protected] 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 avatar Feb 29 '20 06:02 ErikBjare

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.

ErikBjare avatar Feb 29 '20 06:02 ErikBjare

Oh, thanks! Looking forward for updates.

salmivas avatar Feb 29 '20 07:02 salmivas

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.

YAMLcase avatar Apr 14 '20 23:04 YAMLcase

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.

Tenome avatar Jun 11 '20 09:06 Tenome

@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 :)

ErikBjare avatar Jun 11 '20 09:06 ErikBjare

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.

1000i100 avatar Nov 27 '20 10:11 1000i100

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.

yutotakano avatar Apr 23 '21 20:04 yutotakano

@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.

ErikBjare avatar Apr 25 '21 14:04 ErikBjare

Ping

tbertels avatar Apr 27 '22 15:04 tbertels

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.

ethanicus avatar May 11 '22 02:05 ethanicus

@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.

ErikBjare avatar May 11 '22 19:05 ErikBjare

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.

nordson21 avatar Oct 23 '22 08:10 nordson21

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.

singalen avatar Mar 17 '23 18:03 singalen

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 :)

reorx avatar Apr 10 '23 16:04 reorx

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 .

tutunak avatar Jul 11 '23 18:07 tutunak

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

endolith avatar Oct 30 '23 00:10 endolith

+1

DivineMK avatar Apr 08 '24 11:04 DivineMK