Google Analyics and htaccess files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Catalyst
    Confirmed User
    • Jun 2003
    • 3243

    #1

    Google Analyics and htaccess files

    Someone told me I can use .htaccess files to call google analytical code.. Has anyone don't this?
  • Iron Fist
    Too lazy to set a custom title
    • Dec 2006
    • 23400

    #2
    Done it, but its tricky because you'll be inserting code into the header... all your scripts in PHP will fuck up..
    i like waffles

    Comment

    • Catalyst
      Confirmed User
      • Jun 2003
      • 3243

      #3
      ok.. but on static pages it works good.?

      Comment

      • Iron Fist
        Too lazy to set a custom title
        • Dec 2006
        • 23400

        #4
        Originally posted by Catalyst
        ok.. but on static pages it works good.?
        Yup, no problem.

        Code:
        php_value auto_prepend_file "/var/www/domain.com/google.txt"
        then make a notepad with the Google code and save it as google.txt where you said in the htaccess file.

        Enjoy.
        i like waffles

        Comment

        • Catalyst
          Confirmed User
          • Jun 2003
          • 3243

          #5
          thanks..

          Yea.. I some of my tours static.. so that would be great..



          Originally posted by sharphead
          Yup, no problem.

          Code:
          php_value auto_prepend_file "/var/www/domain.com/google.txt"
          then make a notepad with the Google code and save it as google.txt where you said in the htaccess file.

          Enjoy.

          Comment

          • brandonstills
            Confirmed User
            • Dec 2007
            • 1964

            #6
            That's what footers and layouts are for. So you don't have to modify 300 files when you want to make just 1 change. I hate it when I take over sites and they just copy and paste the same HTML over and over in every file.

            Brandon Stills
            Industry and programming veteran
            [email protected] | skype: brandonstills | ICQ #495-171-318

            Comment

            • Catalyst
              Confirmed User
              • Jun 2003
              • 3243

              #7
              Yea..

              most of my sites have a footer.. and a header...

              however I know I can append and prepend..

              I am just not sure how to inherit the .htaccess to subfolders

              Comment

              • brandonstills
                Confirmed User
                • Dec 2007
                • 1964

                #8
                Originally posted by Catalyst
                Yea..

                most of my sites have a footer.. and a header...

                however I know I can append and prepend..

                I am just not sure how to inherit the .htaccess to subfolders
                .htaccess already applies to subfolders

                Brandon Stills
                Industry and programming veteran
                [email protected] | skype: brandonstills | ICQ #495-171-318

                Comment

                • NinjaSteve
                  Too lazy to set a custom title
                  • Dec 2003
                  • 11089

                  #9
                  Too bad it messes up the PHP files. A way around that would be golden.
                  ...

                  Comment

                  • V_RocKs
                    Damn Right I Kiss Ass!
                    • Nov 2003
                    • 32451

                    #10
                    auto_append_file

                    Comment

                    Working...