The body tag in a Meteor template is not an HTML tag tag. This is just the "body" of your application.
Thus, when Meteor loads your application, it will generate HTML elements to display the page in the browser itself, and then display any applicable templates. In your case, you have a template containing a script tag, and your assumption is that, as in a standard HTML document, the browser will work and execute the appropriate Javascript. However, this is not how it works. Javascript is not executed, DOM nodes are simply added to the DOM structure.
You can verify this by trying to write the addthis_config value - it will be undefined. The Addthis script that you tried to include was also not displayed by the browser, as it is indicated on the "Resources" tab in the web inspector.
To fix this, you need to tell Meteor to get an external script, and then set the variable. In the <head> template element add a script:
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid=silencing"></script>
And then declare the variable in your Javascript:
if (Meteor.isClient) { var addthis_config = {"data_track_addressbar": true}; }
Rahul
source share