A magnifying glass held over a trail of footprints, one print enlarged under the lens
Trusted third parties6 min read

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. In most cases you don’t have to do anything at all - Bernard finds it on your old site and sets it up for you.

The prompt

“Add [Google Analytics / Microsoft Clarity / Plausible / Fathom / the Meta Pixel / Google Ads / 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).

If you’re moving from another site

When Bernard moves your site, it reads through your pages and spots any analytics or advertising tools you already have running. If it finds one it can set up - Google Analytics 4, Microsoft Clarity, Plausible, Fathom or the Meta Pixel - it carries the id across and switches it on automatically. Your analytics keeps counting from the moment your moved site goes live, with no gap and nothing to configure.

The carried-over version comes with a cookie banner, so your visitors are asked before it counts them. Google Tag Manager, Google Ads tracking, the older “UA-“ Google Analytics ids and chat tools are not carried over - if you relied on one of those, ask your AI what your options are.

One case Bernard can miss: a site that only switched its analytics on after a visitor pressed Accept on a cookie banner. There the id is tucked away where the move doesn’t look. So it’s worth checking - ask your AI “What analytics is running on my site?” If the answer is none and you expected some, give it your id and it’s on within a minute. You can change or remove anything that was carried over the same way (see below).

Adding something new

If you want to add analytics that wasn’t on your old site, or you’re starting fresh, tell your AI which tool and give it your id.

How it works

  1. 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.
  2. 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.
  3. 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, and Google Ads.

Not offered: Google Tag Manager. A Tag Manager container loads whatever code is added to it later, from Google’s dashboard, so you would never see or approve that code on your site. Add each tool directly instead. For code of your own, your AI can propose it for you to approve.

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

Google Ads goes on the same way. Give your AI the id from your Google tag - it starts with AW- and is followed by digits. Like the Meta Pixel, it is advertising tracking, so it only runs for visitors who agree to advertising cookies, and Google Ads reports fewer people than really visited.

Bernard puts on the Google tag itself, on every page. It does not add a conversion event for one page, because the tag runs everywhere and would count a conversion on every page view. To count conversions, do one of these in Google Ads:

  • count a conversion when a visitor reaches a page, such as your thank-you page, or
  • import the key events you already track in Google Analytics 4.

What the Google tags tell Google about consent

On a site with a cookie banner, which is every site running one of these tools, bernard does two things:

  • The tags wait. Google Analytics 4 and Google Ads are held inert on the page and only load for a visitor who agrees.
  • Consent Mode v2 signals. Before anything else on the page runs, bernard tells Google that analytics storage, ad storage, ad user data and ad personalisation are all denied. When a visitor agrees to analytics, it updates analytics storage to granted. When they agree to advertising, it updates ad storage, ad user data and ad personalisation to granted.

TikTok and LinkedIn tracking still aren’t offered. That’s 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?.

Once the numbers are coming in, see how to get useful insights from your visitor numbers.

Questions people ask

Does Bernard carry over my analytics when it moves my site?
Yes. If your old site was running Google Analytics 4, Microsoft Clarity, Plausible, Fathom or the Meta Pixel, Bernard detects it during the move and sets it up on your new site automatically. Your analytics keeps counting from the moment the site goes live.
Will I still see my analytics in my own Google Analytics account?
Yes. Bernard uses your own id - the G- code from your Google Analytics - so your visits keep going to the same account you already log into, and all your history stays there. Bernard never replaces your account or starts a new one. The one difference to expect: visitors who say no on the cookie banner are not counted, so if your old site never asked, your numbers can be a little lower than before.
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, and Google Ads. Chat: Intercom. That’s the current list - if you use something else, ask and it’ll be considered.
Can I track Google Ads conversions?
Yes. Ask for Google Ads and give your AI the AW- id from your Google tag. It goes on every page and only runs for visitors who agree to advertising cookies. Then, in Google Ads, count a conversion when someone reaches a page such as your thank-you page, or import your Google Analytics 4 key events. Bernard puts on the tag itself, not a conversion event for one page.
Can I add Google Tag Manager?
No. A Tag Manager container loads whatever code is added to it later, from Google’s dashboard, so you would never see or approve that code on your site. Add each tool directly instead - Google Ads, Google Analytics 4 and the rest are all here. For code of your own, your AI can propose it for you to approve line by line.
Does the Google tag send Consent Mode signals?
Yes. On every site with a cookie banner, bernard tells Google that all four Consent Mode v2 signals are denied before anything else on the page runs. When a visitor agrees to analytics, it sends analytics storage as granted. When they agree to advertising, it sends ad storage, ad user data and ad personalisation as granted. And the Google tags themselves do not load at all until the visitor agrees.
Why can’t I just paste the tracking code myself?
Because a snippet pasted straight into a page is removed, every time - by you, by Bernard or by a connected AI. That’s a safety rule: it’s what stops a stray or malicious script from ever ending up on your site. Analytics and chat tools are added a different, safer way instead - see below - and they only run for visitors who agree to cookies. Code of your own is possible too, but it goes the checked way: bernard checks it and you approve it by publishing (see Run your own code on your site).
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.

Next