I Thought He Came With You is Robert Ellison’s blog about software, marketing, politics, photography and time lapse.

I just want to get rid of Windows 10 Notifications with one click

I just want to get rid of Windows 10 Notifications with one click

910 days ago I vented my frustration at Windows 10 notifications.

Well someone in Redmond must be listening. They 'fixed' it.

The problem was that dismissing a notification did not actually get rid of it. Clicking the little x in the corner just sent it to the Action Center where you could enjoy reading it and dismissing it again.

Like some kind of cargo cult Toyota, Microsoft asked the one why, and changed the little x to an arrow. Now it's more obvious that you're just shuffling the notification around the desktop. Ticket closed. But I still have to handle every fucking notification twice.

Which makes the announcement of the April 2018 Update especially ironic:

"With this update, available as a free download today, you get new experiences that help minimize distractions and make the most of every moment by saving you time. Our hope is that you’ll have more time to do what matters most to you whether that’s to create, play, work, or simply do what you love."

I'm guessing they're all on Macs?

I'm not afraid of Google

A Project Fi display ad on an article about Google's insane targeting prowess

At BGR Chris Smith writes about Google's prodigious data collection:

"But that doesn’t change the fact that Google collects an incredible amount of data about you, especially from that device you use most, your Android phone"

And so I was amused as a Google Fi subscriber on a Pixel XL running Google Chrome and signed into my Google Account that the ad in the middle of the article was for Project Fi. If Google can't help paying BGR under these set of circumstances then we're some way off from the adtech singularity.

Banner Chat

Chat Notifications and Chat Banner Notifications in Skype

I'm hoping that a chat banner notification is for really great chats only and not some subtle distinction between chat notification types that I can't figure out even after some moderate to heavy googling. If anyone knows seriously please tell me.

Die PDF Die

Adobe Acrobat Reader DC needs a reboot after updating

If I need to reboot to view a PDF then you must be doing something very badly wrong Adobe.

Nonfiction

Kindle New York Times Nonfiction Bestsellers including Stephen King and Margaret Atword

The Kindle nonfiction list has become a bit alarming recently.

HOWTO: Fix Twitter

HOWTO: Fix Twitter

Wired (and everyone else) is reporting that Twitter is finally testing longer tweets. Maybe 280 characters! I had a better fix six years ago:

ITHCWY: Twitter: Put some status in status updates: Give me an extra character for every year that I’ve been with… http://goo.gl/fb/gCEpT

— Robert Ellison (@abfo) July 8, 2011

Why Microsoft is Likely Doomed Based on one Email Folder

Close up of the useless Junk folder in Microsoft Outlook

When you get a piece of spam in Outlook you move it to Junk or block the sender. And then, even if that junk mail is marked as read, the Junk folder has a BOLD MESSAGE COUNT. It's the only folder that does this. I cannot do any other work while I have a bold message count and so I have to switch to the Junk folder and delete the message to get rid of it.

Regular email: read, file, done.

Junk email: recognize as spam, click block sender, confirm that I really want to block the sender, switch to Junk folder, mark as read, delete.

Something is really wrong with this workflow. It's a lens through which you can view the ultimate demise of the company. Sure, Office isn't going away soon and Azure is growing like crazy and SQL Server runs on Linux. But somewhere in Redmond 5,000 people designed a Junk email folder that is the MOST IMPORTANT folder in Outlook. The rest were presumably too busy making Windows Update worse to stop this.

My Google experience is that I really don't get much spam. The spam that I do get is hidden from me unless I actually need to rifle through it for some reason. On the occasion I actually get legitimate junk I just flag it as such and never have to touch it or it's ilk again.

Email Alerts for new Referers in Google Analytics using Apps Script

Referral Traffic in Google Analytics

It's useful to know when you have a new website referrer. Google Analytics is plagued with spam referral and you want to filter this out of reporting as quickly as possible to stop it from skewing your data. It's also helpful to be able to respond quickly to new referral traffic - maybe leave a comment or promote the new link on social media.

The script below will send you a daily email with links to any new referrers.

var TableId = 'ga:your-view-id';
var SendEmailTo = 'your-email-address';

function main() {
  var scriptProperties = PropertiesService.getScriptProperties();
  var currentProps = scriptProperties.getProperties();
  var anythingNew = false;
  var newText = '';
  
  var yesterday = Utilities.formatDate(new Date(new Date().getTime() - 24 * 60 * 60 * 1000), Session.getTimeZone(), 'yyyy-MM-dd');
  var options = {
    'dimensions': 'ga:fullReferrer',
    'filters': 'ga:medium==referral',
    'max-results': 20000
  };
  var report = Analytics.Data.Ga.get(TableId, yesterday, yesterday, 'ga:sessions', options);
  if (report.rows) {
    for (var i = 0; i < report.totalResults; i++) {
      if (!(report.rows[i][0] in currentProps)) {
        Logger.log('Found new referrer: ' + report.rows[i][0]);
        scriptProperties.setProperty(report.rows[i][0], report.rows[i][1]);
        anythingNew = true;
        newText += 'New referrer: ' + report.rows[i][0] + '\r\n';
      }
    }
  } else {
    Logger.log('GA report is empty');
  }
  
  if (anythingNew) {
    MailApp.sendEmail(SendEmailTo, 'Found new referrers for ' + TableId + ' on ' + new Date(), newText);
  }
}

Start a new apps script project in Google Drive and paste in the code. At the top enter the view ID that you want to monitor and the email address that should receive reports.

Choose Advanced Google Services from the Resources menu and switch on the Google Analytics API. Then click the Google API Console link and enable the Google Analytics API there as well.

Finally pick Current project's triggers from the Edit menu and trigger the main function daily at a convenient time.

This script saves known referrers in script properties. For a site with lots of traffic this may run out of space in which case you might need to switch this out and write known referrers to a sheet instead.

Get an email if your site stops being mobile friendly

Get an email if your site stops being mobile friendly

Google just released an API for the mobile friendly test and so I've whipped up a script to send an alert if a web page violates their guidelines. This will run the test as often as you like and send you an email if it detects a problem. Alternatively if you're not mobile friendly it will keep emailing you until you fix any problems which might be a good motivational tool.

First start a new apps script project in drive and paste in the code below:

var urlToMonitor = '';
var alertEmail = '';
var runTestKey = '';

var runTestUrl = 'https://searchconsole.googleapis.com/v1/urlTestingTools/mobileFriendlyTest:run?key=';

function mobileFriendlyMonitor() {
  try {
    
    var postBody = {
      'url' : urlToMonitor
    };
      
    var options = {
      'method' : 'post',
      'contentType': 'application/json',
      'payload' : JSON.stringify(postBody)
    };
    
    var response = UrlFetchApp.fetch(runTestUrl + runTestKey, options);
    var json = response.getContentText();
    var mobileFriendlyResult = JSON.parse(json);
    
    if (mobileFriendlyResult.mobileFriendliness != 'MOBILE_FRIENDLY') {
      sendEmail('Mobile friendly test failed for ' + urlToMonitor + ', check https://search.google.com/search-console/mobile-friendly for details');
    }
      
  } catch (e) {
    sendEmail('mobileFriendlyMonitor failed for: ' + urlToMonitor + ' with error: ' + e.message);
  }
}

function sendEmail(msg) {
  MailApp.sendEmail(alertEmail, 'Mobile Friendly Monitor Alert on ' + Utilities.formatDate(new Date(), "GMT""yyyy-MM-dd'T'HH:mm:ss'Z'"), msg);
}

There are three variables you need to set, urlToMonitor is the full URL of the page to test, alertEmail is your email address (or whoever needs to be pestered) and runTestKey is the API key for the service. To get this go to the Google API Console, click Enable API, search for 'Google Search Console URL Testing Tools API' and click enable. Then click the Credentials option and generate a browser key.

Once you've configured the script choose 'Current project's triggers' from the Resources menu in apps script and set up a schedule for the mobileFriendlyMonitor() function.

If You Give a Browser a Cookie

If You Give a Browser a Cookie

If you give a browser a cookie, it’s going to ask for local storage.

When you give it the local storage, it’ll probably ask you for a list of system fonts. When it’s finished, it’ll ask you for your screen resolution.

Then it’ll want to look to see if Flash cookies are supported. It’ll probably create a local shared object.

When it’s finished with the local shared object it’ll want more things to hash. It will hash your timezone and language. It might get carried away and hash every supported plugin. It may even end up hashing the platform and user agent.

When it’s done it’ll probably want to check out your WebGL. You’ll have to tell it your WebGL vendor and renderer. It’ll probably ask you to open a HTML5 canvas.

When it looks at the HTML5 canvas, it’ll get so excited it’ll want to draw it’s own hidden image. Then it’ll want to hash the image as well.

Looking at the image will remind it that it should store the hash somewhere. So it’ll ask for local storage.

And chances are if it asks you for local storage, it’s going to want a cookie to go with it.

(With apologies to Laura Numeroff, and you may be a snowflake yourself).