Jump to content

#Google Analytics #Hashtags #Layered Navigation


Recommended Posts

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 by threeopus3 (see edit history)
Link to comment
Share on other sites

  • 11 months later...

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

  • 1 year later...
×
×
  • Create New...