How to add Google Analytics Tracking Code or Other Code

It is recommended in general to use independent plugin to add analytics code rather than adding it via theme

  • Can be added via customizer settings.
  • This is not a built-in setting for Google Analytics Tracking, but a general provision to add any type of code in header.
  • Copy your ‘Tracking Code‘.
  • Find it in Google Analytics under the ‘Admin’ panel. Refer google docs for more info.
  • Make sure you are copying the ‘Tracking Code‘ and not the Tracking ID or User ID.

  • Go To : Appearance > Customize > General Settings > Custom Code in Header > Code in Header
  • Paste the code in textarea, along with ‘script’ tag