Introducing Soapberry for Ackee

Update: this plugin was originally called Ackee WP but has been renamed to Soapberry to comply with the WordPress.org trademark policy for plugins. The plugin can now be found on WordPress.org 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.