8 Replies Latest reply on Feb 13, 2013 4:26 PM by Dam4222

    Google Analytics

    Dam4222 Level 1

      http://createmate.coHey Guys,

       

      Im about to upload a site I developed. I need to insert the following google analytics code:

       

      <script type="text/javascript">

       

       

        var _gaq = _gaq || [];

        _gaq.push(['_setAccount', 'UA-38381881-1']);

        _gaq.push(['_trackPageview']);

       

       

        (function() {

          var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

          ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

        })();

       

       

      </script>


      Is there a way to do this inside of edge? Also, being that my site is built in edge and doesnt really use multiple "links" will it track properly in terms of site usage. Here is a test environment version http://createmate.co

       

      Adam

        • 1. Re: Google Analytics
          mermaidnyc Level 1

          hi adam,

           

          i paste my analytic code into the .html files generated when i "publish settings"

           

          between the <head> </head> under <!--Adobe Edge Runtime End-->

           

          i have been able to track each .html page visited in my site.

           

          if anyone else knows a better way to do this, i'd love to know!!!!

           

          -sharon

          • 2. Re: Google Analytics
            Dam4222 Level 1

            When you say each .html do you do these inside of edge? Currently I do not use seperate .html's for my composition. I just use 1 and jump around the Timeline. Check out createmate.co and you will see what I mean.

            • 3. Re: Google Analytics
              mermaidnyc Level 1

              i use dreamweaver to put the tracking code into each .html file generated by edge when i "publish settings".

               

              below is the code used in your site i grabbed using "view source"

               

              i added your tracking code below <!--Adobe Edge Runtime End-->

               

              and marked the start with <!--google tracking code start-->

              and marked the end with <!--google tracking code start-->

               

              note, i didn't copy all the code out of "view source" just enough to show you where to place the trackig code.

               

              this needs to be done in each .html page

               

               

              Below is the code from "view source"

               

              <!DOCTYPE html>

               

               

              <html style="height:100%;">

               

               

              <head>

               

               

               

               

               

               

              <meta name="keywords" content="stock music, production music, audio studio, creative audio studio, music production, composer, music composition, music score">

               

               

              <meta name="description" content="Wolf & Rabbit is a Brooklyn, NY based creative audio studio. We compose music for commercial media. Our talented team will work with you to create story driven music that evokes emotionand drives results.">

               

               

               

               

               

               

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

               

               

              <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>

               

               

              <title>Wolf & Rabbit</title>

               

               

              <!--Adobe Edge Runtime-->

               

               

              <script type="text/javascript" charset="utf-8" src="wolfrabbit_edgePreload.js"></script>

               

               

              <style>

               

               

              .edgeLoad-EDGE-697166099 { visibility:hidden; }

               

               

              </style>

               

               

              <!--Adobe Edge Runtime End-->

               

               

              <!--google tracking code start-->

               

               

              <script type="text/javascript">

               

               

                var _gaq = _gaq || [];

                _gaq.push(['_setAccount', 'UA-38381881-1']);

                _gaq.push(['_trackPageview']);

               

               

                (function() {

                  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

                  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

                  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

                })();

               

               

              </script>

               

              <!--google tracking code end-->

               

               

               

               

               

               

              </head>

               

               

              <body style="margin:0;padding:0;height:100%;">

              • 4. Re: Google Analytics
                Dam4222 Level 1

                Ok so I get where to put the code now. But in terms of creating seperate HTML pages, Edge doesnt really quite work like that, its all timeline based. So will Google Analytics track user behaviour on the site even if there are technically no other .htmls but index.html?

                • 5. Re: Google Analytics
                  mermaidnyc Level 1

                  yes indeed, it's the index.html

                   

                  if your site was set up using multiple Edge pages, for example, a file for each page on your main navigation, you would have more than one .html file

                  • 7. Re: Google Analytics
                    mermaidnyc Level 1

                    hi joel,

                     

                    thank you so very much! Have a fantastic day!!!

                     

                    -sharon

                    • 8. Re: Google Analytics
                      Dam4222 Level 1

                      Thanks Joel. This is perfect!