Many things can cause GA not to fire properly. If you haven't already considered these, a few quick suggestions:
- If you're looking at the page in a browser off your drive rather than via a local web server or a remote host, the script may not be firing due to a variety of reasons.
Some ad blockers also prevent GA from firing, so make sure that's not happening.
Check to make sure the tracker is sending data to the correct Tracking ID, and that you're looking at the correct Property within GA. If you're using Chrome or Firefox, add the Google Analytics Debugger extension from the Chrome or Firefox store. Once added, you'll have to toggle it on via its icon in the browser bar. From there, reload your site with the console open and you'll get a detailed output of what's being sent to Google Analytics. It should be lengthy.
The GA debugger output will start with something similar to this, though the actual content will vary by implementation and contain config specific to your site:
Initializing Google Analytics.
Running command: ga("create", "UA-XXXXXXXX-X", auto)
Creating new tracker: t0
or
Running command: ga("create", "UA-XXXXXXX-X", {cookieDomain: "yourdomain", name: "trackername"})
Creating new tracker: trackername
Make sure that UA-XXXXXXXX-X matches the Tracking ID you see in the Property Settings of the Property you're using to track the site, and that the tracker is created without error. From there you can see what commands are being run (particularly the send command), and information about the hit(s) being sent to the created tracker and its GA Property.