Daniel Monskey

Q: Google Analytics Tracking Code Goes into the Code of Every Web Page---Where?

It has been suggested for me to apply Google Analytics to my website. They have a tracking code (specific to me and my site) that goes into every page of the website that I want tracked for traffic and activity. I don't understand where this code goes.

This is what it says:

"This is the Universal Analytics tracking code for this property. To get all the benefits of Universal Analytics for this property, copy and paste this code into every webpage you want to track."

(below is the beginning of the code for recognition)

 

<script>

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

.......

.......

 

 

Dan

Final Cut Pro 7, Mac OS X (10.6.8)

Posted on Oct 15, 2014 8:58 AM

Close

Q: Google Analytics Tracking Code Goes into the Code of Every Web Page---Where?

  • All replies
  • Helpful answers

  • by Wyodor,

    Wyodor Wyodor Oct 15, 2014 12:50 PM in response to Daniel Monskey
    Level 6 (19,753 points)
    Oct 15, 2014 12:50 PM in response to Daniel Monskey

    Click the link below :

     

    http://wyodor.byethost8.com/js/analytics.js

     

    Save the file on your computer.

    Open the file in a plaintext editor.

    On the line where it says 'create', replace xxxxxxxx with your own id.

    Save the file.

     

    Connect to your webserver and create a folder js in the root of the server.

    Put the analytics file in that folder.

    Display the file in a browser window to make sure it exists.

     

    Click the link below :

     

    http://wyodor.byethost8.com/js/widget.txt

     

    Copy the code.

    Add a HTML Snippet to each page you want analyzed.

    Paste the code in the HTML Snippet.

    Publish the page(s).

    Open a page in a browser window.

     

    Go to Google Analytics and display the Realtime Overview.

    The page should show.

     

    Repeat with other pages.

  • by Daniel Monskey,

    Daniel Monskey Daniel Monskey Oct 15, 2014 1:51 PM in response to Wyodor
    Level 1 (4 points)
    iLife
    Oct 15, 2014 1:51 PM in response to Wyodor

    Is Dreamweaver a plaintext editor or something like Microsoft Word (or other)?

     

    The spot to replace the xxxxxx with my own id---is it the Google Analytics id?

  • by Daniel Monskey,

    Daniel Monskey Daniel Monskey Oct 15, 2014 1:54 PM in response to Daniel Monskey
    Level 1 (4 points)
    iLife
    Oct 15, 2014 1:54 PM in response to Daniel Monskey

    And what about my OWN Google Analytics web tracking code? I'm supposed to put that in my pages too.

  • by Daniel Monskey,

    Daniel Monskey Daniel Monskey Oct 15, 2014 3:09 PM in response to Daniel Monskey
    Level 1 (4 points)
    iLife
    Oct 15, 2014 3:09 PM in response to Daniel Monskey

    I understand all the directions now and have performed them correctly---they are in all the pages of the site now and counting the hits. When I scrutinized your code I saw it was exactly like the code Google Analytics created for me. So, I pulled the ID number from that and put it in your code. All went well.

    Thank you for your tremendous help, Wyodor.

    Keep the world turning!

    Dan

  • by Daniel Monskey,

    Daniel Monskey Daniel Monskey Oct 15, 2014 6:36 PM in response to Daniel Monskey
    Level 1 (4 points)
    iLife
    Oct 15, 2014 6:36 PM in response to Daniel Monskey

    Sorry folks---I'm not getting this myself and my site is not getting analytics either. I followed Wyodor's directions to a T without the <script>  & </script> code as he wrote and I got the "Status: Tracking Not Installed" message. Then I put the <script> & </script> code in with the complete message as it says to have in the Google Analytics directions. That didn't change the status----still Tracking not installed.

    I spoke with GoDaddy and they say the js document is in the correct folder on the hosting site, as written in Wyodor's message too---I displayed the file in a browser and it does exist. I don't get why this doesn't work. The html snippets are on every page of my website---at the bottom but not in the footer. I have no header (which is where Google Analytics says to put the snippets). So, I think they are in the body.

    Is there any way this can be remotely analyzed to determine the problem?

    The Google Analytic site does say it can take up to 24 hours to see the analytic data, but it seems like the status should show up right away.

    Help, please!

    Dan

    http://www.wildmonkeysproductions.com/WILDMONKEYSPRODUCTIONS/HOME.html

  • by Wyodor,

    Wyodor Wyodor Oct 16, 2014 1:19 AM in response to Daniel Monskey
    Level 6 (19,753 points)
    Oct 16, 2014 1:19 AM in response to Daniel Monskey

    Where's the file?

     

    http://www.wildmonkeysproductions.com/js/analytics.js

     

    And in the meantime, I will try to keep the world turning.

  • by Daniel Monskey,

    Daniel Monskey Daniel Monskey Oct 16, 2014 9:30 AM in response to Wyodor
    Level 1 (4 points)
    iLife
    Oct 16, 2014 9:30 AM in response to Wyodor

    I personalized it so I can find it easier and associate it with this website. Here is the link:

     

    http://www.wildmonkeysproductions.com/js/wmp_analytics.js

     

    Dan

  • by Wyodor,Helpful

    Wyodor Wyodor Oct 16, 2014 10:26 AM in response to Daniel Monskey
    Level 6 (19,753 points)
    Oct 16, 2014 10:26 AM in response to Daniel Monskey

    When you rename a file on the server, it follows that you also have to change the filename in the code.

  • by Daniel Monskey,

    Daniel Monskey Daniel Monskey Oct 16, 2014 2:19 PM in response to Wyodor
    Level 1 (4 points)
    iLife
    Oct 16, 2014 2:19 PM in response to Wyodor

    Thanks for the correction---a simple, obvious one, but I miss details with all this code sometimes, making changes here and there and copies and uploading,...

     

    It looks like THIS message didn't go through earlier, so here it is again:

     

    The code appears as if it is in the correct place on my pages. The Google Analytics status now says "Receiving Data".

    It must just take a while for status to change---not just receive data but to recognize it is working. That's too bad. People then need to have a LOT of faith they are doing things correctly to walk away from a project for hours and hours knowing 9with hope and faith) that is is going to work. NASA, the military and others wouldn't go on faith for their endeavors.

     

    Thank you Wyodor for your help and concern with my difficulties---particularly at night-owl hours!

     

    This has been an arduous journey developing a much more complex, yet more appealing and current design featured website. This was WAY over my head for understanding the process and it was of necessity to reach out for help to accomplish what I wanted with this project. I am thankful for all the help and I really appreciate that there is a community willing and dedicated to helping people like myself struggling to resolve problems and overcome technical difficulties with things that are a passion for us. You are all a tremendous resource! I could never have done what I achieved on my site without the help of this group.

    Thank you!

    Dan