7 Replies Latest reply on Apr 1, 2008 7:06 PM by resume-writer

    Adding Tracking URLs for Google Analytics

    resume-writer Level 1
      How do I add a tracking URL to every help page within the help system? I'm using RoboHelp 7, producing WebHelp. Thank you!
        • 1. Re: Adding Tracking URLs for Google Analytics
          Captiv8r Adobe Community Professional & MVP
          Hi Angela

          Near as I can tell, this is all handled using JavaScript. It should be a reasonably simple matter to connect it all up. I think I'd probably shoot for using a .JS file linked to each topic. Not sure though how it all operates. I'm unsure if each topic needs a specific identifier in the code or what.

          Cheers... Rick
          • 2. Re: Adding Tracking URLs for Google Analytics
            resume-writer Level 1
            You're right, JavaScript is what's used. The biggest mystery to me is where (dir) to put the code. I don't want to regenerate the source, only to find out that I overwrite the directory. Well, if you find a related archived topic, let me know. I've searched, but no luck. I'm thinking of just emailing Adobe Technical Support.
            • 3. Re: Adding Tracking URLs for Google Analytics
              Fly Molo
              Google should give you a snippet of code to attach to every page that you want tracked. Something like:
              quote:

              <script src=" http://www.google-analytics.com/urchin.js" type="text/javascript">
              </script>
              <script type="text/javascript">
              _uacct = "UA-YOURNUMBER";
              urchinTracker();
              </script>


              Put that in the footer for every topic. The easiest way is to put it in your topic template and reapply the template(s) to your topics. Unless Analytics has changed (been a while since I've used it) you don't have to attach a .js file to your project. The above script calls the Analytics server with your account number and visitor information. I love using Analytics for reporting and traffic monitoring, very good and free. Hope that helps.
              • 4. Re: Adding Tracking URLs for Google Analytics
                resume-writer Level 1
                Thank you so much! Yes, I got my snippet. I just had no clue what to do with it. I didn't know that I could reapply templates. Thanks!
                • 5. Re: Adding Tracking URLs for Google Analytics
                  resume-writer Level 1
                  Lucas,

                  Based on the text in my default template, there is a Header and Footer button in the toolbar. I don't see such a button. Can you shed some light on header/footers? Thank you!

                  By the way, I put my java script in <head></head> tag, then applied the template to a test topic, but the test topic didn't update.
                  • 6. Re: Adding Tracking URLs for Google Analytics
                    Captiv8r Adobe Community Professional & MVP
                    Hi again Angela

                    This is RoboHelp HTML, no?

                    If so, you should be able to do the following:
                    * Click View > Pods > Project Setup
                    * Right-click the Templates pseudo-folder and choose "New Topic Template"
                    * Name the Template and click OK
                    * Click View > Footer (Or View > Header - But Footer is probably more clean for this)
                    * Click Insert > HTML > Advanced > Script
                    * Paste your snippet of code and click OK (You should see red boxes in your footer)
                    * Click Window > Close all
                    * Click View > Pods > Topic List
                    * Press Ctrl+A to select all topics
                    * Right-click the selection and choose Properties
                    * Click the General tab
                    * Click the drop-down and choose your template, then click OK. It should then apply the footer to all the topics in your project.

                    That should get you pretty near to what you are seeking.

                    Cheers... Rick
                    • 7. Re: Adding Tracking URLs for Google Analytics
                      resume-writer Level 1
                      Thank you everyone for your help. Yes, it's working now. At first I was getting an error in Google Analytics, but fixed the problem: Don't make the mistake I made. Don't add <script type="text/javascript"> and </script> tags because RoboHelp adds them by default.