RightMessage
Astro logo
Site compatibilityJavaScript Framework

Add personalization to your Astro application.

Astro builds fast content websites with optional interactivity. RightMessage adds personalization based on visitor segments from your email platform. Show different content to different audiences, personalize components based on subscriber data, and tailor messaging across your Astro site.

Start here

Add RightMessage to your existing Astro setup.

Keep Astro in place and use RightMessage to personalize its existing pages for each visitor.

Using RightMessage with Astro.

Smart opt-in forms that adapt to context

Show different lead magnets based on what visitors are reading on your Astro site. Hide opt-in forms from existing subscribers and show upgrade paths instead.

Increase conversion rates with contextually relevant offers.

Dynamic headlines, CTAs, and content

Personalize any text on your Astro site based on visitor segments, traffic source, or behavior. Show relevant testimonials, case studies, and social proof.

No code required. Just add CSS classes to elements you want to personalize.

PPC landing page personalization

Match your Astro landing page content to ad campaigns using UTM parameters. One page can serve unlimited ad variations.

Improve ad relevance scores and conversion rates with automatic message matching.

Setup tips for RightMessage on Astro.

  • Add the RightMessage script in your base layout component or via astro.config integrations
  • For MPA mode (default), RightMessage works on each page load without needing reset
  • If using View Transitions, call RightMessage.reset() on astro:page-load event
  • Connect RightMessage to your email platform for subscriber-based personalization
  • Astro's island architecture means personalization can target any rendered content

Frequently asked questions.

How do I install RightMessage in Astro?+

Add the RightMessage script in your base layout component's head section using a script tag. Astro will include it on all pages that use that layout.

Does Astro need RightMessage.reset()?+

In default MPA mode, no. Each page load is a full navigation. If you enable View Transitions, call RightMessage.reset() on the astro:page-load event to re-apply personalizations.

Does RightMessage work with Astro islands?+

Yes. RightMessage personalizes any content on the page, whether static Astro content or interactive islands built with React, Vue, or Svelte.

Can I use RightMessage with Astro Content Collections?+

Yes. RightMessage personalizes whatever Astro renders, regardless of content source. Content from MDX files, headless CMS, or any source can be personalized.

How do I handle View Transitions?+

With View Transitions enabled, listen for astro:page-load event and call RightMessage.reset(). This ensures personalizations apply after the transition completes.

How do I add RightMessage to my Astro site?+

Add a small JavaScript snippet to your Astro site, similar to adding Google Analytics. You can also install our npm package for tighter integration. Installation typically takes 5 minutes or less.

Can I personalize without writing code on Astro?+

While Astro is a framework that requires code, RightMessage provides a simple JavaScript API and React/Vue components that make personalization straightforward.

Will RightMessage slow down my Astro site?+

No. The RightMessage script loads asynchronously and doesn't block page rendering. Personalizations are applied after the initial page load. The script is served from a global CDN and is highly optimized. Your Core Web Vitals and page speed scores remain unaffected.

What elements can I personalize on Astro?+

You can personalize any text, images, or content sections on your Astro site. Common personalizations include headlines, CTAs, testimonials, case studies, pricing displays, and entire page sections. You can also show/hide elements and redirect visitors based on segments.

Does RightMessage work with Astro's built-in forms?+

RightMessage provides its own widgets (popups, slide-ins, inline forms, sticky bars) that you can embed on your Astro site. You can also personalize Astro's native forms by showing/hiding them based on visitor segments or personalizing the surrounding content.

Need detailed setup instructions? Read our Astro setup guide →
Ready to launch?

Start personalizing your Astro experience.

Keep Astro in place and add personalized copy, proof, forms, and offers without rebuilding your site.