Overview
Experience Lab is a browser-based code generator. You fill in a form, click Generate, and get a self-contained JavaScript snippet ready to paste into Adobe Target's Visual Experience Composer (VEC) Custom Code editor. No server, no account, no dependencies.
The generated script is a single IIFE (Immediately Invoked Function Expression) that runs entirely in the visitor's browser. It creates the modal DOM, injects scoped styles, handles trigger logic, enforces frequency rules, and — for email capture modals — submits to your chosen platform.
📝
Fill in the form
Content, trigger, frequency, styling
→
⚡
Generate Script
Click or press Cmd+Enter
→
📋
Copy output
Syntax-highlighted, ready to paste
→
🎯
Paste into VEC
Custom Code editor · Activate
Modal types
Standard modal — displays a headline, body copy, and a CTA button or link. Ideal for promotions, announcements, offers, and content gates.
Email capture modal — adds an email input field and submit button. On submission, validates the email client-side and posts it directly to your configured email platform via XHR. No Experience Lab server is ever involved in the data flow.
Standard modal
✕
Don't miss this offer
Get 20% off your first order. Limited time only.
Claim Offer
No thanks
CTA links to a URL
Email capture modal
✕
Get the free guide
Join thousands of marketers. Delivered to your inbox.
Enter your email
Send me the guide
No thanks
Email posted to your platform via XHR
Form sections
Content — sets the modal type, headline (with text alignment), body copy (with text alignment), CTA label and URL (standard) or email placeholder, submit label, and success message (email capture). Also sets the dismiss button text and style.
Image — optionally adds an image to the modal. Source options: upload a file (encoded as base64, no hosting needed), reference an external URL, or generate a QR code from any URL. Control position (8 placement slots), alignment (left / center / right), width, alt text, and whether the image is clickable with its own destination URL.
Campaign Tracking — optionally appends UTM parameters (utm_source, utm_medium, utm_campaign, utm_term, utm_content) to your CTA link, image click URL, or both. Applied at generate time so the baked-in URLs always carry the correct attribution.
Trigger — determines when the modal fires. Options: Page Load (with optional delay), Exit Intent, Scroll Depth, User Idle, Element Click, Back Button, and Custom JS Event.
Frequency — controls how often the modal appears per visitor. Rules are stored in localStorage keyed to the page URL. Options range from Always Show through to complex combinations like N times over a rolling window or conditional profile attribute checks.
Styling — sets modal width, border radius, CTA type, button colour, text colours, font sizes, and close button position. A live preview updates in real time as you type.
1
Content
Modal type · Headline (align) · Body (align) · CTA · Image · UTM · Dismiss
2
Trigger
When the modal fires · 7 trigger types
3
Frequency
How often it shows · 16 cap options
4
Styling
Width · Shape · Colours · Font sizes
7 trigger types
⏱Page Load+ optional delay
🚪Exit Intentmouse leaves viewport
📜Scroll Depth% of page scrolled
💤User Idleno activity for N ms
🖱Element ClickCSS selector
⬅Back Buttonpopstate event
📡Custom Eventany JS event name
Live preview
The center panel renders a live preview of the modal as you configure it. It reflects content, text alignment, colours, font sizes, modal type, and image placement — including the email input in email capture mode. The preview is a pure HTML/CSS mock; it does not execute the generated trigger or frequency logic.
Images
Any modal type can include an image — a logo, promotional graphic, product shot, or QR code. Choose a source: Upload encodes the file as base64 directly into the script (no hosting needed); URL references an externally hosted image; QR Code auto-generates a scannable code from any URL via the Google Charts API.
Eight placement positions are available: above headline, below headline, float left, float right, above CTA, below CTA, bottom of modal (below the dismiss link). Alignment (left / center / right) applies to all positions. Images can optionally be made clickable with a dedicated destination URL, independent of the main CTA.
Uploaded images are encoded as base64 data URLs and embedded in the script. Keep promotional images under ~200 KB for best performance inside Adobe Target's VEC.
8 image positions
⬆Above headlinehero / banner
↕Below headlinebetween title & body
←Float leftbeside content
→Float rightbeside content
🔼Above CTAtrust badge / QR
🔽Below CTAproduct shot
⬇Bottombelow dismiss link
⬛QR auto-genany URL → scannable
Campaign tracking (UTM)
Enable Add UTM Parameters to append standard UTM query string parameters to your links at generate time. Parameters are baked into the script so every visitor who clicks the CTA or image carries correct attribution into your analytics platform — no tag manager setup required.
Configure utm_source (e.g. adobe_target), utm_medium (e.g. popup), utm_campaign, and optionally utm_term and utm_content for variant differentiation. Choose whether to apply UTMs to the CTA link only, image click only, or both.
Generating code
Click Generate Script (or press Cmd/Ctrl + Enter) to produce the output. The code appears in the right panel with syntax highlighting. Click Copy to copy it to your clipboard.
The output is wrapped in <script>...</script> tags, matching exactly what Adobe Target's Custom Code editor expects.
Pasting into Adobe Target
In the VEC, select the element where you want the modal to appear (the <body> tag is recommended), choose Edit > Insert After or use the Custom Code option, and paste the generated script. The modal attaches to document.body at runtime so the exact element selection in the VEC matters less than ensuring the script executes on the correct page.
Frequency storage
Frequency state is stored in localStorage under a key derived from the page URL and a counter name. Clearing browser storage resets all frequency caps. The generated script catches localStorage errors (private browsing, storage quota) and falls back to showing the modal rather than silently failing.
How frequency state is stored
Modal fires ✓
↓ record()
localStorage
vt_count 1
vt_last 2025-03-15
vt_dismissed false
↑ canShow() checks on next visit
State persists across sessions · Cleared when browser storage is cleared · Fails gracefully in private browsing
Email platform integrations
When the Email Capture modal type is selected, an Email Platform selector appears. Choose your platform and fill in the required credentials (API key, list ID, form ID, etc.). The generated script posts the email address directly from the visitor's browser to the platform's API — Experience Lab never receives or stores any email data.
Supported platforms: Klaviyo, Mailchimp, HubSpot, ActiveCampaign, Brevo, Omnisend, Drip, ConvertKit, Custom Webhook (POST), and Google Tag Manager (dataLayer push).
Email submission data flow
👤
Visitor
submits email in modal
🚫
Experience Lab servers
never in the data path
VEC compatibility
The generated code is hardened for the VEC execution environment, which runs scripts in a sandboxed context that differs from a standard browser page. Compatibility measures include: IIFE wrapping, waitForBody() polling instead of DOMContentLoaded, XHR instead of fetch, explicit top/right/bottom/left instead of inset, margin-bottom instead of gap, vendor-prefixed flexbox, and parentNode.removeChild() instead of .remove().
Generated scripts work in both at.js and Web SDK (Alloy) environments. The Custom Code execution model in the VEC is the same regardless of which library delivers the activity — Experience Lab scripts use waitForBody() polling so they are safe whether at.js or Alloy applies the experience. See the at.js Reference and Web SDK Reference pages for implementation details.
Compatibility fixes applied to generated code
DOMContentLoaded
waitForBody() polling
inset: 0
top/right/bottom/left: 0
gap: 12px
margin-bottom: 12px
el.remove()
parentNode.removeChild(el)
el.closest()
manual parent-walk loop
display: flex
display: -webkit-box; display: flex
function closeModal()
var closeModal = function()
Browser support
Generated scripts target IE11+ and all modern browsers. Vendor-prefixed CSS and pageYOffset fallbacks are included automatically. The Experience Lab interface itself requires a modern browser (Chrome, Firefox, Safari, Edge).
Generated script runs in
Chrome
Firefox
Safari
Edge
Samsung Internet
IE11 ⚠
Experience Lab interface requires
Chrome
Firefox
Safari
Edge
IE11 ✕