
Add my own analytics, Facebook pixel or chat tool to my site
If you already use Google Analytics, Microsoft Clarity, or a chat tool like Intercom, you don’t have to give it up to move to Bernard. Tell your AI which one and give it your id, and it goes on every page - same as it would if you’d pasted the code in yourself, minus the pasting.
The prompt
“Add [Google Analytics / Microsoft Clarity / Plausible / Fathom / the Meta Pixel / Intercom] to my site. My id is [paste it here].”
Signed in, Get my prompt fills in your site for you. Otherwise press Copy and fill in the [bracketed] parts. First time? Connect your AI to bernard once: Use your own AI (opens in a new tab).
How it works
- Say which tool, and give your id. For example: “Add Microsoft Clarity to my site, my project id is 3t0wlogvdz.” Every supported tool has an id like this, shown somewhere in that tool’s own dashboard.
- Your AI checks it looks right and puts it on. If the id doesn’t match
the shape that tool uses, you’ll be told, with where to go and look again
- rather than something broken quietly going live.
- It starts working within about a minute. No approval, no publish button - it isn’t a change to any page, so there’s nothing to review.
What’s supported today
Analytics - Google Analytics 4, Microsoft Clarity, Plausible, Fathom.
Advertising - the Meta Pixel, for Facebook and Instagram ads.
Chat - Intercom. More chat tools may be added over time - if you use something else, ask and it’ll be considered.
Why this works differently from everything else
Every other change your AI makes to your site - new text, a new page, a new photo - goes onto a private draft first, and only appears for visitors once you approve it. Working code, on the other hand, is never allowed onto any page at all, draft or live - that’s a safety rule with no exceptions, because a page is the one place a bad script could do real damage.
Analytics and chat tools need working code to function, so they’re handled a different way entirely: you give the tool and the id, and that’s switched on separately from your pages, the same way for every site. Nothing gets pasted in, so there’s nothing for a later edit to accidentally delete either - add a new page next month, and your analytics is already watching it.
Switching or removing one
Changed analytics providers, or moved to a new Clarity project? Ask again with the new id - it replaces the old one, no need to remove it first. Don’t want a tool any more? Ask to remove it, and it’s gone within about a minute.
The Facebook pixel
The Meta Pixel - the thing that tells you whether your Facebook and Instagram ads are actually bringing anyone - can go on your site the same way. Ask for it and give it the number from Meta Events Manager.
It works a little differently from visit counting, because advertising tracking needs your visitors’ permission: the pixel only runs for the ones who agree, so Meta reports fewer people than really visited, and your own visitor counts can step down too. None of that is a fault, but it’s worth understanding before you judge your ad results - Add the Facebook (Meta) pixel so I can tell whether my ads are working walks through the whole thing.
Google Ads, TikTok and LinkedIn tracking still aren’t offered. That’s now a question of checking each one properly rather than a rule about advertising - they’ll be added when each has been verified the same way.
For what your visitors are asked and what they see, read How does the cookie banner on my site work?.
Questions people ask
- Do I need a developer to add Google Analytics or a chat widget?
- No. Tell your AI which tool you use and give it your id - the number or code the tool gave you when you signed up - and it goes on every page of your site. No code to paste, no file to edit.
- Can I put my Facebook or Instagram ads pixel on my site?
- Yes. Ask for the Meta Pixel and give it the number from Meta Events Manager, and it goes on every page. Two things to know before you look at your results: it only runs for visitors who agree to advertising cookies, so Meta reports fewer people than actually visited - and once visitors are being asked, your ordinary visit counting waits for their answer too, so those numbers can step down as well. Both are what asking properly looks like.
- Which tools are supported?
- Analytics: Google Analytics 4, Microsoft Clarity, Plausible and Fathom. Advertising: the Meta Pixel, for Facebook and Instagram ads. Chat: Intercom. That’s the current list - if you use something else, ask and it’ll be considered.
- Why can’t I just paste the tracking code myself?
- Bernard won’t let anyone - including its own AI - paste working code into your pages. That’s a safety rule, not a limitation: it’s what stops a stray or malicious script from ever ending up on your site. Analytics and chat tools are the one deliberate exception, added a different, safer way - see below.
- Where do I find my id?
- In the tool’s own dashboard - each one has a settings or setup page that shows it. If you’re not sure where, ask your AI to add the tool and, if what you give it doesn’t look right, it’ll tell you exactly where to look.
- Do I need to publish for it to start working?
- No. It isn’t part of your page - it’s switched on separately, the moment you ask - so it starts working within about a minute, and it’s already there for pages you add later. Nothing to approve, nothing to publish.
- Can I switch to a different account, or take it off?
- Yes to both, any time. Ask to switch to a new id for the same tool and it replaces the old one. Ask to remove a tool and it comes off - your site keeps working exactly as before, just without that one thing counting or watching.