threeopus3 Posted May 5, 2014 Share Posted May 5, 2014 (edited) Here is one of those BIG issues with little documentation. As we know, the layered navigation module requires a hash tag (#) before the filter names. As such, google does not track any product views in the store. Does anyone have insight into how to deal with this? Thank you in advance. Note: In blocklayered.tpl, I can change this code: <script type="text/javascript"> {if $nbr_filterBlocks != 0} current_friendly_url = '#{$current_friendly_url}'; {if version_compare($smarty.const._PS_VERSION_,'1.5','>')} param_product_url = '#{$param_product_url}'; {else} param_product_url = ''; {/if} </script> to <script type="text/javascript"> {if $nbr_filterBlocks != 0} current_friendly_url = '=?{$current_friendly_url}'; {if version_compare($smarty.const._PS_VERSION_,'1.5','>')} param_product_url = '?{$param_product_url}'; {else} param_product_url = ''; {/if} </script> While this (substituting # for ?) works, and google can now track product views, there is an extra page load whenever I elect a filter. I have tried editing blocklayered.js to deal with this extra page load, but have not had any luck. Edited May 5, 2014 by threeopus3 (see edit history) Link to comment Share on other sites More sharing options...
fortuner Posted April 9, 2015 Share Posted April 9, 2015 I think this issue must be placed on Forge as it is major and to-do-first. In fact there is no difference by now if you select to index or not your filter pages. They all will be ignored by all major search engines. Did you succeed with extra page load? Everybody will appreciate, if you share your solution. Link to comment Share on other sites More sharing options...
csimmons222 Posted July 20, 2016 Share Posted July 20, 2016 Is there a fix for this? I have noticed that google analytics is not tracking my users when the go to page 2, 3, 4, etc. of a category due to the # in the url. Link to comment Share on other sites More sharing options...
Recommended Posts