PyImageSearch: OptinMonster Post Plugin Proposal
Prepared by: Adrian Rosebrock
16 November 2018

Executive Summary

The primary goal of every blog post on PyImageSearch is to collect a reader’s email address. Once the email address is collected we can market to them and ultimately make sales. The more quality email addresses we have, the more revenue the business can make.

Approximately 90% of all blog posts on PyImageSearch have an opt-in targeted to that specific blog post. While we review Python + computer vision code on PyImageSearch, we don’t host the code on GitHub. Instead we put the code behind an email opt-in.

Readers enter their email address in the form, they are able to download the code, and we capture their email address.

The purpose of this plugin is to help facilitate the capturing of email addresses by using OptinMonster. The rest of this document details the current solution (i.e., what we have done to validate this plugin should be created) along with the specifications of the WordPress plugin itself.

Current Solution

This section details how we validated utilizing OptinMonster has increased our reader to subscriber conversion rate. We also discuss our current “hacked” solution and how the proposed WordPress plugin could be used to create a stable, long-term solution.

Code Opt-in Methods

As mentioned above, ~90% of every blog post on PyImageSearch contains an opt-in that enables a reader to download the source code, accompanying image dataset, etc. for that particular post.

For example, refer to the following blog post:


There are two sets of “code opt-ins” on this page. The first one is the ”Downloads” section of the blog post, found at the bottom of the page, prior to the comments section:
For the past three years that was the only code opt-in.

However, three months ago I ran a test where I picked the top-10 blog posts with the most traffic and created a second opt-in using OptinMonster. The opt-in is triggered by clicking the ”Click here to download the source code to this post" link in the figure above. Please note that the opt-in trigger HTML element is “sticky” and doesn’t move as the user scrolls through the post. Take the time now to scroll through the example blog post to see the behavior of the element.

Once clicked, the opt-in is opened:
Once the opt-in is opened the reader can enter their email address and download the source code.

Justification

After running the test, we noticed a 20-25% increase in readers opt-ing in. We therefore want to extend this functionality outside of current set of blog posts and include all blog posts that have code opt-ins.

The “Hacked” Solution

In order to perform the test, we hacked the Floating Social Bar plugin (which is installed on our server). The Floating Social Bar plugin creates, as the name suggests, a floating HTML element with the major social media websites (Facebook, Twitter, LinkedIn, etc.) and displays basic information about the post’s performance on those particular websites. An example of which can be seen in the following blog post:
We then hacked the class-floating-social-bar.php file to not show any social media stats and instead show our custom HTML.

The hack involves defining the template HTML:

// Added by Adrian to test out optin strategy
$uri = $_SERVER["REQUEST_URI"];
$optin = '
    <a href="https://app.monstercampaigns.com/c/{{ DATA_SLUG }}/" class="manual-optin-trigger" data-optin-slug="{{ DATA_SLUG }}" style="display: block;">
        <div style="font-size: 14pt; color: #21212A;">
            <img src="https://www.pyimagesearch.com/static/optins/python_icon.png" alt="" style="margin-right: 10px; width: 40px; height: 40px; float: left; border: none;" />
            <div style="padding-top: 10px;">
                <span style="font-weight: bold; color: #DF4B4B; text-decoration: underline;">Click here to download the source code to this post.</span>
            </div>
        </div>
    </a>
';