I'm sorry in advance, I am sure this is a newbie question. But I am fairly new at this and I cant seem to find detailed info on the topic. I have installed analytics before on static pages and dont have any problems doing that, but I wanted to know how to install it on dynamic pages such as an e-commerce site. Someone told me that all I needed to do was add the script on the index or default page, but that doesn't seem to make sense to me. How does it track the rest of the site if its only on the index or default page? Any help would be appreciated.
If you are using any kind of template systems, there should be header or footer portions. You can add Google analytics on the footer part. If you want to track E-commerce transactions using Google Analytics, the E-commerce part of the GA code should be placed after the usual GA code snippet, so you can plan your tracking code placement accordingly.
You must add GA script to your index or default page on header or footer part. You can also save the script to external file and load it on every pages of your website. It will be easier if you are using CMS with template system like Joomla, Drupal, etc because you can find the GA plugin and install it directly.