Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.



  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-62895838-4', 'auto');
  ga('send', 'pageview');

  <form action="">
    <span>Client Id:</span>
    <input id="cid">




                // This function will be used to grab the client ID form the analytics tracker object with the specified Universal Analytic Tracking Id (UAID) .
function getClientId (uaid) {
      try {
        var trackers = ga.getAll();
        var i, len;
        for (i = 0, len = trackers.length; i < len; i += 1) {
          if (trackers[i].get('trackingId') === uaid) {
            return trackers[i].get('clientId');
      } catch (e) {}
      return 'false';
// By waiting for "onload", we give GA enough time to load up before trying to get the Client ID.
window.onload = function () {
    // Once the page has completely loaded, this next line finds the hidden field <input id="cid"> and sets its value to the CID. 
    document.getElementById("cid").value = getClientId('UA-62895838-4');