Skip to main content Skip to local navigation
Home » Site Analytics » Set-up Analytics For Your Site

Set-up Analytics For Your Site

To track Google Analytics on a website, every page that should be tracked must have a block of JavaScript code included on it. York uses one account to track most pages that are publicly accessible and on the domain. This code is included in the York banner that should appear at the top of every webpage

If your site is off-template but is of direct relevance to Students (eg. a Faculty-wide site), please place the following codes in your pages as per the instructions from Google.

Copy the following JavaScript and paste it as close to the opening <head> tag as possible on every page of your website:

<!-- Google Tag Manager -->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

Copy the following snippet and paste it immediately after the opening <body> tag on every page of your website:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="//"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->


Frequently Asked Questions

Login at with your Google ID. (See our Google ID & Analytics Accounts page for more details.) Check out the "How to Find Your Data" section for information about how to view data for select pages within the York University account.

Anyone who is York-based and affiliated with a website can request access by filling out the GA Access Request form.

  • If your site uses the York Template, and / or the York Header, and / or is on the domain and uses non-personalized urls (urls with personally identifiable information) then no -- your site will already be tracked by the York University account.
  • If your site is on a separate domain (not then yes – it will not be tracked by the York University GA account.
  • If your site uses personalized urls, it will not be tracked by the York University GA account. We recommend that you check with the Information and Privacy Office about whether or not it is appropriate to place GA code on the pages at all.

need help

Need help?

Contact us for help to report any issues with your data or request any custom configurations of reports