views:

27

answers:

2

I added it like this:

</div><!-- .container -->
</div><!-- #footer -->
<script type="text/javascript" src="scripts/google-analytics.js"></script>
</body>
</html>

I did this last night and still having the warning sign.

+1  A: 

It should work without any problem. The external file will be loaded, then the browser will execute its content.

The only downside of this solution is the cost of one additional network call. The good news is that in this way you can take advantage of browser caching.

Simone Carletti
A: 

Yep works fine, i have done this on a number of sites.

If you are putting the script in the document head just remember to wrap the Google analytics script in a js function to only fire when the page has finished loading.

TheAlbear