11 Replies Latest reply on Dec 3, 2010 6:32 AM by Willam van Weelden

    RH output with Google Analytics

    jsiwila

      I am trying to get Google Analytics to track individual page views in an HTML help set.  Every page viewed appears as the base or index file, and Google only seems able to count views of that page.  It cannot seem to see the individual pages within the help set as separate pages, even when I add the Analytics script to those pages.

       

      Has anyone used Google to track page views?  Is there any control in RH7 that allows individual htm pages to viewed with separate URLs?

       

      I notice too that anytime page source is viewed, it is always the index page, which has no body content.

        • 1. Re: RH output with Google Analytics
          SueKL

          Hi,

          I can't help w/the Google analytics, but as far as tracking individual pages.  Can you just put a # sign following your original URL and see if you get data on the individual page this way?  We're doing this to see hits using another analytics tool and it works.

           

          such as having your URL include --> WebHelp/Sample_Help#General_Info.htm

          • 2. Re: RH output with Google Analytics
            jsiwila Level 1

            Thanks for the idea, but I'm not sure how to make this work with Webhelp files.  When RH generates Webhelp, it creates a master file with no content.  When you open the help system, the URL is for the master file.  When you open topics from the TOC, the topic page displays but the URL remains that of the master file.  Each topic is in a separate HTML file, but the name of that file appears nowhere.

            • 3. Re: RH output with Google Analytics
              Jeff_Coatsworth Adobe Community Professional & MVP

              From what I remember reading about people's attempts to use Google Analytics on their WebHelp pages, you needed to add some Google code to each page in your project to trigger the counting action to occur.

              RoboServer is the easiest way to track stuff like this according to experts (I don't use it myself & my help is all locally hosted)

              • 4. Re: RH output with Google Analytics
                jsiwila Level 1

                Thanks.  I added the script to the index/master page, and it gets tracked, but it seems to record only one view no matter how many pages are viewed after landing on the index.  I tried putting the script on individual pages, but they still don't seem to get tracked.  I'll try some more.

                 

                Thanks again.

                • 5. Re: RH output with Google Analytics
                  Peter Grainge Adobe Community Professional (Moderator)

                  Like Jeff, I think this has been covered before and I seem to recall that someone posted a fair amount of detail. Try the in forum searches.

                   


                  See www.grainge.org for RoboHelp and Authoring tips

                   

                  @petergrainge

                  • 6. Re: RH output with Google Analytics
                    jsiwila Level 1

                    Right, but I couldn't find a solution to my particular problem. Seems one other person had the same problem.  The answers were helpful but not complete.

                    • 7. Re: RH output with Google Analytics
                      Peter Grainge Adobe Community Professional (Moderator)

                      Is the help publicly accessible? If not I believe it can be accessed if on an intranet but there are some special procedures or conditions, documented on Google's site I believe.

                       


                      See www.grainge.org for RoboHelp and Authoring tips

                       

                      @petergrainge

                      • 8. Re: RH output with Google Analytics
                        peter braham Level 1

                        We use Googla analytics and it works well, except the relativelu minor trouble that it records hits to the site from search engines  as landing ion the welcome page.

                         

                        The help is on a public site.

                         

                        When we build the page we tick the 'add a master page to each topic', and the master page contains the following HTML code, which we got from Google. (XXXXXXX is our Google account code):

                         

                        <?rh-region_start type="footer" style="width: 100%; position: relative;" ?>

                            <script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
                        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script>
                            <script type="text/javascript">try {
                        var pageTracker = _gat._getTracker("UA-XXXXXXX-1");
                        pageTracker._trackPageview();
                        } catch(err) {}</script>
                        <?rh-region_end type="footer" ?>

                         

                        Hope this helps,

                        Peter

                         

                         

                        gaJsHost [gaJsHost]

                        • 9. Re: RH output with Google Analytics
                          jsiwila Level 1

                          Thanks to both Peters for continuing to help me.

                           

                          Peter Braham, your solution sounds like it would work for me.  I cannot, however, find the "add master page to each topic" setting.  I'm generating WebHelp on RH7.  Can you direct me to the location of that setting?

                           

                          Thanks again.

                          • 10. Re: RH output with Google Analytics
                            peter braham Level 1

                            In the Single Source Layouts pod, open a webhelp layout: the first page of properties has a group box at the bottom called Additional Options, in which is a check box labelled Apply to all Topics, along with a radio box called Master Page. Check Master Page and add your htt file that contains your javascript code.

                             

                            Peter

                            • 11. Re: RH output with Google Analytics
                              Willam van Weelden Adobe Community Professional & MVP

                              Hi,

                               

                              Master pages and the apply to all option are RH8 only.

                               

                              In RH7, they're called Templates. To apply a single template to all your topics, select all topics in the topic list. Right click and select Options. Find "Template" and select the template you want.

                               

                              Greet,

                               

                              Willam