Jump to content

Google Analytics code problem


Recommended Posts

Could you please help me with problem outlined below?

 

I tried to insert google analytics code (via the Google Analytics v1.4 by PrestaShop module) but I cannot see the Analytics code  on the page's source at all.

 

Additionally, I tried to 'hardcode' that piece of code in the header.tpl file (located in my themes directory) and still couldn't see the code. 

 

Any help will be highly appreciated...

 

p.s I cleared both prestashop's & browser's cache

Link to comment
Share on other sites

Try this quick test:

Hardcode

 

"SHOW ME THIS"

 

Inside the tpl file of google analytics, and see if it's displayed in the source  (just be sure force compile is enabled)

 

If it doesn't go to tools/smarty/compile and erase all files but index.php, then reload the page

Link to comment
Share on other sites

I did change the permissions as you suggested and I do confirm that there is the path: /tools/smarty/sysplugins/smarty_internal_write_file.php.

 

But as you can see there are still warnings, and excpet from that you can see and other strange things

Link to comment
Share on other sites

  • 2 months later...

hi,

I had a similar problem..

the reason why your page fails after inserting the javascript is because the code contains the { and the } characters. The header.tpl file is pareses by the Smarty template engine and attempts to interpret all instances of { and }. The way to resolve this is to wrap the inserted javascript code in {literal}{/literal} tags. e.g.

 

after inserting the literal Tags it's working fine...

I haven't had any side effects so far....

Link to comment
Share on other sites

×
×
  • Create New...