title: How to include dynamic information in Sharepoint master page?
body: <p>We are creating several (19) sites to be hosted in Sharepoint 2007 and want to use Google Analytics. The first bit was easy, simply putting the Google Analytics javascript in the Sharepoint master page and all worked as expected.</p>
  
  <p>However, we want each of the 19 sites to generate seperate statistics and this is done by having a different id for each site.  My first thought was to store the id in each site's web.config and change the master page to read this for the javascript:</p>
  
  <pre><code>&lt;%= ConfigurationManager.AppSettings["google.analytics.key"]%&gt; 
  </code></pre>
  
  <p>Unfortunately, Sharepoint doesn't like this and says: Code blocks are not allowed in this file.</p>
  
  <p>My question is:</p>
  
  <p>Is there a way to read appSettings from web.config in a Sharepoint master page? or</p>
  
  <p>Is there a better, Sharepoint-way of getting site-specific information into a master page? or</p>
  
  <p>Am I stuck with using seperate master pages for each of the sites?</p>