Connect Search Console and analytics
At the end of this guide Google Search Console knows your site is yours, and, if you want it, Google Analytics measures your visitors once they accept.

Google Search Console shows how your site appears in Google's results. Google asks you to prove the site is yours with a tag.
- In Google Search Console, add your site's address as a URL-prefix property, for example https://www.yourbusiness.com.
- Choose the HTML tag method. Google shows a tag like the one below.
- Copy only the value between the quotes after content=.
- In your site's dashboard, open Settings, then Integrations.
- Paste the value into Search Console verification.
- Choose Save changes.
- Publish Site settings from the Overview (see Publish your changes).
- Back in Search Console, choose Verify.
<meta name="google-site-verification" content="paste-only-this-part" />If you paste the whole tag, the field says "Paste only the content value of the tag."
Use the address your site is served at. If you later connect your own domain, add it as a new property and verify it the same way.
- In Google Analytics, create a web data stream for your site and copy its measurement id. It starts with G-.
- In your site's dashboard, open Settings, then Integrations.
- Paste it into Analytics measurement id.
- Choose Save changes.
- Publish Site settings.
An id that does not match the pattern shows "Use an id like G-XXXXXXX."
Adding an id turns on Show the consent banner and locks it on: "Required when analytics is set". Analytics is "Loaded only after consent": nothing is measured for a visitor until they choose Accept.
With Show the consent banner on, visitors see a bar at the bottom of each page:
"This site uses analytics cookies to measure its audience. They are set only if you accept."
| Visitor chooses | What happens |
|---|---|
| Accept | Analytics loads on this page and the next ones |
| Decline | Analytics never loads |
After a choice, the bar closes and a Cookie settings button stays on the page, so the visitor can change their mind. Withdrawing consent reloads the page without analytics.
The visitor's browser keeps the choice for about six months, then the banner asks again. Changing the measurement id also asks again.

You can turn the banner on without an analytics id, but it then has nothing to hold back.
Clear the field, choose Save changes, then publish Site settings. To turn the banner off, clear the Analytics measurement id first; the switch stays locked while an id is set.
