Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] browser plugins #79

Open
13steinj opened this issue Apr 18, 2018 · 4 comments
Open

[Feature request] browser plugins #79

13steinj opened this issue Apr 18, 2018 · 4 comments

Comments

@13steinj
Copy link

I'm putting this would also mean a valid way to import/export time in some special file format.

A simple "on/off" switch and export import system would work, tracking time spent.

Bonus points for tracking history of websites or domains themselves per page, and allowing this to be expanded/contracted in the report. If websites, POST requests and don't track paramaters/fragments for security purposes.

I'd say do this for Chrome, Firefox, maybe opera/safari/edge.

Of course, screw IE-- that's the only browser that would require a completely different codebase (in a different language even) whereas the others would be the same major codebase with only a few changes for different browser APIs

@13steinj 13steinj changed the title [Feature request] Simple browser plugin [Feature request] browser plugins Apr 18, 2018
@mschenk42
Copy link
Member

I'm not familiar with what is allowed or possible for browser plugins. For integrating with gtm it would be easy enough to call the CLI from a browser plugin. However, I am working on new feature for application monitoring. So stay tuned :).

@13steinj
Copy link
Author

The problem with calling the CLI is I don't believe browser plugins are allowed to execute arbitrary commands-- they're generally written in JS and contained at the browser level, and very specific on allowed permissions. Application monitoring is also a gigantic plus, however if splitting the timing at the webpage level, this would allow the user to see where his time is actually spent in working on the project (SO/SE, the docs of the language, misc, or procrastination).

@devkabiir
Copy link

devkabiir commented Jun 20, 2019

One possible solution would be that gtm runs a lightweight local HTTP server that accepts POST and GET requests. This removes the need for any native binaries to be installed. And also the browser-extension will be simple to implement which using the current tooling can be made cross-browser compatible. I've made simple extensions before and I can tell from experience this approach would be the most easiest to implement and maintain.

The browser extensions can then simply POST to that local server like
This would be configured by the users of the browser extension.

{"site": "https://github.com/project-related/repo", "repo":"~/my-project"}

Upon receiving such request gtm then just runs it's gtm record $site --web in the $repo directory. This would also allow users to record time from certain sites to be included for particular project.

Here --web is a hypothetical flag which means the recorded activity is a web activity.

EDIT: Another "Enterprise" use case of this feature would be that companies can host and run the gtm server and their employees would configure the browser extension to use https://gtm.my-company?user=devkabiir server instead of localhost. There are a number of ways to utilize this.

@mschenk42
Copy link
Member

We did consider this approach and it does have advantages. But we decided early on to have GTM be a command line tool and not a server. However you could create a HTTP server that uses GTM. That might be a good option to try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants