Reputation: 986
So I want to enable google analytics in a website application, so I have the code in the script
tag itself. Is it better to have the code directly in the tag:
<script>
(functions(variables)google objects (morevariables), links);
</script>
Or is it better to have it in the form of:
<script src="link to where a js file with the exact same code as above is hosted"></script>
With three things in mind:
Upvotes: 0
Views: 90
Reputation: 31
In my experience y prefer to have the script in a separate file in order to reuse it in all my views. But I don´t think it makes any difference.
Upvotes: 1