Hyperlink token within a tokenized URL

Tom_Liolios4
Level 4

Hyperlink token within a tokenized URL

Hello!

 

I am trying to add a hyperlink to a text token, while that text token is already used to generate a hyperlink for a calendar item.

 

We add the following tokenized URL to our Marketo landing page so people can add our events to their Google calendar:

https://ics.agical.io/alt_sep/?subject={{my.calendar-title}};description={{my.calendar-description}}...

 

In this tokenized URL, we use individual text tokens that are populated when a program is created.

 

However, I would really like to add a hyperlink to the text token {{my.calendar-description}}. That way, people that open the calendar item will be able to right away click on a hyperlink to e.g. attend our webinar.

 

Is it possible to add a hyperlink to the text token {{my.calendar-description}}, and have that token then be used in the overall tokenized URL to create the calendar link?

 

Thank you for your insights!

 

Best,

Tom

 

12 REPLIES 12
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Hyperlink token within a tokenized URL

Yes that's possible! You'd need to URI encode the anchor tag (<a> through </a>) before adding it to the text token. 

 

Instead of setting {{my.calendar-description}}

 

This is our long event description. Please do attend our webinar by clicking <a href="http://www.example.com/" target="_blank">here</a>

 

URI encode <a> through </a>, and set it as - 

 

This is our long event description. Please do attend our webinar by clicking %3Ca%20href%3D%22http%3A%2F%2Fwww.example.com%2F%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E

 

You can then normally reference the {{my.calendar-description}} token in the URL.

 

Hope this helps!

Tom_Liolios4
Level 4

Re: Hyperlink token within a tokenized URL

Hi @Darshil_Shah1  

 

Many thanks for your advice! I got it to work for the Google calendar link.

 

For the Outlook calendar link, it displays the calendar description in an odd way. Would there need to be a different URI encode for Outlook calendar links?

 

https://ics.agical.io/alt_sep/?subject={{my.calendar-title}};description={{my.calendar-description}}...

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Hyperlink token within a tokenized URL

I see what you're saying! In the outlook the anchor tag isn't getting parsed unlike the google calendar (outlook ics file snapshot below for ref.). 

Darshil_Shah1_1-1654168390088.png

I doubt if this can be fixed, as Outlook is always notorious with the HTML (and there is only so much we can code in the ics file link to ensure the hyperlink within it works everywhere). Tagging @SanfordWhiteman to check if he can help in suggesting a way so that the hyperlinks in the long description work in the outlook as well. Thank you!

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Hyperlink token within a tokenized URL

You don’t need a formal <a> tag. Outlook will make any URL-like String in an ICS DESCRIPTION field clickable.

 

So this DESCRIPTION:

DESCRIPTION:https://www.example.com\n \nyay a ya\n

 

Displays like so:

SanfordWhiteman_0-1654195328655.png

 

Tom_Liolios4
Level 4

Re: Hyperlink token within a tokenized URL

@SanfordWhiteman thank you for your input!

 

I do notice that when we insert long URLs for e.g. Microsoft Teams meetings in the {{my.calendar-description}} text token, the URL gets displayed quite horribly. The URL is no longer clickable, and people need to manually select the entire URL string and paste it in a browser.

 

Is there a way to achieve the same result as for the Google calendar? Where a neatly hyperlinked piece of text (click here) links to the URL? Alternatively, we can shorten the URL with e.g. Bitly, but that's not ideal.

SanfordWhiteman
Level 10 - Community Moderator

Re: Hyperlink token within a tokenized URL

Can you provide an example real-world URL?

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Hyperlink token within a tokenized URL

Hi Sandy! 

 

I think I know what @Tom_Liolios4 wants to say here - 

 

Would it be possible to hyperlink the URL in outlook as well?

 

Ex. if you open this .ics link - the long description in the google calendar has a hyperlink to the join the event (highlighted in snapshot below):

Darshil_Shah1_0-1654272851627.png

But the <a> tag isn't getting parsed in the outlook calendar link even when encoded. Although, we can directly use the URL instead of <a> tag and outlook will create the naked URL as you said, but probably it'd be cleaner if we could add the URL to a CTA text in the long description instead. I think that's what @Tom_Liolios4 meant. 🙂

 

Thank you!

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Hyperlink token within a tokenized URL

Ah, I see what you’re saying now!

 

Outlook only supports hyperlinked text within an X-ALT-DESC (non-standard description field). Agical sets the standard DESCRIPTION only.

 

We can explore support for X-ALT-DESC but it’s low-priority for now as lots of other product work is going on. You can log this feature request in our BugBucket.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Hyperlink token within a tokenized URL

Sure, that'd be great. Thank you so much! 🙂