How to stop {{system.viewAsWebpageLink}} being encrypted for sharing via Web Share API

tomh2
Level 2

How to stop {{system.viewAsWebpageLink}} being encrypted for sharing via Web Share API

Hi all,

I want to use the Web Share API in combination with the
{{system.viewAsWebpageLink}} token to enable email recipients to forward a link to their email to their friends via their preferred method (e.g. Whatsapp rather than email).

I have created an intermediary landing page https://landingpage.html with a 'Share this' button on it that launches the Share dialogue box. I am passing the "view email as webpage" link through to the landing page as a parameter in the URL as follows: https://landingpage.html?viewAsWebpageLink={{system.viewAsWebpageLink}}

When the email is in preview mode, this works fine. The viewasWebpageLink parameter is populated with the correct "view email as webpage" URL, which is then passed through to the share dialogue box for people to share via their preferred channel when people click the 'Share this' button on the landing page.

However, as soon as I send a test email the "view email as webpage" link is somehow encrypted by Marketo so the landing page URL becomes:
https://landingpage.html?viewAsWebpageLink=https://em.mycompany.org.au/v/${mktmail.encryptShortUrl1}
And when I click ‘Share this’ on the landing page the link passed through to the share dialogue box becomes:
https://em.mycompany.org.au/v/${mktmail.encryptShortUrl1}

Is there a way we can stop the {{system.viewAsWebpageLink}} being encrypted when sent via email?

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: How to stop {{system.viewAsWebpageLink}} being encrypted for sharing via Web Share API

The View As Web Page version isn't suitable for web sharing. It's personalized for the original recipient, and clicks and subsequent web activities are attributed to the recipient.

In any case, you can't use test emails to work with VAWP: what you're seeing here isn't the encrypted URL but the opposite, a placeholder for the true URL when sent via standard email.