Hi Shellie,
Glad to read it worked for you-that means there's hope for me hehe! I keep on getting the following message when attempting to my velocity script token in my email (marketing activities) html:
Marketo does not allow javascript or script tags in email HTML
Please refresh your browser.
Can’t reproduce this. Can you show screenshots of the process you’re following? Just dropping the VTL {{my.token}} into the email works for me.
I am encountering the same error after attempting to use the token as well. I will admit I am rusty in my .html and completely new to JSON, but hoping some screenshots will help! I am just trying to annotate for a promotion in gmail.
My Token:
[{
"@context": "http://schema.org/",
"@type": "DiscountOffer",
"description": "15% Off!",
"discountCode": "LEARN2025",
"availabilityStarts": "START_2025-08-25",
"availabilityEnds": "END_2025-09-19"
}]
Here is it implemented in the email .html. Do I have it in the wrong place above the rest of my code?
You can’t have two <html>
tags or two <head>
s, this is a very strange looking document.
Hello we followed these instructions but getting a Marketo error: Marketo does not allow javascript or script tags in email HTML
Please refresh your browser.
We added this script under the <head>
<script type="application/ld+json">
{{my.googleannotation}}
</script>
The token:
[
{
"@context": "http://schema.org/",
"@type": "PromotionCard",
"image": "https://info.ticketinformationcs.com/rs/525-SZF-856/images/hrl-adl-23-1-1.10-image3-290px.png",
"url": "https://homelottery.com.au/grand-prize/"
},
{
"@context": "http://schema.org/",
"@type": "PromotionCard",
"image": "https://info.ticketinformationcs.com/rs/525-SZF-856/images/hrl-adl-23-1-1.10-image3-290px.png",
"url": "https://homelottery.com.au/"
},
]
What are we doing wrong? it sounds like it does work for others. Appreciate any help, thanks in advance!
Thanks for the swift reply Sanford!
Does that mean we should have everything in the token itself?
So this would all be in the email script token:
<script type="application/ld+json">
[
{
"@context": "http://schema.org/",
"@type": "PromotionCard",
"image": "https://info.ticketinformationcs.com/rs/525-SZF-856/images/hrl-adl-23-1-1.10-image3-290px.png",
"url": "https://homelottery.com.au/grand-prize/"
},
{
"@context": "http://schema.org/",
"@type": "PromotionCard",
"image": "https://info.ticketinformationcs.com/rs/525-SZF-856/images/hrl-adl-23-1-1.10-image3-290px.png",
"url": "https://homelottery.com.au/"
},
]
</script>
And then in the email template, I'd just insert the token under the <head>
<head>
{{my.googleannotation}}
</head>
And no unfortunately we won't be at the summit this year after all! Will you be attending? Would have been great to meet up.