Introducing Soapberry for Ackee

Update: this plugin was originally called Ackee WP but has been renamed to Soapberry to comply with the trademark policy for plugins. The plugin can now be found on under the slug Soapberry.

As part of my desire to own my data, I haven’t used Google Analytics for the past few years. In that time I’ve been curious about my site statistics but knew when I resumed collecting data I wanted to do so in a way that respected the privacy of my visitors.

This year I started a search for self-hosted tracking solutions and came across a lightweight node application, Ackee. After looking at a few other options I decided on Ackee for its care in anonymizing user data. Through hashing the user’s IP, a unique domain ID, and a salt which changes daily, site visits can be tracked without tracking the individual visitors.

For my needs, I want to know how many visits my sites are getting, where visitors are coming from, and how long they stay on the site. However, I do not have a need or desire to track individual visitors.

Using Ackee with WordPress

After setting up an Ackee instance and adding the tracking script to a few static sites I wanted to bring the functionality to my WordPress sites. At first, I just edited the theme’s footer.php file which worked well enough as a quick way to insert the script. Next, I hooked into wp_footer() so it would be easier to exclude logged in visits from the analytics.

While both of these methods work they do require a bit of WordPress know-how and do not carry over when switching themes. Wanting a better solution, I got to work writing Soapberry a WordPress plugin that adds the Ackee tracking script and data attributes to the site’s footer based on settings saved on a WP Admin page.

Keeping things simple at first, this first version of the plugin only has the ability to exclude all logged-in visitors and does not take into account the personal data options provided by Ackee. In the future, you may be able to exclude visits by role and enable opt-in tracking for personal information.

Exploring Ackee Alternatives

If after looking at Ackee you don’t think its right for you that’s okay. Ackee won’t be right for everyone. The good news is there are other options when looking to move away from Google Analytics, Facebook Pixel, or other third-party tools.

Chris Wiegman wrote a post on anonymizing and tracking visits at the server level to avoid the JavaScript requirement of many trackers. The folks over at Awesome Open Source also list several other Analytics tools that can be explored. If you find a tool you like let me know what you are using in the comments.

I want to ride my bicycle

BikeBlink Part II

Now that I had working code I started thinking about waterproofing. I decided to order a waterproof cable and print a 3D Box. As this was my first time 3D Printing I had no idea what I was doing. I designed a box in AutoDesk 3D and headed to my local maker space to have it printed. Over all I’m pretty happy with how the box turned out. My original idea was to solder everything into the box. However, I learned this was not as easily done as I was hoping so I’ll be going another route in terms of enclosures.

Continue reading