Google analytics not sending pageview with custom dimension
<p>The purpose of the following code is to wait for a custom browser plugin to add a meta tag named "machineID" and send that ID to google analytics as a custom dimension. I have defined the custom dimension within analytics and am sending it with the initial pageview using the ga() function, however I receive no pageviews on analytics dashboard. It is as if the ga() function never sends the pageview. However I know that it has to be executing because it returns "undefined" (which is what the documentation states it's return should be). Also, you will see function _gs(). This is for gosquared reporting. This function works just fine and I am able to see "machineID"s within gosquared.</p>

<p>Is there something wrong with what I'm doing that analytics does not like? Anyone else run into this?</p>

<p><strong>EDIT</strong>
After changing to analytics_debug.js, one machine the debugger loads and works just fine, shows no errors. On another machine it fails to load at all. It's very strange. Almost like analytics is blocking that specific IP? Is that possible?</p>

<pre><code>&lt;script&gt;
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-XXXXXXXX-X', 'auto');

    $(document).ready(function(){

        var searchInterval = 250;
        var totalSearchTime = 30000;
        var currentSearchTime = 0;
        var machineIDFound = false;
        var analyticsLoaded = false;
        var goSquaredLoaded = false;
        var machineIDSent = false;
        setInterval(function(){

            //console.log('machineIDFound: ' + machineIDFound + ' analyticsLoaded: ' + analyticsLoaded + ' goSquaredLoaded: ' + goSquaredLoaded);

            currentSearchTime += searchInterval;
            if((currentSearchTime &lt;= totalSearchTime) &amp;&amp; (!machineIDSent)){

                if(typeof ga == "function"){
                    analyticsLoaded = true;
                }
                if(typeof _gs == "function"){
                    goSquaredLoaded = true;
                }
                if($('meta[name="machineID"]').length) {
                    machineIDFound = true;
                }

                if((machineIDFound) &amp;&amp; (analyticsLoaded) &amp;&amp; (goSquaredLoaded)){

                    var something = ga('send', 'pageview', {
                        'dimension1': $('meta[name="machineID"]').attr("content")
                    });

                    console.log(something);

                    _gs('identify', {
                      id: $('meta[name="machineID"]').attr("content")
                    });

                    machineIDSent = true;

                }

            }

        }, searchInterval);



    });

&lt;/script&gt;
</code></pre>