Get Started Get Started

Google Analytics 4

Google Analytics 4 helps you see how visitors find and use your website. This guide is for anyone who wants to add Google Analytics 4 to an Oncord website using the Google tag (gtag.js).

Set Up a Google Analytics Account

Follow Google's guide to set up Analytics for a website to create:

  • A Google Analytics account.
  • A Google Analytics 4 property.
  • A web data stream for your website.

Install Google Analytics into Oncord (Using Google Tag)

To install Google Analytics, add the Google tag (gtag.js) to your website design. The tag then loads on every page that uses that design.

Using more than one website design? Add the code to each design used by the pages you want to track, including the design your checkout pages use. Code added to one design only runs on pages that use that design. To check which pages use each design, see Managing Multiple Designs. Test a page from each design after saving.

Get the Google Tag (gtag.js) from Your Google Analytics 4 Property

  • Sign in to Google Analytics.
  • Click Admin at the bottom left.
  • Under Data collection and modification, click Data streams.
  • Select the Web tab.
  • Click the data stream for your website.
  • Under Google tag, click View tag instructions.
  • Select Install manually.
  • Copy the whole snippet, starting with <!-- Google tag (gtag.js) -->.

Add the Google Tag (gtag.js) to All Pages (Within Your Design)

  • Go to Dashboard > Website > Designs.
  • Hover over the design you want to update.
  • Click Edit Design.
  • Click Source in the left toolbar.
  • Paste the Google tag immediately after the opening <head> tag.
  • Click Save.

Data collection can take up to 30 minutes to begin. After that, open the Realtime report in Google Analytics to check that visits are coming in.

Selling online? Oncord also sends each order to Google Analytics through the Google tag, once the tag is in the design your checkout pages use. See Setting Up Google Analytics 4 E-commerce Tracking.

Tip: You can install Google Analytics through Google Tag Manager instead, which keeps all your tracking tags in one place. See Google Tag Manager. Use one method, not both: with two copies of the tag, every page view is counted twice.