Add functionality to an existing browser extension that collects social media data

Job ID: 35942282

Budget: $750 – $1,500 USD

Task Summary
We developed a Chrome extension for research purposes. It scrapes the feeds on Facebook and Twitter and records the encrypted data into a MySQL database. It also had the capability to hide posts/comments. We would like to update the functionality of the extension to do two things: (i) identify ads on Facebook and hide them (instead of posts/comments), and (ii) record clicks on ads that users make.

Current State of the Code
The extension was fully operational as of 3 months ago. The core functionality was recording encrypted data and hiding content. Immediately upon installation it started recording posts/comments on Facebook and Twitter into an encrypted database. 2 weeks after installation it was starting to hide certain posts/comments from the feed.

Task Description
The goal of the project is to randomly hide a certain percentage of ads on user feeds on Facebook and Twitter. The user would install the extension and have it run for a while not changing anything in the feeds, collecting the same information that we were collecting previously: time spent and content consumed. The only addition would be collecting clicks on the ads, which is extremely important for us.
At a certain point (TBD) the extension will switch to the intervention mode. It will request from the server which treatment arm to place the user into (this is a new feature – previously this was randomized within the extension, now we will manually assign the variable somewhere on the server and the extension will take it). Upon identifying an ad on the feed, the extension will run RNG on [0, 1], and if the random number is higher than the threshold established by the assigned treatment group, hide that ad from the feed (the control group would have a threshold of 1). Thus, for threshold 0.5, on average, 50% of ads would be hidden.
Lastly, we would like to be able to inject a post of our creation into the feeds of the user (nuances TBD).

Therefore, the tasks would be as follows:
- Set up the database (either stick to our current phpMyAdmin design or install the dB on Digital Ocean for scalability) and a way for us to communicate things to the extension, like the treatment group.
- Clean up the code of the extension (remove some clutter that we no longer need).
- Find a way of identifying ads on Facebook (probably the trickiest part - talk to George who had an idea) and make sure ad identification works on Twitter.
- Make sure the original recording functionality of the extension is working properly and DOM structures haven’t changed (we are recording content and time)
- Add the randomization of hiding.
- Add ad click recording.
- Add post injection.
Related categories: PHP JavaScript MySQL HTML5 Google Chrome