Here at Devpost, our goal is to celebrate software creators. We think that developers want to work with other developers that they are inspired by and look up to. This is our first step in exploring whether or not that is true.
How it works
Anyone can add a "Work with Me" button to their profile by visiting their Settings Page and filling out the
Is your company hiring? field on their user settings page like so:
After filling out this field, you will see the "Work with Me" button appear on your portfolio as well as alongside your contributions to any projects that you have created or worked on.
Challenges I ran into
mixpanel.init towards the end of the body. It looks like both the snippet and the Mixpanel client define
mixpanel.init, meaning that half of the time we were calling the one from the snippet and the other half of the time we were calling the one from the downloaded library. This means that our calls to
mixpanel.track_links were only working about 50% of the time and tracking clicks on the button was not going well.
I'm not 100% sure given the minified nature of the snippet, but I believe it queues up any calls you make to Mixpanel before the library has finished downloaded, and then sends them when the client has fully downloaded. The client however also defines
mixpanel.init to replace the one defined by the snippet incase the client library is finished downloaded before
mixpanel.init is called. It seemed like our calls to
mixpanel.track_links were lost in the latter scenario when we were calling the initialize method of the full client library.
Moving our call to
mixpanel.init from the end of the body to the head right after the async download is kicked off resolved the issue and ensured that our calls to
mixpanel.track_links were always recorded.
Accomplishments that I'm proud of
I'm proud of fixing our race condition, mostly because we didn't know it existed until now, and I really had to dig into the snippet provided by Mixpanel as well as the client code.
What I learned
What's next for Work With Me
We'll be monitoring the Mixpanel data to see whether or not users are engaging with the button, which page the buttons are more often clicked on (portfolio vs project details page), etc. We'll know what's next after we've had time to digest the data and choose a path forward.