Skip to main content Skip to local navigation
Home » How To... » 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.

Multiple sets of Analytics code on a page can lead to inaccurate data collection. The York University account code should be the only one on the page. Read more about the effects of more than one code block on a page.

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) -->

How do I access my group's Analytics?

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.

How do I request access to the information collected?

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

Can I add my own GA account to my site?

  • 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 identifyable 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.