How to build a newsletter archive

5 minute read

Publishing a Newsletter Archive to your Website

Many brands use DailyStory to send newsletters to their customers. Often, they want to archive these newsletters on their website or make them publicly accessible so people can view past issues.

DailyStory support a feature to auto-publish and provides APIs in case you want more control over how the content is shown. For the purpose of this tutorial we’ll examine how we do this for the DailyStory Newsletter.

There are three ways you can publish your email on your website with DailyStory:

  • Automatic with Web View enabled
  • Write custom JavaScript and HTML
  • Publish the HTML directly

In this tutorial we’ll examine all 3 options.

Option 1 – Automatically publish a newsletter archive

When creating an email in DailyStory, one of the Advanced Options is to enable “Web View”. When Web View is enabled this does 2 things:

  1. When the *|WEBVIEW|* token is used in the body of the email, a personalized version of the email is accessible via a unique URL.
  2. Enables a publicly shareable URL. Unlike the unique URL used by *|WEBVIEW|* this URL does not contain any personalization.

For any common personalization tokens, such as first name, the test contact data is used for these tokens.

Email Advanced Options

Below is a screen shot of this setting in Advanced Options for enabling automatic email newsletter archive:

Configure DailyStory email advanced options

Once enabled, click on the “Use this URL” link. For example, the publicly shareable URL for DailyStory’s September 2024 newsletter:

Example Public Newsletter

At the top of the page is a link with the Subject of the email, e.g. “Tips and New Features from DailyStory | September 2024”. Clicking that link will take you to a archive page that lists all the past published email.

The emails all must have Web View enabled to show up in this list.

An example of newsletter archive list

List of archived newsletters

This allows all published newsletter to be easily accessible. But you may want better control over the UI of how this list is displayed. To accomplish this we’ll write some custom JavaScript and HTML.

Option 2 – Use your own HTML to publish a newsletter archive

The list of all emails for a given campaign that have Web View enabled is also accessible as a JSON array. When viewing the archive page in the steps above,  you’ll find a ‘Get JSON’ link in the footer of the page.

Email list JSON

Using our example of the DailyStory newsletter. Here is what that JSON looks like:

Newsletter list JSON

The API only returns the path of the URL. This is because some customers host with custom domains.

Using this JSON we can write JavaScript to read this endpoint and render a list.

Example of custom list using JavaScript and HTML

Below is a screen shot of how we’ve done this for the DailyStory site (you can view source to see the exact JavaScript):

Newsletter list website

In this example, the URL for each of the cards links to the publicly shared URL. However, we could also export the HTML and host it directly if we wanted to too.

Option 3 – Publish the newsletter archive by exporting the email HTML

The final, and most advanced option, gives you full control over exactly what you want published.

The use case here is when you want to publish your email newsletter on your website directly. Or, you don’t want DailyStory to publicly host a page with your email content.

Get the raw email HTML

To get the raw HTML of your email navigate to the Advanced Options in DailyStory for the email:

Advanced Options export email HTML

 

Click the “Export” button and this will export the raw HTML of your email. You can then post this HTML directly in your own content management system.

Some editing of the HTML may be required.

Conclusion

Publishing a newsletter archive with DailyStory’s email marketing capabilities is easy. Creating web accessible versions of this email is also just as easy to setup with both automatic and custom choices available.

Want to receive more great content like this for free?

Subscribe to our newsletter to get best practices, recommendations, and tips for digital marketers