segment-boneyard / analytics-magento

[DEPRECATED] The hassle-free way to integrate analytics into any Magento store.
15 stars 19 forks source link

Category pages report duplicated names #74

Closed dmulter closed 9 years ago

dmulter commented 9 years ago

Any Magento category pages wind up reporting the page name as the fully imploded category name list duplicated. For example, an expected page name of "Default Category -> Cat1" would actually show as "Default Category -> Cat1Default Category -> Cat1".

The following code in app/design/frontend/base/default/template/segment_analytics/page.phtml:

    window.analytics.page(<?php echo $this->getPropertyAsJavascriptString('full_category_name');?>, <?php echo $this->getPropertyAsJavascriptString('full_category_name');?>,{},<?php echo $this->getContextJson(); ?>);        

Should actually be:

    window.analytics.page(<?php echo $this->getPropertyAsJavascriptString('full_category_name');?>," ",{},<?php echo $this->getContextJson(); ?>);        

Note that the " " string for the page name must be a single space to force the use of no name as the parameter must be supplied.