For the Website visitors source, inDeal needs a short code on your website. This article shows how to add it yourself, with an AI tool or via your developer.
Contents
- What the code is for
- Copy the code
- Copy prompt for AI tools
- Setup per system
- Send to developer
- Check the code
- Privacy
- Final checklist
- Next
What the code is for
The code reports page views on your website to inDeal. From them, inDeal recognises the companies visiting you, not individual people. The code sets no cookies and stores nothing in the browser. It loads asynchronously and does not slow down your website.
The code is unique to your account and only works on the domain you entered, including its subdomains.
Copy the code
In the Leads tab of your agent you'll find the Code on your website box. Enter your domain under Your website, for example example.com, and click Save. The code then appears.
Click Copy code to copy it. It belongs once in the head section of every page. Use it exactly as it is.
Copy prompt for AI tools
If you build your website with an AI tool such as Claude Code or Cursor, click Copy prompt. You get a ready-made task with your domain and the code. Paste it into the AI tool. The task tells the tool:
- to add the code unchanged and asynchronously to the head section of every page,
- not to change any other files,
- how to proceed with Next.js, WordPress, Webflow, Framer and static HTML,
- to check afterwards that the script w.js loads,
- to remind you of the privacy policy and the consent banner.
Review the result before you publish it.
Setup per system
- Next.js: In the App Router in
app/layout.tsx, in the Pages Router inpages/_document.tsx. Alternatively withnext/scriptandstrategy="afterInteractive", with the same address and the samedata-kattribute. - WordPress: Via the theme's header hook (
wp_head) or a plugin for head code. Don't edit the files of a parent theme directly, or the code is gone after the next theme update. - Webflow and Framer: In the site settings under Custom code, in the head code field. Then publish the site.
- Static HTML: Insert the tag in the head section of every HTML file.
- Tag manager: Also works if your tag manager loads on every page. The code then follows the same consent rule as the tag manager.
Send to developer
Does someone else build your website? Enter their address under Or send it to your developer and click Send to developer. They get the code with instructions, you get a copy. The same address gets at most one email per day.
Check the code
Once the code is added and published, open your website once yourself and then click Check code. If everything works, it says The code is active, visits are coming in.
You can also check it yourself: open your website, open the browser developer tools and look in the Network tab whether w.js loads.
If it doesn't work, inDeal tells you why. Browsers with a privacy signal (GPC or Do Not Track) deliberately report no visit, so use a different browser to check.
Privacy
You are responsible for the visit data of your website, inDeal processes it on your behalf. Add the visitor recognition to the privacy policy of your website and check with your data protection contact whether the code belongs in your consent banner. More in the article Website visitors as a source.
Final checklist
The checklist comes from chapter 7 of the privacy template. The template is in German. You download it as a PDF in the agent with website visitors, Leads tab, button Privacy template.
- ☐ Section on inDeal added to the privacy policy, brackets filled in, all [BITTE PRÜFEN] (please check) items resolved.
- ☐ Service "inDeal Webseitenbesucher-Erkennung" (inDeal website visitor detection) created in the cookie banner, category Marketing, description and link to the privacy policy added.
- ☐ The code is tied to consent (variant A or B), no longer unprotected in the
<head>. - ☐ Rejecting is as easy as accepting.
- ☐ Visitors can change their consent at any time (link "Cookie settings" or similar).
- ☐ Test without consent: no request to app.indeal.ai.
- ☐ Test with consent: w.js (200) and report (204) in the Network tab.
- ☐ Test after withdrawal: again no request to app.indeal.ai.
- ☐ Clicked "Check code" in inDeal, the code is active.
- ☐ Data protection officer or legal advisor has checked the text and the setup.
inDeal cannot answer legal questions. Please contact your data protection officer or a legal advisor.