We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3472
    • 3 Posts
    Greetings,

    I am new to this MODx CMS.

    Where can I put Google Search and Google AdSense codes in? I am not familiar how it will work but can anyone here help me.

    Thanks,

    Brad
      • 25663 MODX Staff
      • 12,272 Posts
      You put it where ever you’d like in your templates or in a chunk that’s included in your templates.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 3472
        • 3 Posts
        Ok, then why isn’t Google Search working on the template? Is there a specific way to do it?
          • 7231
          • 4,205 Posts
          Google search may have a conflict because it uses q= and so does MODx when in SEO friendly URL mode. Int he JS for google search edit the q to Q and it should work.If not you will need to describe the problem with more details.

          There is a great plugin for google analytics.

          AddSense should be just drop and go. grin
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 3472
            • 3 Posts
            dew_cw, thanks for the tip! Are you referring to template or template variable when I can drop Google AdSense code there? I am not exactly sure what is the difference between template and template variable. I plan to use Google AdSense on every page of my website. For both left and right columns.

            Thanks,

            Brad
              • 3688
              • 43 Posts
              Google search may have a conflict because it uses q= and so does MODx when in SEO friendly URL mode. Int he JS for google search edit the q to Q and it should work.

              This works for the actual version of MODx Revolution (2.0.0-pl) with SEF URLs also, thank you for the hint.