How to incorporate Google Analytics

How do I put the necessary javascript code into the header of the pages? Do I just add it to one of the other javascript files that are called or can I insert something into the header.uit?
Thank you,
Chris

Nevermind. Figured it out.

Similar Messages

  • How to Add Google Analytics?

    Hello,
    I would like to add Google Analytics to my flash file. The flash file is contained in a HTML file, which I already added the script provided by Google Analytics. At the moment, when a user visits my site, regardless which page is visited, only the homepage is counted.
    What as3 do I add to the flash file to keep track of each page that is being visited? I've tried a few codes provide on Google Analytics page and other tutorials, but none worked. The as3 for the menu buttons is displayed below.
    var menu_label:Array = new Array("Home", "Policy",
                                     "Clothes", "How To Buy", "Contact Me");
    var total:Number = menu_label.length;
    var spacing:Number=1;
    var i:Number = 0;
    var page:Number;
    var main_menu:MovieClip = new MovieClip();
    stage.addChild(main_menu);
    stage.addChild(envelope);
    stage.addChild(fm_content);
    for( i = 0; i < total; i++ )
        var btn = new button();
        btn.name = "btn" + i;
        btn.x = flashmo_button.x + (flashmo_button.width + spacing) * i;
        btn.y = flashmo_button.y;
        btn.item_no = i;
        btn.addEventListener( Event.ENTER_FRAME, btn_enter );
        var each_substring:Array = menu_label[i].split("|"); 
        btn.item_label.fm_label.text = each_substring[0]; 
        btn.item_url = each_substring[1];
        main_menu.addChild(btn);
    function btn_over(e:MouseEvent):void
        e.target.over = true;
    function btn_out(e:MouseEvent):void
        e.target.over = false;
    function btn_click(e:MouseEvent):void
        var mc = e.target.parent;
        if( mc.item_url != undefined ) 
            navigateToURL( new URLRequest( mc.item_url ), "_parent" );
        else 
            change_page(mc.item_no);
    function btn_enter(e:Event):void
        var mc = e.target;
        if( mc.over == true )
            mc.nextFrame();
        else
            mc.prevFrame();
    Any advice is appreciated.

    Nevermind. Figured it out.

  • How to insert Google analytics in BC website

    Please can you assist with how we can insert our Google Analytics in our clients BC websites
    thank you
    Michelle

    Hi Michelle,
    log in to your Google Analytics account, click on a project and go to Admin > Tracking Code.
    Under Step 2 copy the javascript code and paste it into each of your BC templates BEFORE the closing body tag (</body>). Done
    A more advanced approach would be to create a content holder, paste your Google Analytics Code in there and insert the contentholder into each of the templates before the closing body tag. That way you have only one file, in case you need to edit it later.
    Nicole - BCGurus.com   |  http://bcgurus.com/Business-Catalyst-Templates for only $7

  • How to implement Google Analytics in iRecruitment version 11.5.10

    Hi
    We have a requirement to implment google analytics in iRecruitment. Cany you please let me know the steps to do so.
    thanks
    srimathi

    360 is one of the options for appraisals in Oracle HR. The Talement Management Implementation Guide (Supplement) is very useful.
    Search MetaLink for : "Talent Management Supplement Release 11i and 12" to get the guide.

  • Add Google analytics to template (was: analytics and templates)

    how can I incorporate google analytics into my template based website. Can I directly paste the snippet into the template and it will work on all pages?

    Yes.  If you are using DW templates, I would recommend keeping it in an uneditable region of the template so that the code cannot be altered.

  • "SyntaxError: Parse error"  Installing Google Analytics-iWeb 09 w/MobileMe

    I have gone through many discussions on how to add Google Analytics - ran the Automator with my UA-xxxxxxxx-x number to my MobileMe Web>Sites folder, but the status on GA says that the tracking is not installed. I just noticed that in the resources tab under Develop>Web Inspector that there is a "SyntaxError: Parse error" under the UA#.
    Any thoughts? I am pretty new to this, so forgive me for my lack of intelligence when it comes to Google tracking. Should I start over? If so, how can I remove the current code?
    Thank you,
    Michael

    The freeware iWeb SEO Tool now has the facility to add analytics as well as SEO tags...
    http://www.iwebformusicians.com/SearchEngines/Tags.html
    There's a link on this page to an Apptorial tutorial.
    If you are interested in optimizing your files for faster download, the application Web SIte Maestro has a simplified way of adding analytics in the latest version.
    http://www.iwebformusicians.com/SearchEngines/Optimize.html
    Go to Finder/Go/iDisk/My iDisk/Web/Sites to delete the old code.
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • Data tracking with Google Analytics

    Hi
    Can I use Google Analytics with iweb?

    Yes. You can add it to each page using iWeb SEO which requires it to be reapplied each time you edit a page.
    You can also add it an HTML snippet which is a one time application. However, the snippet requires a bit more effort up front. Wyodor posted detailed instructions on how: IWEB : ADDING GOOGLE ANALYTICS WITHOUT EDITING THE WEBPAGE.
    Have you looked at the information that you can get about visitors by using a counter from StatCounter.com. It's quite comprehensive and much easier to add to each page.
    Click to view full size
    Old Toad's Tutorial #13 - Adding a StatCounter as an HTML Snippet describes how to add the counter.
    I've used both and find the info from StatCounter more complete regarding visitors.
    OT

  • Firefox connects to google-analytics for some sites, and then gets stuck, and I can never get onto the site. How do I prevent Firefox from connecting to google-analytics? I use XP with service pak 3 in English

    Firefox connects to google-analytics for some sites,when i click on links in websites or emails and then gets stuck, and I can never get onto the site. Or opens a new bower behind the one i'm usind that's blank i don't even know it's there untill i close the one i'm using. How do I prevent Firefox from connecting to google-analytics? Or opening a blank bowser behind the one i'm using. I use XP with service pak 3 in English
    == This happened ==
    A few times a week
    == a couple months ago

    I got the same issue.
    I go on a website and all the sudden another window pops up with "results.google-analytics.com" or "search.google-analytics.com". It has often ads for other sites for example. black single dating site
    how can I can I stop that from happening again?
    I didn't download or do anything, just visit websites, that I visit on a regular basis.
    OS: Windows XP
    Firefox Version: 3.6.6

  • How to use Event Tracking Code for Google Analytics in Dreamweaver CS5

    I need to track clicks on links that go to an outside website. I've read about "event tracking code". I'm not sure if it's the right tool to use. And if it is, I've spent several hours reading about it and I can't figure out how to use it. It looks like you need to be an expert developer to be able to make sense of all this. I've always been helped when I ask a question here, I'm hoping that someone can help me.
    What my client needs is to know what links are being clicked, and how often. Here's the page where I want to do this: Available Homes - Arizona Vacation Home Rentals 
    I added a code that I created using the tool I found here: General Event Tracking Code for Google Analytics but can't see to be able to make this work. I added this code to the first link called "View it Here" for the top, left house. Here's the code: <a href="http://www.homeaway.com/vacation-rental/p3495538" onClick="ga('send', 'event', { eventCategory: 'clicks', eventAction: 'clicks on homes', eventLabel: 'Clicked'});" target="_blank">View it HERE!</a> 
    Then I set a Goal in Google Analytics like it said in the instructions but it doesn't seem to work... I would APPRECIATE ANY HELP!
    Thanks,
    Brigitte

    I think you misunderstood what Event Tracking is designed for.  This is from Google Help
    Tracking Code: Event Tracking - Google Analytics — Google Developers
    "Use this to track visitor behavior on your website that is NOT related to a web page visit, such as interaction with a Flash video movie control or any user event that does not trigger a page request."
    Clicks on links are page requests.  I think for your purposes, you may want the Cross Domain Link Tracking plugin.
    Cross Domain Tracking - Web Tracking (analytics.js) - Google Analytics — Google Developers
    Nancy O.

  • Latest version of Firefox is having problems loading sites, it tries to load to Google Analytics. No error messages, just a page that won't load. How do I stop this?

    Latest version of Firefox is having problems loading some sites, it tries to load and then gets taken over trying to load Google Analytics. No error messages, just a page that won't load. How do I get rid of this, it is a "pain in the neck"
    == URL of affected sites ==
    http://

    I just spent 3 days with this issue as well. I finally fixed it by reluctantly adding yet another add-on called ADBLOCK
    I was able to selectively block google-analytics. Now pages that weren't loading before are now loading.
    eg vimeo.com starbucks.com & other random sites.
    This was a tough one to fix because there is NO ERROR MESSAGE..page just shows it's loading...forever..& the bottom of my browser says 'waiting for google analytics'. I finally figured out google analytics is the culprit. Ironically, some help pages in trying to find a fix wouldn't load for me due to google analytics arghhh!
    Im on a macbookpro & Safari worked fine for these same sites. It was just Firefox. I nearly switched back to Safari because of this stupid issue.
    I'm wondering if this was caused by recent firefox 'updates'...

  • How can I run Google Analytics on my site being hosted in Business Catalyst?

    Hi,
    I already have an existing website which is hosted, and of course I am the domain owner.
    I have created a new modified site in Adobe Muse CC and will wish to upload this new site to my domain once completed.
    I will need to run Google Webmaster tools etc before I replace the old site.
    I do not wish to replace the old site as yet prior to completing the new site in Muse CC
    At present I am "subscribed" to Google Analytics/Webmaster tools as a webmaster under my webmaster site (different) and have placed the "google verification code" metatag in my new site's "page properties <head></head tags only", and have uploaded to Business Catalyst.
    Business Catalyst are not my hosts for this site once it becomes "live". They are my "Trial Hosts"
    ? how can I run google analytics and tools for this new site prior to lauch (ie replacing my old site) ?
    Many thanks, await your response.
    (PS... Latest Muse CC is ACE!... Love it!)

    I finally figured out what I was doing wrong. First the information has to be entered on the home page. So the path is Home page> Page properties> Metadata> HTML for <head>. Secondly I was entering the information from the downloaded html file rather than the code they provide  under the alternate methods tab during the verification process . Google has a fine set of video tutorials to walk you through. https://support.google.com/webmasters/answer/35179?hl=en&ref_topic=3162387
    Thanks for all your help!
    Paula

  • How to remove ghostery, google analytics, and yahoo toolbar? thx.

    Question
    how to remove ghostery, google analytics, and yahoo toolbar? thx.

    Ghostery and the Yahoo toolbar are extensions.<br />
    https://support.mozilla.com/en-US/kb/Uninstalling%20add-ons#w_how-to-uninstall-extensions-and-themes
    Google analytics is a service for webmasters which collects statistics about usage of their websites. Not sure how that would affect website users - unless you installed a GA extension. If you got it, it can be uninstalled just like the other two extensions.

  • Firefox Browser freezes when websites have google analytics, anyone else experienced this problem? Know how to fix?

    Firefox Browser freezes when websites have google analytics, anyone else experienced this problem? Know how to fix?
    == URL of affected sites ==
    http://www.smarteoffers.com

    Hello Steven.
    There have been similar reports, yes. You may be having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
    If you want support for one of your add-ons, you'll need to contact its author.

  • How to send datas properly to Google Analytics (ANE-Google-Analytics)

    Hello,
    I meet a problem when I'm using the native extension created by Alessandro Bianco : ANE-Google-Analytics. I tested this code many times, in the context of AIR mobile application, but I tested it without any success to add new datas to Google Analytic history. I'm really connected to internet properly.
    Moreover I think that I've made my functions as required by the author : Can you look at my code below to detect some errors to communicate with Google Analytics ?
    <s:TabbedViewNavigatorApplication
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        creationComplete="creationCompleteHandler(event)"
    >
        import eu.alebianco.air.extensions.analytics.Analytics;
        import eu.alebianco.air.extensions.analytics.api.ITracker;
        import flash.utils.clearInterval;
        import flash.utils.setInterval;
        import flash.utils.setTimeout;
        public var ganalytics:Analytics;
        public var gtracker:ITracker;
        protected var i:int = 1; // Debug
        protected static const ANALYTICS_ID = "My UA code is here";
        protected function creationCompleteHandler(event:Event):void
            // I launch the tracker :
            ganalytics  = Analytics.getInstance();
            ganalytics.dispatchInterval = 5; // Interval for connecting : 5 seconds
            // I begin to use the tracker :
            GtrackerSessionUsing("RecordingView","HomeView",true);
         * GtrackerConnecting
         * @description : Open connection to Google Analytics, and create instance for a tracker
         * @argument : actionName = "RecordView" or "RecordEvent"
         * @argument : valueName = Name of the view or name of the event to record
        public function GtrackerSessionUsing(actionName:String, valueName:String, createConnection:Boolean=false):void
            gtracker = ganalytics.getTracker(ANALYTICS_ID);
            gtracker.startNewSession();
            if(etablirConnexion==true)
                // Tracking des views :
                var compteur:int = 0;
                var intervalGtrackerCnxOuvrir:uint = setInterval(function():void{
                    counter++;
                    trace("gtracker ="+gtracker);
                    if(counter==50){ // Try to connect - only - 50 times
                        trace("GoogleTracker fails to connect !");
                        clearInterval(intervalGtrackerCnxOuvrir);
                    else if(gtracker!=null){
                        trace("GoogleTracker success to connect !");
                        GTrackerRecordAction("EnregistrerView","HomeView");
                        clearInterval(intervalGtrackerCnxOuvrir);
                    else{
                        trace("Trying to connect to GoogleTracker... (itérate #"+counter+")");
                        gtracker = ganalytics.getTracker(ANALYTICS_ID);
                        gtracker.startNewSession();
                },5000); // All 10 seconds : iterate a new connection test
        protected function GTrackerRecordAction(actionName:String, valueName:String)
         * @description : Use the tracker of the Google Analytics connected account, all of Views can call this function with this model of code: parentApplication.GTrackerRecordAction(...)
         * @argument : actionName = "RecordView" or "RecordEvent"
         * @argument : valueName = Name of the view or name of the event to record
            if(gtracker!=null)
                switch(actionName){
                    case "RecordView":
                    trace("GoogleTracker : gtracker.buildView("+valueName+").track()");
                    gtracker.buildView(valueName).track();
                    break;
                    case "RecordEvent":
                    switch(valueName){
                        case "event1":
                            gtracker.buildEvent("click", "button").withLabel("play").withValue(10).track();
                        break;
                        case "event2":
                            gtracker.buildEvent("click", "button").withLabel("stop").track();
                        break;
                        case "event3":
                            gtracker.buildEvent("app", "quit").track();
                        break;
                    break;
    Best regards.

    Youtch,
         I'm not sure exactly what your issue is, but I was unable to connect and looked at your code, modifying it for my purposes and it fixed my code. Hopefully it can help fix yours.
         I did notice one thing as I went through, however:
    You use
       var compteur:int = 0;
                var intervalGtrackerCnxOuvrir:uint = setInterval(function():void{
                    counter++;
    The compteur does not match the counter variable. It appears a problem with Franglais is the issue here.
    In the event it may help, here is the code I used:
    In my creationComplete function:
    GoogleAnalytics.initialize("UA-47303719-1");
    Here is the code in my app.xml
    <extensions>
            <extensionID>eu.alebianco.air.extensions.analytics.NativeGATracker</extensionID>
        </extensions>
    And here is the class I created to use the ANE:
    package ANE.NativeGATracker{
         import flash.utils.clearInterval;
         import flash.utils.setInterval;
         import eu.alebianco.air.extensions.analytics.Analytics;
         import eu.alebianco.air.extensions.analytics.api.ITracker;
         public class GoogleAnalytics{
              static private var _analytics:Analytics;
              static private var _tracker:ITracker;
              static private var _supported:Boolean;
               * There is no need to instantiate this class
              public function GoogleAnalytics(){
              * Initialize the GoogleAnalytics object.. or return false, if Analytics isn't supported
              static public function initialize(ANALYTICS_ID:String):Boolean{
                   if(Analytics.isSupported()){
                        _analytics  = Analytics.getInstance();
                        _analytics.dispatchInterval  = 5;
                        establishTracker(ANALYTICS_ID);
                        _supported   = true;
                   }else{
                         _supported  = false;
                   return _supported;
              * Establish the tracker connection
              * @description: establishes the tracker connection... reattempt every 10 seconds, up to 50 times
              static private function establishTracker(ANALYTICS_ID:String):void{
                   _tracker  = _analytics.getTracker(ANALYTICS_ID);
                   _tracker.startNewSession();
                   var counter:int    = 0;
                   var establishInterval:uint  = setInterval(function():void{
                        counter++;
                        trace("Google Analytics tracker = " + _tracker);
                        if(_tracker != null){
                             trace("GoogleAnalytics tracker connected!");
                             _tracker.buildView("Launch").track();
                             _tracker.buildView("Home").track();
                             clearInterval(establishInterval);
                       }else if(counter == 50){
                             trace("GoogleAnalytics failed to connect.");
                             clearInterval(establishInterval);
                       }else{
                             trace("Trying to connect to Google Analytics... attempt #" + counter);
                             _tracker  = _analytics.getTracker(ANALYTICS_ID);
                             _tracker.startNewSession();
                   }, 5000);
             * Analytics object
              static public function get analytics():Analytics{
                   return GoogleAnalytics._analytics;
              * Tracker object
              static public function get tracker():ITracker{
                   return GoogleAnalytics._tracker;
              * Returns true if analytics are supported, but false if they are not. Check this before any use of the tracker or analytics objects
              static public function get supported():Boolean{
                   return GoogleAnalytics._supported;

  • How do I pass a form value to Google Analytics

    I would like to pass a form value to Google Analytics. ie. if the user enters a value and submits the form, on the confirmation page I'd like to read the value and other form fields and pass those populate the Google Analytics tracking code ie. populate this withthe form values:
    _gaq.push(['_addItem',
          '1234',         // order ID - necessary to associate item with transaction
          'DD44',         // SKU/code - required
          'T-Shirt',      // product name - necessary to associate revenue with product
          'Olive Medium', // category or variation
          '11.99',        // unit price - required
          '1'             // quantity - required

    How about this - bind an ajax call to google analytics to the form submit button (change the type from submit to button or suppress the default event), having the form itself only submit after the ajax call is successful? No need to even worry about the confirmation page then.

Maybe you are looking for

  • MS Access 2010 and TFS problem when I try to "create form team foundaition"

    I am using MS Access 2010 and trying to use TFS for source control. I installed MSSCCI for 2010 and the "Access Developer Extensions" I am able to create a project in TFS and check in and check out access objects. My only problem is when I click on "

  • Videos not displaying in list

    When I add a video to my media card, it is not displayed in the media section under videos. The only way to access it it to got to Media, hit menu and then Explore.  I can see all videos that I recorded with the 8900, but others do not show up. I eve

  • IPC: Condition Types attached to material group

    Hello all,    I am working in a ECC - IPC scenario and needed your help.   I implemented a IPC userexit(scale base formula) which corresponds to a condition type ZDCV which implements a discount for the products.   When this condition type is attache

  • Dynamic ALV: but with globally available dynamic table type

    Hello, I would like to create a dynamic node for a ALV and dynamic table types to fill and the ALV. The ALV data can be changed so I need to read it again. I have read all the threads about dynamic node create and i have no problem with it. I can cre

  • Error grouping items - Error 9024: Cannot modify a layer that is locked

    Hello, I'm trying to group all sublayers so that i can easily resize the group.  But when I run this code: var gi = doc.activeLayer.groupItems.add(); for(var i = 0; i < doc.selection.length; i++) {      doc.selection[i].move(gi, ElementPlacement.PLAC