This is making me sick. I tried everything copy/paste the correct before /head tag in my index.tpl file but still GA not detecting the code. It a whole month gone nothing working. Can someone please check the site www.plugnbuy.com , where i am doing wrong ?
[quote name='martfox' timestamp='1365746247' post='159851']
The GA code is installed properly in your site.
[/quote]
Oh i actually enable GA addon and entered their wrong value, that's why the problem was happened but after clearing the cache now the website showing fatal error
Fatal error: Smarty error: [in index.tpl line 544]: syntax error: missing attribute value (Smarty_Compiler.class.php, line 1589) in /home/***/public_html/lib/smarty/Smarty.class.php on line 1095
Re-upload the “index.tpl” file to the installation.
[quote name='martfox' timestamp='1365753881' post='159855']
Re-upload the “index.tpl” file to the installation.
[/quote]
Now it is showing different error
Fatal error: Smarty error: [in /home//public_html/skins/plug_buy/customer/blocks/my_account.tpl line 64]: syntax error: unrecognized tag: $lang.order_id| !$auth.user_id (Smarty_Compiler.class.php, line 445) in [b]/home//public_html/lib/smarty/Smarty.class.php[/b] on line 1095
Then reupload all core files as it seems you messed something in the code or some files are corrupted.
In /skins/plug_buy/customer/blocks/my_account.tpl, you're missing a piece of code for the escape, it should be:
[quote name='StellarBytes' timestamp='1365768023' post='159867']
In /skins/plug_buy/customer/blocks/my_account.tpl, you're missing a piece of code for the escape, it should be:
[/quote]
Thanks after i done that now its showing missing attribute error in index.tpl file. Can you please help me on this issue. Here is my index.tpl file
Fatal error: Smarty error: [in index.tpl line 531]: syntax error: missing attribute value (Smarty_Compiler.class.php, line 1589) in /home/***/public_html/lib/smarty/Smarty.class.php on line 1095
```php
{strip}
{if $page_title}
{$page_title|escape:"html"}
{else}
{foreach from=$breadcrumbs item=i name="bkt"}
{if !$smarty.foreach.bkt.first}{$i.title|unescape|strip_tags|escape:"html"}{if !$smarty.foreach.bkt.last} :: {/if}{/if}
{/foreach}
{if !$skip_page_title}{if $breadcrumbs|count > 1} - {/if}{$location_data.title|escape:"html"}{/if}
{/if}
{/strip}
{include file="meta.tpl"}
{include file="common_templates/scripts.tpl"}
{include file="common_templates/styles.tpl" include_dropdown=true}
{literal}
{if $smarty.request.dispatch eq 'products.view'}
{/if}
{if $smarty.request.dispatch eq 'index.index'}
{/if}
{if "SKINS_PANEL"|defined}
{include file="demo_skin_selector.tpl"}
{/if}
{render_location}
{include file="common_templates/loading_box.tpl"}
{if "TRANSLATION_MODE"|defined}
{include file="common_templates/translate_box.tpl"}
{/if}
{if "CUSTOMIZATION_MODE"|defined}
{include file="common_templates/template_editor.tpl"}
{/if}
{if "CUSTOMIZATION_MODE"|defined || "TRANSLATION_MODE"|defined}
{include file="common_templates/design_mode_panel.tpl"}
{/if}
{if $smarty.request.dispatch neq 'categories.view'}
{/if}
{hook name="}
{if $smarty.request.dispatch eq 'index.index'}
{/if}
```
Your index.tpl only has 218 lines…the error states line 531…
Have you got more than one index.tpl? Or any post/pre/override index.tpl files?
As I said - it's easier to re-upload the original core files to the installation. Did you try it?
[quote name='martfox' timestamp='1365792997' post='159890']
As I said - it's easier to re-upload the original core files to the installation. Did you try it?
[/quote]
If you can see our index.tpl file is different than the default one because it is customized. I tried that method and website is working now but there is a new issue happened in log-in url - [url=“https://www.plugnbuy.com/login?return_url=Array.current_url|”]yourdomain.com
It's not an “issue”. It's due your modified login page or whatever.
It seems the latest BETA GA code needs to be in the header. Anyone know how to do that ?
edit - stuck it in litterals seems to work.
[quote name=‘kickoff3pm’ timestamp=‘1366295718’ post=‘160211’]
It seems the latest BETA GA code needs to be in the header. Anyone know how to do that ?
[/quote]
The GA code should be placed before the closing tag.
[list=1]
[]Turn on the tracking options you want, then click Save.
[]Copy and place the code snippet
Once you find the code snippet, copy and paste it into your web page, just before the closing[color=#ff0000] [/color] tag*. If your website uses templates to generate pages, enter it just before the closing [color=#ff0000] [/color]tag in the file that contains the section. (Most websites re-use one file for common content, so it's likely that you won't have to place the code snippet on every single page of your website.)
[/list]
[url=“Set up the Analytics Google tag - Analytics Help”]Set up the Analytics Google tag - Analytics Help
Problem was solved. No need to copy paste the code, just activate the GA addon, that's it.
Hi,
I assumed you won't use the GA addon. Anyway sometimes if you want to use some code like JS in smarty, you will have to wrap your javascript in {literal} tags: