Jump to content

Recommended Posts

Hi!

 

i need some hlep for Google Analytics v1.4.1. module

The site tracks only 'category' and 'product' words, with this track code:

_gaq.push(['_trackPageview', 'category']);

_gaq.push(['_trackPageview', 'product']);

 

is this normal???

I need track separately the categories and products name like this:

_gaq.push(['_trackPageview', 'category_name']);

_gaq.push(['_trackPageview', 'product_name']);

 

i'm using seo frendly urls & prestashop 1.4.8

 

thx!

enzor

post-365516-0-93457500-1338975111_thumb.png

  • Like 1
Link to comment
Share on other sites

i find this part in modules/ganalytics/header.tpl:

 

{if isset($pageTrack)}_gaq.push(['_trackPageview', '{$pageTrack}']);

 

i changed this line to:

{if isset($pageTrack)}_gaq.push(['_trackPageview', '{$meta_title}']);

 

Works fine!

_gaq.push(['_trackPageview', 'The Product name - Your website's name']);

_gaq.push(['_trackPageview', 'The Category name - Your website's name']);

Edited by enzor (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I am using prestashop 1.4.8.2

 

If in modules/ganalytics/header.tpl you change

 

{if isset($pageTrack)}_gaq.push(['_trackPageview', '{$pageTrack}']);

 

to

 

{if isset($pageTrack)}_gaq.push(['_trackPageview', '{$meta_title}']);

 

Google Analytics goals will no longer function properly.

 

I have come up with this solution instead:

 

in /modules/ganalytics/ganalytics.php add the following

 

underneath

 

  $file = str_replace(array('.php', '-'), '', basename($_SERVER['SCRIPT_NAME']));

 

add this:

 

  if($file == "category" ||
$file == "product" ||
$file == "search" ||
$file == "cms" ||
$file == "index") {
$file = $_SERVER["REQUEST_URI"];
  }

Edited by Radium (see edit history)
  • Like 9
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 4 weeks later...
  • 3 weeks later...

Just implemented this fix curious to See the results. Right now google IS tracking visits but Interestingly under Pages it shows all traffic under /order/step0.html. Only under Page Titles it then shows the products and cms pages visited. Hope that this will fix it. When should I see First results? After one day?

Phil

Edited by Pippo3000 (see edit history)
Link to comment
Share on other sites

  • 1 month later...

We spent days trying to track this one out. COD was not getting tracked in google analytics while the orders from payment gateway always was.

It always showed as /order/step0.html

 

So the funnel would get messed up no matter what we did.

 

The real issue was the friendly url and the htaccess that got generated from it. For the Order Confirmation page in the SEO/URL naturally we used the friendly url as orderconfirmation. Since htaccess file has order with a rewrite all urls starting with order would default to /order/step0.html

You will notice it will show step0 even if you go to order-history page, order-slip or anything starting with an order.

 

So the solution is to change all the friendly url's starting with an order to something unique. Also regenerate the htaccess file.

 

We hope many of u will not go through the same pains.

 

Cheers

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Hi,

 

We are having the same problem, using PS 1.4.4.1. and GA 1.3, and I cannot find the code in ganalytics.php mention by Radium. I suppose that solution is for the newer version of GA in PS. Could you please help me solve the issue for the 1.3 version of GA? I thought of uploading the newer version of GA from a newer version of PS, but I'm worried that it won't be compatible.

 

Thanks.

Link to comment
Share on other sites

  • 2 months later...

I can also indeed confirm Radiums (#3) soloution works perfect! Many thanks!

 

However please beware: The code change will only effect future data. So if you like me have data span in GA set to 1 month, it might be difficult to see the effect initially since the new/correct data will be last in the list and sometimes not even visible on the first page.

 

This is of cause only a temporary issue that will disappear over time.

Edited by MacMaster (see edit history)
Link to comment
Share on other sites

Hi thanks for this

 

i find this part in modules/ganalytics/header.tpl:

 

{if isset($pageTrack)}_gaq.push(['_trackPageview', '{$pageTrack}']);

 

i changed this line to:

{if isset($pageTrack)}_gaq.push(['_trackPageview', '{$meta_title}']);

 

I assume below that

 

'The Product name - Your website's name' and 'The Category name - Your website's name' are alternatives for '{$meta_title}'

 

Works fine!

_gaq.push(['_trackPageview', 'The Product name - Your website's name']);

_gaq.push(['_trackPageview', 'The Category name - Your website's name']);

Edited by markjl (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

This is great thanks @radium

But anybody knows how to track the add to cart button in google analytics

i googled it many times and the solutions are only for others ecommerce platform not for our prestashop.

I did tried to edit some codes but i messed them.

So please does anyone know how to track them in google analytics ?

Link to comment
Share on other sites

Hey what does this edited code in Google analytics do that is provided by radium

. I mean does track any special things that helps to understand the conversion rate or something like that. Please tell

Link to comment
Share on other sites

But i can see the exact URL of the pages visited in GA without editing any codes in GA module,

You can get it under traffic sources and put the secondary or primary dimension to Landing page and there you can get the reports for the urls.....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...