How to Add to Google Calendar Link in Marketo Landing Page and Emails

I‘ve spent an entire day trying to figure out how to enhance Marketo’s calendar invitation method. In my opinion, the ideal would be to send an actual .ics attachment (not just a link). The short of it is that achieving this is not really practical within Marketo, based on some encrypting of the attachment and trying to finagle the email template to send appropriately.

I thought it’d be interesting to figure out how to add Google Calendar links in both emails and landing pages in Marketo. Here’s how you do it!

First off, here’s a support link on how to create links in Google Calendar, which is really just a fancy way of creating a link that you can copy and paste.

I made an example to see how it was created within the Google URL structure for Calendar links:

<a href="http://www.google.com/calendar/event?action=TEMPLATE&text=TITLE&dates=20130915T100000Z/20130915T110000Z&details=DESCRIPTION&location=LOCATION&trp=true&sprop=EXAMPLE%20WEBSITE%20NAME&sprop=name:WWW.EXAMPLE.COM" target="_blank"><img src="http://www.google.com/calendar/images/ext/gc_button3.gif" border=0></a>

The above HTML translates into this:

So now the question becomes how to automate the creation of this button in Marketo. To create this Google Calendar invitation link in Marketo, you could go about it in two different ways:

  1. Go to that GCal event builder link every time and copy-paste the results.
  2. Tokenize that link structure above and create Marketo tokens for piece, then make sure to get the tokens filled out every time you have a new event.

Tokenizing is the best for scalable marketing automation. Here’s how to tokenize the Google Calendar link in Marketo!

You can just copy and paste the below code into a landing page or email and it’ll create a link for you populated by the tokens you define:

<a href="http://www.google.com/calendar/event?action=TEMPLATE&text={{my.calTitle}}&dates={{my.calDateStart}}T{{my.calTimeStart}}/{{my.calDateEnd}}T{{my.calTimeEnd}}&details={{my.calDescription}}&location={{my.calLocation}}&trp=true&sprop={{my.calWebsiteName}}&sprop=name:{{my.calWebsiteURL}}" target="_blank">Add to Google Calendar</a>

Now the tokens you’ll want to create (all of which should be text tokens, not rich text tokens).

{{my.calTitle}} = Title of event/meeting.
{{my.calDateStart}} = Starting date of the event in this format: YYYYMMDD
{{my.calTimeStart}} = Starting time of the event in military time GMT, in this format: HHMMSS
{{my.calDateEnd}} = Ending date of the event in this format: YYYYMMDD
{{my.calTimeEnd}} = Ending time of the event in military time GMT, in this format: HHMMSS
{{my.calDescription}} = Description of the event
{{my.calLocation}} = Location of the event
{{my.calWebsiteName}} = Name of your website
{{my.calWebsiteURL}} = URL of your website

After that, it’s pretty easy to throw the link up in different spots on your landing pages and emails. This could be pretty nice thrown into a JavaScript accordion or a CSS accordion. I would definitely suggest changing up the default Google Calendar image, because it’s not the prettiest.

This would be especially useful if you’re looking to add some more options to your webinar invites. If you just add these tokens to the to-do list for creating a new webinar, there’s really not much more work imposing on your workflow.

Regarding other calendar solutions, I couldn’t find a Yahoo! solution that was very easy, or at least one that could be tokenized with Marketo as easily. You can do similar things, it just takes some more busy work of creating an event in Yahoo! and then sharing the link. Apparently you have to create the event first before being able to share it, which adds another task in your workflow.

Pin It
  • Alice

    This is amazing. Thank you for posting this!

  • Dave Selhime

    I’m using this technique, (thank you for your post, BTW) however I’m finding that Google is not translating the start and end times into my timezone. Is there something I’m missing in the Google code or could it be my personal Google calendar settings?
    Thanks again.

    • Edward Unthank

      I think that would be your personal calendar settings—the time zone is GMT, which is used as a global standard and then translated into the appropriate time zones based on your local settings.

    • Sam

      Try adding Z after each HHMMSS in your query.