title: How to pass parameters to Google Apps Script Gadget embedded in a Sites Page?
body: <p>I have a Google Apps Script gadget that is embedded in a Google Sites page.  I would like to pass the gadget a page parameter, such that when the page is opened with URL like:</p>
  
  <p><a href="https://sites.google.com/a/mydomain/mysite/mypage?myparameter=1">https://sites.google.com/a/mydomain/mysite/mypage?myparameter=1</a></p>
  
  <p>I can access the value of the page parameter in the Apps Script gadget code like so:</p>
  
  <pre><code>function doGet(e) {
    var app = UiApp.createApplication();
    app.add(app.loadComponent("MyComponent"));
    var myparam = e.parameter.myparameter;    
    return app;    
  }
  </code></pre>
  
  <p>Currently, the value of e.parameter.myparameter is coming back as null.  Is there a way to setup my Apps Script to support this?  Any approaches are welcome.  </p>