Results 1 to 10 of 671

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    I just put google code into includes/templates/your_template/common/html_header.php just before </head>. Works fine to date. Just one little thing about templates: some of them do not have html_header.php file at all, that means they use the default one. In this case you'd need to put google code into includes/templates/template_default/common/html_header.php

    p.s. I'm using v1.3.9
    Have a nice day!

  2. #2
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Google Analytics Integration

    Quote Originally Posted by indeks View Post
    I just put google code into includes/templates/your_template/common/html_header.php just before </head>. Works fine to date. Just one little thing about templates: some of them do not have html_header.php file at all, that means they use the default one. In this case you'd need to put google code into includes/templates/template_default/common/html_header.php

    p.s. I'm using v1.3.9
    Have a nice day!
    Actually, that is not the proper way to do it.

    If your template does not have that html_header.php file in it already then the proper thing to do to utilize the zen cart override system (and avoid your files being copied over when you upgrade) is to copy the html_header.php file from the "template_default/common" directory into the "common" directory that is associated with your custom template.

    So if your template was running from a directory called "mytemplate" then you would copy the html_header.php file from the 'template_default/common' directory to 'mytemplate/common'.

    That's how it should be done to keep within zen cart standards.

    The only way you want to use the template_default directory is if that is the actual template you are using to run your site.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  3. #3
    Join Date
    Apr 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Quote Originally Posted by econcepts View Post
    Actually, that is not the proper way to do it.

    If your template does not have that html_header.php file in it already then the proper thing to do to utilize the zen cart override system (and avoid your files being copied over when you upgrade) is to copy the html_header.php file from the "template_default/common" directory into the "common" directory that is associated with your custom template.

    So if your template was running from a directory called "mytemplate" then you would copy the html_header.php file from the 'template_default/common' directory to 'mytemplate/common'.

    That's how it should be done to keep within zen cart standards.

    The only way you want to use the template_default directory is if that is the actual template you are using to run your site.
    It brakes down the whole thing. Main page does not show up properly. It shows only the navigation panels, not the content.

  4. #4
    Join Date
    Apr 2011
    Posts
    7
    Plugin Contributions
    0

    Default Re: Google Analytics Integration

    Sorry! It wasn't the reason for break down. Just another thing happened at the same time as I've copied the header file.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Google Analytics Integration

    Quote Originally Posted by indeks View Post
    Sorry! It wasn't the reason for break down. Just another thing happened at the same time as I've copied the header file.
    Nice to hear you got it worked out.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

 

 

Similar Threads

  1. Google Analytics: Site Search Integration
    By saitomedia in forum General Questions
    Replies: 1
    Last Post: 29 Jul 2010, 08:08 AM
  2. google analytics integration
    By amnon_d in forum General Questions
    Replies: 3
    Last Post: 14 Jul 2009, 12:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg