javascriptgoogle-analytics

GA pageTracker is undefined


I am trying to download drivers from Dynabook, but there seems to be a GA-related issue. The console provides the following errors:

pageTracker is undefined

and

pageTracker._trackEvent is not a function

It seems like the GA JS is failing to load and that is blocking the rest of the website JS from running. Is there a way around this?


Solution

  • I realised that my own empty function is good enough to solve this problem:

    var pageTracker = {};
    
    pageTracker._trackEvent  = function() { 
    return 'Hello'; 
    }
    

    I ran this JS in the Firefox Dev Tools Console, and then i was able to download the drivers successfully.

    If you have a 404 error, you can try inserting the download URL into the Internet Archive Wayback Machine.