WordPress / Google Analytics and GDPR

One of my customers approached me as they had a number of emails sent to them warning them of their website’s potential lack of compliance with GDPR. Some emails included examples of companies that had been fined due to lack of compliance. Scaremongering to generate business?

GDPR can be a complex beast, but the essential part is that if you do collect PII (Personally Identifiable Information) then you must give the user the option to opt out and the ability to remove the PII data you have collected. This is true for any data you collect, so cookies are only a small part of the steps you need to take for GDPR compliance.

The default deployment of WordPress we like to use, disables comments, does not use contact forms and uses Google Analytics to report on website usage. Disabling comments and not having website contact forms helps to remove the cookie consent complexity by avoiding collecting PII.

Google Analytics provides the option to use “IP Anonymization” which is easily implemented by installing the “Google Analytics Dashboard for WP (GADWP)” plugin and set “anonymise IPs while tracking” under “Tracking Code” -> “Advanced Settings”. IP Anonymization means you’re not collecting the IP, which is “personal data”.

If you wish to use Contact Forms or collect PII data, we recommend you do it outside of your website. Consulting Brain encourages the use of G Suite which comes with Google Forms where businesses can collect information and the consent required to store and use the data you collect. Examples of personal data can be found here.

Disclaimer : We are not lawyers. Nothing on this website should be considered legal advice. Due to the dynamic nature of websites, no single plugin or platform can offer 100% legal compliance. When in doubt, it’s best to consult a specialist internet law attorney to determine if you are in compliance with all applicable laws for your jurisdictions and your use cases.

Raspberry Pi boot from USB Hard Drive

Starting a new project and thought I’d blow the dust off the Raspberry PI 3B. The last project, a temperature and humidity monitor, died due to the SD card coming to the end of it’s life. With this in mind, I was keen to find an alternative solution which minimised or removed the need for an SD card.

I tried many different USB drives but struggled to get the USB hard disks to boot. I just got a red light and nothing. I managed to get the PI to boot from a USB key but it wasn’t what I wanted.

Solution : I found this post which made for a very simple 2 step solution.
1. Copy bootcode.bin only to the SD card
2. Deploy the Raspbian image to your hard disk using Etcher

What happens is that the bootcode.bin on the SD card starts the boot sequence, much like BIOS does on a normal PC, and then boots from the USB Hard Drive.

How to make WordPress Twenty Fourteen theme full width

Whilst refreshing a client’s WordPress site, I felt the WordPress Twenty Fourteen theme had too much white space. As with many things in our connected world, I was not the first and someone already had a solution.

A fairly simple process:

  1. Locate the theme style.css (in the wp-content/themes/twentyfourteen folder) file and look for the following code and modify the max width to 100% instead 1260px.

    .site {
    background-color: #fff;
    max-width: 1260px;
    position: relative;
    }


  2. Find the following piece of code and again modify the max-width to 100% instead 1260px.

    .site-header {
    background-color: #000;
    max-width: 1260px;
    position: relative;
    width: 100%;
    z-index: 4;
    }

How to change a WordPress Post to a Page

When building this site I created some posts that I later wanted to be pages as I did not want the published date to be visible. Using your preferred SQL tool execute the following:

UPDATE wp_posts SET post_type = ‘page’ WHERE ID = ‘<post_number>’

Visualising Data – Word Clouds

Data visualisation transforms something complex to something simple and easy to digest. As I try to understand what my own skills are, I engaged my data analysis approach and fed my LinkedIn recommendations into an online word cloud generator. Whilst it means you can miss some of the detail, it does give you a place to start to better understand how other see you.

Generated using https://www.wordclouds.com/

Ubuntu boot partition running out of space….

Problem: /boot partition begins to fill and even after manual clean up, the problem reoccurs.

Solution: Initially clean the partition. The solution we have used is documented here and summarised below.

  1. Get the current kernel version by executing
    • uname -r
  2. List the kernels available, except the kernel currently in use
    • dpkg –list ‘linux-image*’|awk ‘{ if ($1==”ii”) print $2}’|grep -v uname -r
  3. Based on the list returned by the command above, execute
    • apt-get purge linux-image–generic
  4. Remove orphaned packages
    • apt-get autoremove
  5. Did it work? The command in step 2 should return no results. Check boot partition space with
    • df -h | egrep “boot|Mounted on”

Once that’s done, it’s recommended to setup Automatic Maintenance as below:

  1. Install the package unattended-upgrades
    • apt-get install unattended-upgrades
  2. Configure unattended-upgrades
    • dpkg-reconfigure -plow unattended-upgrades
  3. Make sure /etc/apt/apt.conf.d/50unattended-upgrades contains line Unattended-Upgrade::Remove-Unused-Dependencies “true”;cat /etc/apt/apt.conf.d/50unattended-upgrades | grep Remove-Unused-Dependencies

    If the result is //Unattended-Upgrade::Remove-Unused-Dependencies “false”;, then use your prefered editor to remove the // and change false to true.

Career Progression – Finding the right balance

Career progression and promotion is a common aspiration for many. It can be seen as a measure of how well we are doing in our job and a measure that is recognised by society.

Dealing with this can be difficult so I came up with this analogy to help get the timing right for promotion and/or career progression.

They call it “Climbing the ladder”, well let’s change that to a seesaw…

As we “climb the ladder” there is a balance point that is defined by our ability to perform the role we want. Having well defined job descriptions is a critical part here as an individual’s ability and preparedness is assessed against that job description. I have often asked individuals to take a close look at the job description for the role they aspire to have and measure themselves against it. If any gaps are found, then we invest in those areas to ensure ability and preparedness are satisfied. Of course the next challenge can be the availability of positions, but being part of someone’s development feeds your own and we should have pride in helping people be the best they can possibly be inside your organisation or beyond.

So, what can happen if we climb too fast?

….we cross the point of balance. Our ability to perform in that role is a constant challenge and our job satisfaction goes down. Who do we blame when we fail? Do we blame ourselves for taking on too much, too soon? Or do we blame others because it’s just too hard? We were unprepared.

So it’s all about finding the right balance. Picking the right time to advance your career and have those crucial conversations…

Flying Cars

An amazing opportunity came along and people had to ask twice when I mentioned it…. “Flying Cars!!”, yes the future is just around the corner. Autonomous vehicles and drones are a thing of now and flying cars are almost here too!


I’m sure the guys at VRCO will soon be in touch to get my son on the design team!

So the day came and, as I made my way to VRCO, the excitement was at a level I thought would be it’s peak. My passion for innovation, technology and automotive all in one place….

Upon arrival, I met the team and the excitement grew and grew. Mike and Dan have so much knowledge and their passion for the multiple areas of innovation made every conversation one where I was on the edge of my seat.

Image result for neoxcraft
NeoXCraft

This is surely one to keep an eye on.

Changing WordPress email addresses

Problem :
Upon changing the site or user email in the WordPress admin interface tonew_email_address, the following message is shown but the email is never received.

There is a pending change of your email to new_email_address. Cancel

Solution :
Firstly, cancel the change(s) in the WordPress admin interface and then access the WordPress database to execute the following SQL commands depending on your needs

To change user email:
UPDATE wp_users SET user_email = “new_email_address” WHERE wp_users.user_login = “user_login“;

To change the email address under Settings -> General -> Email Address:
UPDATE wp_options SET option_value = “new_email_address” WHERE wp_options.option_name = “admin_email”;