Friday, 10 September 2021

2021 Google analytics - basic user visit tracking set up on web site

 https://support.google.com/analytics/answer/1008080?visit_id=637668555088119454-906184644&rd=1#zippy=%2Cin-this-article

Set up the Analytics global site tag

Basic instructions

  1. If you have not already done so, create a Google Analytics property for each website you want to collect data from.

    Creating a property generates a unique Tracking ID and a global site tag that includes the Tracking ID for that property. See the following section for information about finding your Tracking ID and global site tag.
  2. Copy and paste the global site tag right after the opening <head> tag on each webpage you want to measure.

Find your Tracking ID and global site tag

  1. Sign in to your Analytics account.
  2. Click Admin.
  3. Click property, click data streams, then click your site
  4. Click taging instructions
  5. Click global site tag -> add new on page tag
    the JS code will be generated and for u to add to each page

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HYGCW71DF3"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'XXXX');
</script>

No comments:

Post a Comment