Perl scripts for Shopify and Google Analytics

First things first…does anyone still use Perl?

I starting using Perl over 10 years ago at IBM in order to automate some of the server tests that I was running. Since then, Perl has been my go-to language for writing scripts. So when I found myself working with a litany of services in my last job, I naturally turned to Perl to make it manageable. I wrote a variety of scripts to automate pulling data and running commands in Shopify, Google Analytics, and Delighted. 

Usually you can repurpose sample code that you find online for this type of stuff. But perhaps due to Perl’s waning popularity, I wasn’t able to find much, so I wanted to share a few of the scripts that I was using on a regular basis.

I was running these in the command line on a MacBook. In order to get them to work, you’ll probably have to install a few things, including the Apple Developer Command Line Tools and the Perl module Mozilla::CA

Consumer Barometer – nice source of online shopping survey data

I recently learned about, a website created by Google that provides a front-end to data on online shopping behavior pulled from surveys they fielded in 2014 and 2015.

It’s a great resource if you work in online retail. For example, we recently talked about putting more marketing resources behind YouTube at work. After filtering their data to look at male online shoppers that purchased clothing and apparel, it became immediately clear that this wasn’t the right place to focus on…at least, not for now.

Consumer Barometer Example

Consumer Barometer Example


Apple Watch, 6 months in

It’s been over six months since I started using the Apple Watch daily. In that time, Apple has released a major software update for it, watchOS 2, and it’s become a regular part of my routine, losing that new gadget shine that is so good at concealing shortcomings. Therefore, I thought I’d write a quick update on what I like and don’t like about it, and how I continue to use it on a day-to-day basis. Here is the post I wrote about the watch 1 month after I started using it for reference. 

The Good

The battery lasts all day, even when I workout with the watch. I never check the battery level on it, nor do I ever worry about it not making it through the end of my typical days.

I continue to love the convenience of being able to view notifications and tap or dictate quick responses to text messages. I dismiss the majority of notifications without responding to them, but when I do need to respond, it’s nice to not have to fetch the phone out. This is also the case when controlling the music that I’m listening to via the watch.

In the gym, it’s great to be able to time and track workouts. I also really like being able to play music stored on the watch via bluetooth headphones. It means that I can leave behind my phone, which tends to get in the way at the gym given it’s size.

Finally, I use Siri on the watch to set timers and reminders all of the time. This is surprisingly useful when doing chores that have long delays in between steps, like washing clothes, where you might otherwise forget when you need to do the next thing.

The Meh

Third-party apps are dead to me at this point. I don’t feel compelled to go looking for them, and everything I’ve read so far confirms that even if I did take the time to look for apps, I would’t find any jewels at this point.

Although I’ve been tempted to buy some new fluoroelastomer sport bands for the watch, I can’t get past the price. At $50, I would much rather buy a new pair of Chucks or any number of other items that are just as capable at allowing me to express myself. If the straps were $20, then they would make for a much better impulse buy, and I’d likely have 2-3 more.

The Activity app and it’s rings are also dead to me at this point. I haven’t disabled the stand notifications out of pure laziness, but I’ve grown quite adept at ignoring them. I also love whenever I hit my daily Move goals while sitting on the couch watching a movie. One of the big issues is that I’ve recently started swimming instead of running, so the watch is unable to track half of my workouts. I shower with the watch on everyday without any problems, but I’m not brave enough to venture into the pool with it on.

Finally, all of those new forms of communication that the watch enables are useless if you don’t have a lot of Apple Watch-wearing friends to use them with. I think I’ve used Digital Touch to send taps or a sketch < 3 times since getting the watch.

The bad

My biggest complaint about the watch at this point is its performance/responsiveness. I think that Apple was so afraid about the watch’s battery not being able to last a full day for most people, that they went overly conservative on performance. Either that, or the hardware just isn’t capable of delivering good performance…yet. 

There is a noticeable lag when tapping around on the watch that varies anywhere from a fraction of a second to 2-4 seconds. That leads to a lot of repeated taps, mistaps, and long periods of time spent looking at the watch waiting for it to do what I want. It almost completely negates the time I save from not having to pull out my phone in some cases. I tend to notice it most when I’m using the watch in the gym to listen to music and track my workout. That seems to tax the processor a lot.

I’m certain that they’ll be able to improve the performance a lot in V2 and V3 of the watch, but until then, it continues to ruin what would otherwise be a great experience for me.

Here is a quick video that I shot of myself using the watch to start playing music on bluetooth headphones and then start timing a workout. You can see the performance issues in certain places, like when skipping songs and trying to start or stop the workout.

Filter up; noise down

This post is a cliché. It’s been written by many people before me, and it will continue to be written by many people after me. That’s why I wasn’t planning on writing it, but then I listened to a podcast where the hosts talked at length about the same thing, so I thought I might as well add my small voice into the fray.

I’ve decided to significantly scale back the amount of time I spend on Twitter and a slew of other websites and mobile apps. The decision was prompted in part by my old colleague’s question about why the things I posted on Twitter sparked so little engagement relative to the number of followers I have. That was just the kind of jolt that I needed to stop and question why I continued to use Twitter daily and what exactly it was contributing to my life. But in reality, my decision to filter out a lot of the digital distractions that I had allowed into my life stems more from an ingrained desired to continue learning and developing along the dimensions I want to focus on.

The problem is that I haven’t been making a lot of progress on projects outside of work. The source of that problem was two-fold. First, I was spending a lot of time keeping up on current events and with the various social networks that generate tons of content, like Twitter. Second, I’d frequently let myself get sent on a bunch of random journeys by the things I’d stumble upon through that content browsing. Individually, the amount of time I spent chasing down things wasn’t too bad, but in aggregate, it was a big part of my free time every day.

I also found that whenever I had any downtime, or needed to create some downtime, I’d immediately dive back into the digital noise as quickly as possible. It was probably bordering on being a mild addiction.

It feels good to be on top of what everyone is talking about in the topics you are interested in, and it makes you feel like you are learning a lot. But what I’ve realized is that most of it is very low in value; noise that crowds out and muddles the things I want to spend time on.

I’m still not completely comfortable being disconnected from the world’s pulse, but I’m already seeing the benefits in terms of recovered time, reduced distractions, and an improved ability to focus. I’m not naïve enough to think that I can stick with such a strict digital diet for the rest of my life, but hopefully I’ll be able to ease myself into a much more intentional and disciplined level of engagement in the future.