Clew

How to add a paywall upgrade prompt with Qwen Code without a developer

A soft paywall with Qwen Code: when a free user reaches a paid feature, a modal explains the upgrade and links to your pricing page — targeted by plan, measured, and editable without a release.

Time
● 20 minutes
Price
14-day free trial, no card
Who does it
You and Qwen Code

Example: an upgrade prompt with Qwen Code

A B2B back office with a Basic plan. Managers on Basic who open /admin/analytics see “Sales analytics is part of Advanced” each time, with a link to the upgrade page.

What Clew does and doesn’t do. Clew shows the upgrade prompt — a modal with your text and a link to your own pricing or checkout page — to the users your rules select. It doesn’t take payments, doesn’t manage subscriptions and doesn’t hide or lock content: your app decides who has access, your billing provider charges the card.

This format is part of the Pro plan. Every new account starts with a 14-day free trial with all formats and audience rules, no card required. When the trial ends nothing is deleted and published items keep showing; the Free plan keeps tours and tooltips free.

How to add the paywall prompt with Qwen Code, step by step

  1. Step 01

    Copy your Clew snippet

    Create a free account (or sign in), add your site and open Admin → Overview. Click the line in the “No signal from the widget yet.” card to copy it — it carries your real site key instead of the placeholder.

    <!-- Clew: replace PASTE_YOUR_SITE_KEY with the site key from Admin > Overview -->
    <script src="https://tryclew.io/widget/PASTE_YOUR_SITE_KEY.js" async></script>
    Clew admin Overview with the embed line and a masked site key (paywall upgrade prompt with Qwen Code)
    Step 1 · schematic illustration
  2. Step 02

    Run Qwen Code in the project folder

    Install the open-source Qwen Code CLI and run qwen in your project folder. It reads the repository and edits files after your confirmation. Qwen Chat on the web only suggests code you would paste yourself.

    A terminal AI assistant session opened in a project (paywall upgrade prompt with Qwen Code)
    Step 2 · schematic illustration
  3. Step 03

    Send the prompt with your key

    Replace PASTE_YOUR_SITE_KEY with your key and send the prompt.

    Add the Clew onboarding widget to this app.
    
    Insert this exact tag once so it loads on every page, including after client-side route changes:
    <script src="https://tryclew.io/widget/PASTE_YOUR_SITE_KEY.js" async></script>
    
    Find the root HTML file or root layout of this project (index.html for Vite, app/layout.tsx with next/script for Next.js App Router, nuxt.config.ts app.head.script for Nuxt, the base template for server-rendered apps) and add the tag there.
    
    After the signed-in user is loaded, and whenever the subscription changes, call Clew.identify({ plan: <the user's current plan id as a string, e.g. "free"> }). If the widget may not have loaded yet, first define the queue stub: window.TutorKit = window.TutorKit || { q: [], identify: function (p) { this.q.push(["identify", p]); } }; then call window.TutorKit.identify(...). Add a data-tour attribute to the buttons of paid features (for example data-tour="export"). Do not add any payment, gating or paywall logic of your own and do not change what the buttons do.
    
    Rules:
    - Use the script URL exactly as given. Do not download it, bundle it or install an npm package.
    - If the project sets a Content-Security-Policy, allow https://tryclew.io in script-src and connect-src.
    - Change nothing else and show me the diff.
    AI assistant input with the Clew prompt (paywall upgrade prompt with Qwen Code)
    Step 3 · schematic illustration
  4. Step 04

    Confirm the edits and deploy

    Confirm the edits after checking the diff, commit, and deploy as usual.

    Code diff with one script line added to the root file (paywall upgrade prompt with Qwen Code)
    Step 4 · schematic illustration
  5. Step 05

    Write the upgrade prompt

    In Clew open Flows → + New flow and choose Modal window. One step: a title with the benefit (“Export to CSV is on Pro”), one sentence of value, and in Link text / Link URL the button and your pricing or checkout URL.

    An upgrade prompt modal over a web app, with a benefit headline and a link button to the pricing page (paywall upgrade prompt with Qwen Code)
    Step 5 · schematic illustration
  6. Step 06

    Choose where, when and for whom it shows

    In the same editor, set Where to show (page URL), When to show, Audience targeting and Frequency. These are the settings of the example above:

    SettingValue
    FormatModal window
    Where to show (page URL)Section by prefix /admin/analytics
    When to showRight on page load
    Audience targetingProperty plan equals basic
    FrequencyEvery visit
    Clew tour editor with the format, page URL rule, trigger and audience rule fields (paywall upgrade prompt with Qwen Code)
    Step 6 · schematic illustration
  7. Step 07

    Publish and check it on the live site

    Set Status to Published and save. Open the page in a private window — Clew remembers who has already seen a “once” item, so your usual browser may skip it. Views, completions and drop-offs appear in the tour stats.

    Clew admin Overview with the green “Widget is live” card (paywall upgrade prompt with Qwen Code)
    Step 7 · schematic illustration

Pitfalls: paywall upgrade prompt with Qwen Code

Confirm file edits one by one

Keep the default approval mode so you see every change. The paywall upgrade prompt needs the tag, a few attributes and, where relevant, one identify call — nothing else.

Admin panels behind a login

URL rules work on any path, including /admin. Build the paywall upgrade prompt while signed in as a typical staff member so the elements you pick are the ones they see.

The prompt doesn’t replace access checks

If the paid feature is reachable for free users in your app, the modal appears but the feature still works behind it. Check that the server side enforces the plan; the prompt is only the message.

Update the property after upgrading

Properties live in the browser until the app sends a new value. Call Clew.identify({ plan: "pro" }) after a successful upgrade, or the new customer keeps seeing the prompt.

Questions and answers

Can the prompt link to a sales contact instead of pricing?

Yes — any URL, such as a “Talk to sales” form.

Which Qwen model does this need?

The default coding model in Qwen Code handles it; the task is a small, well-described edit.

Does Clew take the payment?

No. The button links to your own pricing page or checkout; Clew never handles cards, subscriptions or access.

Is the paywall prompt free?

It needs the modal format and an audience rule, both in Pro. The 14-day trial includes them, no card.

One line on your site — then tours, tooltips and checklists without releases.

Get your site key — freeHow Clew worksFree plan forever, no credit card

Product tours, popups and onboarding in the age of AI

7 patterns with step counts, copy rules and what to measure, what AI changes, and a checklist before you publish. PDF, 2 pages. What is inside →