← Back to Recipes
Embed chart in Mailchimp campaign
Generate a chart URL and use it in a Mailchimp campaign via an image block or merge tag.
1. Render chart with returnUrl
const { url } = await client.render({
type: 'line',
data: { labels: ['Jan','Feb','Mar'], datasets: [{ data: [10,20,30] }] },
returnUrl: true,
});2. Use in Mailchimp
<img src="*|CHART_URL|*" alt="Monthly stats" width="600" height="300" />
Pass url as a merge tag value when sending the campaign.