ekhanemark/Docs
Docs: Install
Install

Install

The script tag for HTML, Next.js, Vite apps, WordPress, Shopify, Webflow and Wix.

EkhaneMark is one script tag. Use the line from your project's Settings & install page; it contains the project key. The same line works on localhost, staging and live. For client reviews on your live website, use Review mode.

Plain HTML, PHP, Laravel, Django, Rails

In the layout file every page uses, just before </body>:

<script src="https://cdn.ekhanemark.com/w.js" data-project="your-project-key" async></script>

Next.js

App Router: in app/layout.tsx (or src/app/layout.tsx):

import Script from "next/script";

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script src="https://cdn.ekhanemark.com/w.js" data-project="your-project-key" strategy="afterInteractive" />
      </body>
    </html>
  );
}

Pages Router: put the same <Script> in pages/_app.tsx, after <Component {...pageProps} />.

React, Vue, Svelte, Solid (Vite)

Paste the line into index.html at the project root, before </body>. Client-side routing is followed automatically: pins update when the route changes.

Nuxt

// nuxt.config.ts
export default defineNuxtConfig({
  app: {
    head: {
      script: [{ src: "https://cdn.ekhanemark.com/w.js", "data-project": "your-project-key", async: true }],
    },
  },
});

WordPress

With the free WPCode plugin: Code Snippets → Header & Footer → Footer, paste the line, save. Or add it to your theme's footer.php before </body>.

Shopify, Webflow, Wix, Squarespace

Use the site's custom code setting for the end of the page body (Webflow: Site settings → Custom code → Footer code; Shopify: edit theme.liquid before </body>).

Check that it works

  1. Add the site's address to the project (see Site addresses and modes).
  2. Press Open site next to that address in the dashboard. The toolbar should appear at the bottom of the page within a second or two.
  3. Not there? See Troubleshooting.

Use EkhaneMark on your live website

Clients can review the real website while everyday visitors continue browsing as usual. Add the script from Settings & install, register your live address, and choose Review mode for that address.

  1. Keep the script in your shared layout so feedback works across the website.
  2. Set the live address to Review. An approved reviewer signs in for that tab; the widget stays out of the way for ordinary visitors.
  3. Send the client an invite link and approve their access. Only the people you approve can review the project.
On EkhaneMark's hosted service, the install code uses https://cdn.ekhanemark.com/w.js, served by Cloudflare. The full widget is checked by the browser with Subresource Integrity before it runs. See How script delivery is protected.

Ordinary visitors download only the small loader. The feedback interface loads when a reviewer opens the project's sign-in link or uses an existing sign-in. Password and card fields are masked in screenshots; mark any additional private content with data-ekhanemark-private.

Only load on selected environments (optional)

If your team reviews only on staging, you can choose those environments explicitly. In Next.js, set NEXT_PUBLIC_EKHANEMARK=on wherever you want the widget:

{process.env.NEXT_PUBLIC_EKHANEMARK === "on" && (
  <Script
    src="https://cdn.ekhanemark.com/w.js"
    data-project="your-project-key"
    strategy="afterInteractive"
  />
)}

For Vite, use VITE_EKHANEMARK=on and add the script from main.ts:

if (import.meta.env.VITE_EKHANEMARK === "on") {
  const s = document.createElement("script");
  s.src = "https://cdn.ekhanemark.com/w.js";
  s.dataset.project = "your-project-key";
  s.async = true;
  document.body.appendChild(s);
}

For WordPress and site builders, add the snippet to each copy of the site where your team wants to collect feedback.

Content Security Policy

Some sites send a Content-Security-Policy (CSP): a list of the addresses the page may load scripts from and talk to. The browser blocks everything else, quietly. If your site has one and EkhaneMark isn't on it, the toolbar never appears, and the browser console shows a line like Refused to load the script 'https://cdn.ekhanemark.com/w.js' because it violates the following Content Security Policy directive.

Allow the script address and the API address in the relevant parts of your existing policy:

  • script-src: to load the widget from https://cdn.ekhanemark.com (w.js and the widget file it brings). On the hosted service this is the Cloudflare CDN.
  • connect-src: to communicate with https://ekhanemark.com: send feedback, load pins and receive live updates.
  • img-src with data: and blob:: for screenshots, attached pictures and people's photos. A policy that already allows https: here is fine.
  • media-src with blob:: for voice notes. Without it, recording works but playing a note back is blocked. A policy with no media-src falls back to default-src, which usually blocks it.
  • style-src with 'unsafe-inline': the widget brings its own styles.

The parts that matter, on their own:

script-src  'self' https://cdn.ekhanemark.com;
connect-src 'self' https://ekhanemark.com;
img-src     'self' data: blob: https://ekhanemark.com;
media-src   'self' blob: https://ekhanemark.com;
style-src   'self' 'unsafe-inline';

Next.js (next.config)

Most Next.js sites build the policy as a list in next.config.js. Add the address at the end of the existing lines, and add a media-src line if there isn't one:

const contentSecurityPolicy = [
  "default-src 'self'",
  "script-src 'self' https://cdn.ekhanemark.com",
  "connect-src 'self' https://ekhanemark.com",
  "img-src 'self' data: blob: https:",
  "media-src 'self' blob: https://ekhanemark.com",
  "style-src 'self' 'unsafe-inline'",
  // ...the rest of your policy, unchanged
].join("; ");

Keep any existing nonces, hashes and other providers in your policy. For the hosted service, scripts come from https://cdn.ekhanemark.comand feedback requests go to https://ekhanemark.com; both have a separate role in the policy.

nginx, Apache, a meta tag

Wherever the header is set (add_header Content-Security-Policy in nginx, Header set Content-Security-Policy in Apache, a <meta http-equiv="Content-Security-Policy"> tag, or your host's headers setting), add the address to the same parts. Check after a deploy: open the site from the dashboard, and the console should have no Refused to lines that mention EkhaneMark.

Make pins sturdier (optional)

EkhaneMark finds elements without any help, but a stable attribute on important elements makes matching exact even after big redesigns. It recognises data-testid, data-fb, data-test, data-cy and data-qa:

<button data-testid="checkout">Pay now</button>

To keep something out of screenshots, add data-ekhanemark-private. Password inputs and card fields are hidden automatically.