In-person or virtual events revolve around getting to know other people and learning from one another. Because email is such a personal channel, it’s the ideal medium to build excitement for events and send those all important event reminders.
Why You Should Use Calendar Links in Email Campaigns
To ensure that guests actually show up, include an “Add to Calendar” link in your event emails. With that, subscribers can add your events to their own calendars, helping them avoid calendar conflicts and allowing them to set up their own reminders. And maximizing the chance of them attending your event.
Traditionally, this is done with an ICS file—also known as iCalendar. This is a common calendar format that typically uses the .ics file extension and is widely accepted by most calendars. Not to be confused with Apple’s iCal, which shares a similar name, although iCalendar files do work there as well. For clarity, we’ll refer to this as an ICS or calendar file throughout this blog post.
Some calendars can also add events from web links—what we’ll refer to as calendar links. Taking the extra time to dynamically show the “Add to Calendar” link that matches each subscriber’s specific email client can make it easier and faster for your subscribers to add your event to their calendar.
We’ll walk you through which calendars you should care about, creating the actual calendar files and links, and coding these files and links into your event email for the best subscriber experience.
Step 1: Choose which calendars to target
There are countless different calendar applications available: ones available by default through your computer or mobile phone’s operating system, as part of your webmail, or another calendar application you’ve downloaded. It’s virtually impossible to support all the calendar applications out there.
To help you understand which calendar tools to focus on, take a look at your Email Analytics data.
All calendars are capable of using an ICS file to add new events to it. But it requires people to first download the ICS file and then upload it to their calendar.
However, in Gmail, Office 365, and Outlook.com, you can also add events using a link that automatically includes your event details. This leads to a better subscriber experience, since it takes just one click for your subscribers to add your event to their calendar.
Here’s a handy chart that quickly summarizes which calendar accepts which “Add to Calendar” method to help prepare you for the next step.
“Add to Calendar” Method by Calendar
Calendar | ICS Calendar File | Calendar Link |
Google Calendar | ✓ | ✓ |
Outlook.com | ✓ | ✓ |
AOL | ✓ | ✓ |
Yahoo | ✓ | ✓ |
Office 365 | ✓ | ✓ |
Outlook (desktop) | ✓ | ✘ |
Apple Calendar | ✓ | ✘ |
Friendly reminder: while it’s easier for you to only create an ICS calendar file because it’s accepted by most email clients, it’s not easier for your subscribers.
Personalizing the calendar link for each email client increases the chance that your subscribers will actually add your event to their calendar (and attend and convert!) since it’s just one click away. Making someone add an ICS file to their calendar requires more steps, and you might lose some folks along the way.
Step 2: Generate the “Add to Calendar” Link
Depending on which email clients your subscribers use to read emails, you may choose to create an ICS calendar file, calendar link, or both.
How to create ICS calendar files
Because ICS files power the links for many calendar applications, this is always a great fallback to have.
To get started, we recommend this iCalendar Event Maker tool to generate the files. It allows you to add any information your subscribers may need to know about the event such as location, description, and a URL. You can even get more specific with your event, having it repeat or adding notifications for your guests.
Once your audience adds your file to their calendar, they have the details that make it clear what the event is for. And it acts as a reminder as to why the event is in their calendar.
How to create calendar links
To create “Add to Calendar” links for webmail calendars, we suggest Amit Agarwal’s Calendar Links tool. It will generate the entire URL you’ll need to include in your email.
There is a downside to this tool: you can’t create recurring events or include a notification like you can with ICS files. You can add these details to the calendar URLs, but you’d have to create them in each calendar, which you may not have access to.
This is why it’s good practice to create an ICS calendar file in addition to calendar links.
Never send a broken email again Prevent email errors—like broken “Add to Calendar” links—with automated QA testing. Send on-brand, error-free emails with confidence (and protect your brand reputation). |
Step 3: Code your “Add to Calendar” links for your email
Before we get to the really fun part (coding!), you need to decide how you’re going to present your “Add to Calendar” link.
Decide how to display your “Add to Calendar” button
As we mentioned earlier, traditionally, there are multiple “Add to Calendar” links along with the ICS file button. When using dynamic buttons as your Add to Calendar buttons, you have two different options:
- Show one: You can target each subscriber’s email client and dynamically display the specific link that matches their email client.
- Show all: You can use a hybrid model where the main call-to-action (CTA) button is personalized for each subscriber’s email client, and you still provide the alternative calendar links.
If you can personalize the “Add to Calendar” link for every subscriber, you might wonder why you’d want to consider showing the other calendar links at all.
Showing just one link doesn’t take into account people like, well, me. I’d often use my work email to sign up for emails so I could see what they looked like in Outlook. But I’d want to add the event to my personal Gmail calendar. This can be a point of friction for people if only one calendar link is provided.
The second option of showing multiple calendar links is a great way to solve this problem.
It’s a little more complicated than just hiding and showing CTA buttons based on email client preference, but it provides the best user experience in my opinion, as you meet the subscriber in their inbox, but still accommodate for any workflow they may have.
Create your CTA buttons and links
So, now for the fun part: coding the ICS file button as the default. Start with this because it works everywhere no matter which email client, app, or device your subscribers read from.
First, get the ICS file you created in step 2 using the iCalendar Event Maker tool. Then, upload it to your company’s servers, content management system (CMS), or email provider’s media library.
Now it’s button building time. There are lots of different ways to build a button; you can check out our Ultimate Guide to Bulletproof Buttons for a few of them. These days, we’re a fan of Mark Robbins’ accessible button, so here’s an example of that you can use:
Then, create the URLs for the other email client’s calendar links you plan on using and put them under the button you just created:
Outlook.com | Office 365 | Google | AOL | Yahoo
At this point, you could stop. This code provides the button and additional links for the best subscriber experience. However, if you want to provide a more personalized experience by creating a dynamic button that works in the email client your subscribers are opening your email in—read on!
Target the right audience with the right calendar link
For each email client that you want to target, you’ll have to create a new version of the button. And then show and hide the buttons and the links under the button with email client specific CSS.
Pro tip: put each targeting CSS in its own style block as adding them to the main style block has been known to mess with the targeting.
So which email clients can you target?
- Gmail
- Office 365
- Outlook.com
- Yahoo/AOL
You can also target the desktop client for Outlook, but since that would use the default button anyway, you don’t need to target it for once. (Wahoo!)
Before we can get to the nitty gritty of how to target each email client, we need to create the different versions of the buttons. Since we don’t want these buttons to show up on Outlook desktop clients, we’ll wrap them all in a conditional statement. Then we’ll copy the button from above once for each email client we want to target and update the links. Which leads us to something like this:
Add to your Google Calendar
Add to your Outlook Calendar
Add to your AOL Calendar
Add to your Yahoo Calendar
Then we’ll add a link to the list under the buttons for the ICS file so that we can have that show up in email clients:
That’s wonderful, but now you’ve got a bunch of buttons showing up and links showing up. Let’s clean all that up by adding some targeting classes.
Start with the Default
We’ll add default classes on the ICS file button so we can hide/show it:
Then we add a around the link for the ICS file and add a class so we can hide it when the default button is showing:
Now that we’ve got the classes we’ll create the style block to do the hiding and showing:
As we add the classes to the rest of the buttons, we’ll come back to this style block and hide them as the default.
Gmail
Moving on to the Google button, we add a class to the button so we can show it:
And then we add a class on a span and wrap it around the Google link to hide it:
For the style block for Gmail we’ll take advantage of the fact that Gmail automatically changes the doctype to . This is placed adjacent to a
tag. So use the following to target content in Gmail:
u + .body .foo {}
The style block to hide the default and show the Gmail button looks like so:
And the default style block gets updated as well:
Outlook.com and Office 365
The button for the Outlook web apps has one button that works for both of them. So the button ends up like this:
For adding the calendar links, we’ve included copy for both Outlook.com and Office 365 to remove any confusion for our subscribers, but since they’re both the same link, we can wrap the span around both of them:
There may be some confusion as Office 365 has both a desktop and a webmail client. However, the targeting only applies to the Outlook webmail client which ensures the main button for the desktop client links to the ICS file while in the webmail client, it’s the URL to the calendar link.
Both Outlook.com and Office 365 webmail prefixes class names with x_ but doesn’t do this on attribute selector. So your styles block can be targeted with:
[class="x_foo"] {}
…and it’ll only apply to the Outlook webmail client. Therefore, the style block for the Outlook webmail client looks like this:
And the default block needs to be updated as well:
Yahoo and AOL
Yahoo and AOL are targetable with the same code. Both support calendar links these days. You can create the add to calender link for Yahoo using the above tool. Then to make the AOL link, you’ll replace “yahoo” in the URL with “aol” and voila AOL calendar link.
Since there isn’t a way to target AOL or Yahoo separately, you’ll need to include both versions of the buttons for those email clients, so they both get the same class:
And the both the AOL and the Yahoo links will be added in one span, much like the two Outlook links:
To target Yahoo and AOL we take advantage of the fact that Yahoo and AOL will replace .& with their wrapping id. So your Yahoo and AOL styles can be targeted with:
.& .fubar { }
This makes the AOL/Yahoo style block look like this:
And then the default style block needs to be updated one last time…
See these “Add to Calendar” links in action
So while the above code is beautiful, you’re probably wondering what it looks like when implemented in an actual email. Lucky for you, we coded it up in Litmus Builder so you can see what the “Add to Calendar” button and links look like live and how they render across different email clients and devices.
Keep in mind we used different copy for the different buttons to make sure the correct buttons are showing up in the correct email clients. You could very easily have all the buttons say “Add to Calendar”. If you do that, make sure the correct buttons are showing in the right email client by carefully QA’ing your email in each email client.
Now go give your event guests this special email treatment!
Make sure your event emails look right Broken emails mean less conversions—like fewer people adding your event to their calendar. Yikes. Prevent email errors and protect your brand reputation with Litmus Email Previews and more. |
This blog post was originally published on May 8, 2019, by Jaina Mistry. It has been updated on September 20, 2023, for clarity and with new information.
The post How to Create an “Add to Calendar” Link for Your Emails appeared first on Litmus.