Building An Insights And Analytics Newsletter: From Proof Of Concept To Feature Release – Forbes

As software engineers at Forbes, were always building innovative features and working on prototypes for potential projects. Some proof of concept initiatives remain in the testing state, but some end up being shared with a larger audience. Bertie Bulletin, a monthly email containing user stats, was a project that started as an engineering initiative and turned into a monthly email sent to both active Forbes Staff and Contributors who write for the Forbes website.

Currently, writers have access to their user and story stats through Bertie, Forbes Content Management System where they can write, edit, and publish their articles. Bertie Bulletin was created from a suggestion to better equip writers with the knowledge they need to understand their stats, as well as provide them with a record of historical stats. Bertie Bulletin is similar to a bank statement that helps writers keep track of their performance from month-to-month. We included the top performing stories for the previous month, based on how many page views the story received, audience stats, and a referral breakdown indicating where readers are coming from. While these emails have some of the data that already exists in the stats dashboard, they also extend to include insights. Insights are comparisons of data, such as this month or year versus the previous month or year.

Linking entities. Network, networking, social media, internet co

As we built Bertie Bulletin, we made sure to fully utilize pre existing projects in the Forbes Engineering universe. The initial approach used Directed Acyclic Graphs, or DAGs, which are written in Python, therefore, so was Bertie Bulletin. To create the mailing list we consulted with our API team, who utilized cloud functions to generate the mailing lists with the given parameters. We used Mailgun, an email delivery service used by other Forbes projects, to store mailing lists and email templates as well as trigger emails. Our codebase made calls to the Forbes stats API to fetch the numbers and generate insights, which were then stored as recipient variables in Mailgun.

A lot of research went into figuring out which templating engine made sense to use. The initial email was set up in a single HTML file, though it wasnt pretty to look at or easy to edit. Our list of wants included an engine that would allow for use of template inheritance and control structures. In other words, we could break the email down into sections with conditionals that would then be compiled. This led us to Jinja, which describes itself as a fast, expressive, extensible templating engine, making it ideal for our purposes.

Setting up the Jinja flow for Bertie Bulletin required three different steps: creating the Jinja files containing our HTML elements, using built-in methods to render a single HTML file, and uploading that file to Mailgun to use as the email template.

Our Minimum Viable Product (MVP) had a couple of must-haves for our writers. This included top stories, audience stats, total published stories, and information on page views. This first version of the email was released in February 2022, rendering January stats data. With each iteration of these emails, we included new features to enable writers to visualize their information in a more palatable manner, such as an audience stats donut chart and a traffic source types referral table, to name a few.

Screenshot of Bertie Bulletin donut chart and referral breakdown designs.

The process to deploy Bertie Bulletin emails can be split into a few broad steps. Initially, the email template is generated and uploaded, and the mailing list is sanitized. The next steps retrieve each writers data from the stats API and transform it into useful pieces of information. Lastly, each users data is updated and the email is triggered.

In order to figure out the best deployment strategy for Bertie Bulletin, we once again turned to Forbes Engineering. We consulted with our DevOps team and they suggested using Argo-Workflows, a container-native engine that enables the orchestration of parallel jobs on Kubernetes, an open-source platform for working with containers. Each step was containerized into a reliable package of the execution environment and applied into a self-contained image. The advantage of using containers was that each one would be small and do a defined unit of work which could then be scaled horizontally and completed in parallel, thus finishing the batch work quicker. Optimization was important because we expected to send a couple thousand emails every month. With Argo's fully featured UI, we were able to see each containerized step as a stage in the Argo workflow and visualize its progress. If a step errored out for any reason, Argo could retry the step and provide us with logs to better debug the issue.

As we reflected on the process of creating Bertie Bulletin, we realized that the advice from Jackie Has previous article still applied at any level.

3d rendering of question mark on speech bubble. Brainstorming, business concept.

Be Inquisitive: In the beginning, we had a lot of conversations with product owners to hash out details. What did the MVP look like? What were the specific requirements at each stage?

Know When To Ask For Help: With a large project like Bertie Bulletin, it was inevitable (like Thanos) that we would run into the unknown (like Elsa). To overcome these roadblocks, we consulted with various people throughout the process for guidance on the best way to execute.

Learn How To Debug: Because Bertie Bulletin had so many moving parts, if something went wrong we needed to be able to pinpoint exactly where the error came from. This meant we had to figure out how to debug effectively and efficiently.

Proofread Your PRs: Whether you are on team unified view or team split view, its good practice to review your own PR in Github before sending it out to others. The visual comparison can help you catch a sneaky print() or syntax errors easily missed within your code editor.

Taking this project from prototype to production was a strenuous effort that required collaboration across many teams. After many hours of pair programming, screen sharing, and debugging sessions, being able to finally see the end result live and hearing positive feedback from the recipients made the process worthwhile.

Go here to read the rest:
Building An Insights And Analytics Newsletter: From Proof Of Concept To Feature Release - Forbes

Related Posts
This entry was posted in $1$s. Bookmark the permalink.