Custom Conversion Tracking in WooCommerce

If you integrate any third-party services with your WooCommerce site (for ads, analytics, marketing, drop shipping, or A/B testing), it’s often helpful or necessary to provide conversion data through javascript.

A lot of the big services, like Google Analytics (tutorial) or Facebook ads, have off-the-shelf extensions you can use. But for smaller services, you often have to write some custom code to send them the conversion information.

Generally the easiest way to do this is by using the woocommerce_thankyou hook. This action is only fired on the order confirmation page and also provides the $order_id variable, which gives access to all the order details. Continue reading

Interview: Elmastudio

Elmastudio is a WordPress theme shop run by Ellen Bauer and Manuel Esposito. Their approach to themes in unique, with interesting layouts and minimalist artful design. Even content for the theme demos has original photography and writing.

We talked a few months ago via Skype, soon after the release of Onigiri and Ponsonby. We discussed the design process, finding inspiration, traveling, and the WordPress community. I was inspired by the creativity and passion they bring to their craft. We talked for a little over an hour, which I edited that down to about 45 minutes of audio. I also wrote up much of the interview for you to read below. Hope you enjoy both!

Continue reading

Efficient Script Loading for oEmbeds

I’ve been using FitVids.js in a lot of recent themes to ensure video displays nicely in responsive layouts. I wrote about this in detail for a previous post.

The FitVids script is super tiny (1.7k), and I generally concat it will all my other scripts and then minify using Grunt. So, it’s really not a lot of additional page weight to include the script. However, I was just clued into an alternate method when doing a theme review for the Make theme on that could be slightly more efficient.

Generally FitVids will only be required if video is loaded via an oEmbed (YouTube, Vimeo). So, if we hook into the oEmbed and already have the FitVids registered to load in wp_footer, we can just enqueue the script when it is needed. Continue reading