Skip to content
MorphMorph Docs
Plugin Guide

Testing Rules

How to verify your personalization rules work correctly on your published site.

After creating rules and publishing your site, you'll want to confirm visitors see the right variants. This guide walks you through testing each condition type.

Before you test

Make sure:

  1. Your rule is saved and set to Active in the plugin
  2. Your Framer site is published after saving
  3. You're testing on the published URL (not the Framer preview)

The runtime script is cached for 5 minutes. If you just saved a rule change, either republish your site or wait 5 minutes before testing.

Testing UTM conditions

UTM conditions are the easiest to test — just add query parameters to your published URL.

Example: If your variant has the condition utm_source = google, test with:

URLExpected
yoursite.framer.appDefault variant
yoursite.framer.app?utm_source=googleYour variant
yoursite.framer.app?utm_source=facebookDefault variant

This works the same for all UTM types — utm_medium, utm_campaign, utm_term, and utm_content. Just swap the parameter name.

Combining UTM parameters: You can add multiple parameters in one URL:

yoursite.framer.app?utm_source=google&utm_medium=cpc&utm_campaign=spring-launch

Testing device conditions

To test device targeting, use Chrome DevTools:

  1. Open your published site in Chrome
  2. Press Cmd + Shift + M (Mac) or Ctrl + Shift + M (Windows) to toggle device emulation
  3. Select a device from the toolbar (e.g., iPhone 14 for mobile, iPad for tablet)
  4. Reload the page
EmulationDetected as
No emulation (laptop/desktop browser)desktop
iPhone, Android phonemobile
iPad, Android tablettablet

Make sure to reload the page after switching devices. The runtime detects the device on page load, not dynamically.

Testing visitor type conditions

Morph uses a cookie (morph_ret) to distinguish new and returning visitors. On the first visit, the cookie is set. On subsequent visits, the visitor is classified as "returning".

StepActionResult
1Open your site in an incognito windowNew visitor (no cookie) → default variant
2Reload the same pageReturning visitor (cookie set on step 1) → your variant
3Open a new incognito windowNew visitor again (fresh session)

To reset manually: Open DevTools → Application → Cookies → delete the morph_ret cookie.

Testing multiple conditions (AND logic)

When a variant has more than one condition, all of them must match for the variant to show. This is AND logic.

Example: A variant with utm_source = google AND utm_medium = cpc:

URLResultWhy
yoursite.framer.app?utm_source=googleDefaultOnly 1 of 2 conditions met
yoursite.framer.app?utm_medium=cpcDefaultOnly 1 of 2 conditions met
yoursite.framer.app?utm_source=google&utm_medium=cpcYour variantBoth conditions met

Testing multiple variants

When a rule has multiple variants, the first match wins. Variants are evaluated top to bottom.

Example: A rule with three variants:

  1. Variant 2: utm_source = google → "From Google"
  2. Variant 3: utm_source = twitter → "From Twitter"
  3. Default → original content
URLShows
?utm_source=googleVariant 2
?utm_source=twitterVariant 3
?utm_source=linkedinDefault
No parametersDefault

Quick troubleshooting

If your variant isn't showing:

  • Check the rule status — it must be Active, not Draft or Paused
  • Check the cache — wait 5 minutes after saving, or republish and hard-refresh (Cmd + Shift + R)
  • Check the URL — UTM parameters are case-insensitive (Google matches google), but make sure the parameter name is exact (utm_source, not utmsource)
  • Check variant visibility — all variant layers must be visible in Framer's layer panel. Hidden layers are excluded from published HTML. Use the Preview button in the Morph plugin to preview variants safely
  • Check the snippet — go to Account tab in the plugin and verify the snippet status is green

For more details, see Rules Not Working.

Tips

  • Use incognito windows for clean testing — no cached scripts, no cookies from previous visits
  • Keep DevTools Network tab open — check that /api/runtime/your-site-key returns a 200 response with JavaScript content
  • Empty condition values always return false (no match). Make sure every condition has a value filled in
  • Delete or pause test rules when you're done so they don't affect real visitors