Is it possible to retrieve a users browser history via the API? - api

We are moving to Chromebooks in our school and would like to know if it's possible to retrieve the users browser history. Every month we perform a device check in where the teacher physically inspects each students device for anything "suspicious". This generally entails looking at their browser history for things like pornographic or other unsavory URLs.
I would be very handy to build a nightly process that slurps up the student's browser history, checks it for any anomalies, and reports that to the administration. Is this possible? Is there another way to do this?

I don't think this is fully supported yet. chrome.history from Chrome API can only
interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history; that's as far as API goes.

Related

Moodle - Any way to get Access logs without plugin or direct DB?

As an instructor, I want to be able to visualise a number of aspects of when my students are accessing my courses and materials. My institution refuses to give me DB access, and won't let me install a plugin. Is there any way I can pull this data? I could easily do it with a few lines of code in Canvas, so using moodle feels like stepping back in time. I've been exploring developing an LTI app as an option (I've got the demo LTIJS app working) Any ideas?
You can access user logs in a course by going to Participants then click on the user you want to track and you will be taken to their course profile. From there, you can choose any option in the "Reports" section. You will need to have the proper capabilities. The reports shown in the screenshot are from a site admin account.

Is it possible to create a button to delete an hour old web history?

I would like to offer the possibility to delete the last hour web history of my users (in order to protect people who used the website but don't have technical skills) or at minimum the url of the website and the referer (google search, social media link, etc.)
Is it possible with a html/js button which would interact with history like some extension ( https://developer.mozilla.org/fr/docs/Mozilla/Add-ons/WebExtensions/API/history/deleteUrl ) ?
Thanks for your help
Clear-Site-Data is a header, implemented to different degrees by different browsers, to indicate to the browser that you'd like the browser to clear cookies, caches and other kinds of storage for your site. This can be a useful security practice for your site -- to clear any sign that the user has logged in, or to make sure that no one who uses the device later will be able to access that user's account.
While I can see important and legitimate use cases for it, it isn't possible to force or prompt the browser to delete the browsing history, even just for your site. You can see how there might be security issues with that, like an attacker clearing evidence of their malicious site from the user's device, or just annoying websites that hide themselves from history and so the user can't see where they were. See these other questions that have also longed for this capability:
How to clear browsing history using JavaScript?
How to clear browsers (IE, Firefox, Opera, Chrome) history using JavaScript or Java except from browser itself?
You might consider exploring the History.replaceState method and other parts of the History API. That won't let you delete URLs and referrers in general, but it can be used to modify the URL of the current page in the history. So if a user arrives on your site visiting a page about something particularly sensitive or revealing, you might be able to modify the current history so that their browser only records that the user visited your domain, and not that particular page.

How can I acquire data from social media to analyze it using machine learning?

I have a project where I'm required to predict future user location so that we can provide him with location specific services as well as collect data from his device that would be used to provide a service for another user etc...
I have already developed an android app that collects some data but as social media is the richest in terms of information, I would like to make use of that. For example, if the user checks in in a restaurant and gives it a good review (on fb for example) then he is likely to go back there. Or if he tweets a negative tweet about a place then he is unlikely to go back there... these are just examples I thought of.
So my main issue is: how do I even get access to that information? I mean it's not like the user is going to send me a copy of every social media activity they have so how do I get it and is that even possible? Because I know fb, twitter and other social medias have security policies so I initially thought it couldn't be done and that only facebook gets access to their users' information to predict their likes and dislikes and show them adds and sponsored posts accordingly but when googling it, I found a lot of tools that claim to be able to provide that sort of data. How did they even acquire it and is it possible for me to do the same?
Facebook, Twitter, etc. have well-documented APIs that may or may not allow you to access the data.
For the APIs, see the official documentation of each, because anything I write here will likely be outdated in a year or two, as their APIs change.
Don't rely on web scraping. The web sites change design more often than the API, and you will likely violate the terms-of-service.

How do sites like Hubspot track inbound links?

Are all these types of sites just illegally scraping Google or another search engine?
As far as I can tell ther is no 'legal' way to get this data for a commercial site.. The Yahoo! api ( http://developer.yahoo.com/search/siteexplorer/V1/inlinkData.html ) is only for noncommercial use, Yahoo! Boss does not allow automated queries etc.
Any ideas?
For example, if you wanted to find all the links to Google's homepage, search for
link:http://www.google.com
So if you want to find all the inbound links, you can simply traverse your website's tree, and for each item it finds, build a URL. Then query Google for:
link:URL
And you'll get a collection of all the links that Google has from other websites into your website.
As for the legality of such harvesting, I'm sure it's not-exactly-legal to make a profit from it, but that's never stopped anyone before, has it?
(So I wouldn't bother wondering whether they did it or not. Just assume they do.)
I don't know what hubspot do, but, if you wanted to find out what sites link to your site, and you don't have the hardware to crawl the web, one thing you can do is monitor the HTTP_REFERER of visitors to your site. This is, for example, how Google Analytics (as far as I know) can tell you where your visitors are arriving from. This is not 100% reliable as not all browsers set it, particularly in "Privacy Mode", but you only need one visitor per link to know that it exists!
This is ofter accomplished by embedding a script into each of your webpages (often in a common header or footer). For example, if you examine the source for the page you are currently reading you will find (right down at the bottom) a script that reports back to Google information about your visit.
Now this won't tell you if there are links out there that no one has ever used to get to your site, but let's face it, they are a lot less interesting than the ones people actually use.

What is the most stable, least intrusive way to track web traffic between two sites?

I need to track traffic between a specific set of web sites. I would then store the number of clicks in a database table with the fields fromSite, toSite, day, noOfClicks. The complete urls are unimportant - only web site identity is needed.
I've ruled out redirects since I don't want my server to be a single point of failure. I want the links to work even if the tracking application or server is down or overloaded.
Another goal is to minimize the work each participating site has to do in order for the tracking to work.
What would be the best way to solve this problem?
The best way is to use an analytics program like Google Analytics, and to review the reports for each domain.
Do you have access to the logs on all of the sites in question? If so, you should be able to extract that data from the log files (Referer header).
You could place an onclick event on to each link that goes between each site. the onclick would then call some javascript which could do a server call back to register the click.