Installation

JavaScript SDK installation

Install the Testvoy Browser SDK through the CDN and verify your first event.

Last updated: May 22, 20268-14 minBeginner to intermediate
Start free See pricingMethodology

What does the Browser SDK do?

The Browser SDK assigns visitors to the right experiment variant, applies visual editor changes, sends goal events and helps deliver signed experiment context for reporting. Setup is not just adding a script; it connects the experiment engine, event pipeline and verification view.

Predictable versioned CDN path

Project key for the right project context

Anti-flicker oriented loading

Queue/retry and sendBeacon-aware event flow

JavaScript SDK snippet
<head>
  <title>Store Name | Online Shopping</title>
  <script
    async
    src="https://cdn.testvoy.com/sdk/v1/testvoy.min.js"
    data-project-key="PROJECT_KEY_HERE">
  </script>
  <meta name="description" content="Discover products and buy with confidence." />
</head>
SDK setup view
CDNProject keyVerifier
Project key, domain match and recent events are read in the same verification flow.

Where should the snippet go?

Place the snippet in the head on every page you want to test when possible. Async loading avoids blocking render, but you should still check flicker risk in preview and QA for critical hero changes. If you use GTM, make sure the SDK is not loaded both in theme code and tag manager.

  • Is the snippet on all relevant pages?
  • Does the project key belong to production?
  • Were staging and production keys kept separate?
  • Is the SDK loaded only once?
  • Does the domain match the Testvoy project?

Practical scenario

A growth team changes CTA copy on the pricing page, connects signup_started and signup_completed goals, then reads Google Ads and returning visitor segments separately. If the result is promising, they share a report link with the client or leadership.

Common mistakes

Most mistakes come from wrong project keys, overly broad selectors, missing goals, staging/prod mixups, early decisions on small samples or skipping mobile QA.

Naming an experiment 'test'

Launching without a goal

Deciding on total CVR only

Sending screenshots instead of shareable reports

Frequently asked questions

Who is JavaScript SDK installation for?

Marketing, growth, product and developer teams can use the same guide at different depths.

Do I need a developer?

Not for basic visual changes and report reading; SDK, custom events, custom JS or enterprise security benefit from technical support.

How do I know it worked?

Verifier, recent events, preview, QA checklist and report warnings show setup and experiment health.

What is the common mistake?

Wrong project keys, missing goals, fragile selectors, early decisions on small samples and skipped mobile QA are common.

Docs

Try this guide in the app

Finish setup, create your first experiment and read the report with cleaner data in Testvoy.