Pin Me

Custom Code and Google Sites

written by: Laura Jean Karr•edited by: Misty Faucheux•updated: 3/14/2010

Here we take a look at two different gadget codes you can use for embedding gadgets into your Google Sites pages.

  • slide 1 of 3

    Custom Code and Google Sites

    Google Sites, like most Web based applications, can allow for some user mods. It is important to note that Google Sites generally will and often does go back and strip out custom codes.

    The reasoning that Google Sites does not “openly” allow custom code is due to application privacy. Such code additions as style tags and iframes are removed by Google Sites to prevent the codes use from potential Web application intruders. So, the official policy is no custom code at this point in time.

    However, in the world of online applications and with the more people learning various types of code languages, there are a few custom codes that have worked in Google Sites. Here we take a look at two types of code from two different sources.

  • slide 2 of 3

    Gadget Code

    DOH is a Google Sites Help user who created the following code for creating a gadget in Google Sites:

    <?xml version="1.0" encoding="UTF-8"?>


    <ModulePrefs title="My Form"/>

    <Content TYpe="html">

    <![CDATA[ *enter your code here* ]]>



    For additional instructs and to see an example of what you can do with this code read Brian Johnson’s Building Gadgets for Google Sites.

  • slide 3 of 3

    KML Embed

    Barry Hunter has created his own gadget code for embedding Google Maps into Google Sites. The key to using this code is to have your map already created and to have the KML URL for that map.

    Use the Insert button followed by More, and use the Add by URL link. In the URL box, add the following URL:

    and use the Add button.

    Now, in the KML or My Maps URL box paste your map's KML URL. Choose 2D (Google Maps) in View Mode and click the OK button.

    For full instructions and to see how this code will work within Google Sites, visit Barry Hunter’s Embed a “My Map” in Google Sites.

    To learn more tips when it comes to using Google Sites, check out these Google Sites Tips.