Jump to content

Google Analytics Module Doesn't Track Paypal Transaction


Recommended Posts

Hi,

I have a newest PS 1.5.3.1, up to date PayPal and ganalytics module. Google Analytics can track offline credit card payment transaction but it doesn't track the sales made with PayPal. I am using one page checkout. How I can fix this? Thanks

 

--

 

Forgot to mention that I am not talking about the GOALS but E-Commerce Conversions

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

Thank you for the message,

No, the final landing page for PayPal is something like /module/paypal/submit?key=xxxxxxxx&id_order=xx

 

I set this (/module/paypal/submit?key=) as a goal in analytics and it's working fine. I bet I supposed to set this for ecommerce tracking but there is no option in Google Analytics module for prestashop. I think I should edit some TPL file in paypal module but I don't know where to get the ecommerce conversion code and which file to update

Link to comment
Share on other sites

You are patching instead of solving.

 

All payment modules should lead to the order confirmation page when the order is complete.

It would be better to figure out why paypal is not redirecting to the confirmation page.

Link to comment
Share on other sites

PayPal module (the one that comes with PS1.5) has its own order-confirmation.tpl that is redirecting to something like /module/paypal/submit?key=xxxxxxxx&id_order=xx instead of /index.php?controller=order-confirmation (like for example your offline credit card module does)

 

I went into paypal/views/templates/front/order-confirmation.tpl and I put the Google Analytics code in this file. Will see if that helps

Link to comment
Share on other sites

hmm, I have not tried it myself, I do find it odd though, and not sure if it is correct.

 

Every payment module has it's own order-confirmation.tpl file, which is being loaded in a hook in the main order confirmation page.

Link to comment
Share on other sites

I went into paypal/views/templates/front/order-confirmation.tpl and I put the Google Analytics code in this file. Will see if that helps

 

Doesn't work... this is weird. Anyone has actually working PayPal module with Google Analytics E-commerce tracking?

  • Like 1
Link to comment
Share on other sites

hmm, I have not tried it myself, I do find it odd though, and not sure if it is correct.

 

Every payment module has it's own order-confirmation.tpl file, which is being loaded in a hook in the main order confirmation page.

 

How much you would charge to fix it or just create proper redirection?

Link to comment
Share on other sites

I'm also studying the possibilities of the ecommerce conversions.

 

I use PS 1.5.3.1 with paypal, ogone, ideal and some others. Without doing any changes I noticed in google analytics that I have e-commerce overview, product performance, sales performance, transactions, days before transaction. I might not have all the english terms as I'm translating it.

 

@charlie123, I'm not yet up to the level of knowledge you have, however if I check some seperate orders based on the order number in prestashop which I put in the search screen whithin ecommerce->transactions then I see properly the paypal orders (I checked only some).

 

I see that I'm using paypal module version :3.4.5 which was the default. I also see that 3.4.6 is available on PrestaShop Addons.

 

When a user is NOT refered back to the webshop, but moves to another website WITHIN paypal then the order in prestashop will nicely be set to paid (as paypal will send a server-to-server request to prestashop) BUT then no browser javascript will be executed and analytics will not get notified about the order.

 

I wonder if google analytics would accept also server-to-server requests for e-commerce conversion as then it will ensure better quality of (ordering) data.

 

Anyway, let me know if you think I can check more for you?

Link to comment
Share on other sites

to fix this edit file /modules/ganalytics/ganalytics.php

 

and update the function hookHeader to:

 $defaultMetaOrder = Meta::getMetaByPage('order',$this->context->language->id);
 if (strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.'order.php') === 0 || strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.$multilang.$defaultMetaOrder['url_rewrite']) === 0)
 {
  $this->context->smarty->assign('pageTrack', '/order/step'.(int)Tools::getValue('step').'.html');
 }
 else if(stripos($_SERVER['REQUEST_URI'], '/module/paypal/submit') === 0)
 {
  $this->context->smarty->assign('pageTrack', '/order-confirmation.php');
 }

 

I updated function strpos to stripos and now useing the === operator to test

if(strpos($_SERVER['REQUEST_URI'], '/module/paypal/submit'))

Edited by HA!*!*Y (see edit history)
  • Like 1
Link to comment
Share on other sites

to fix this edit file /modules/ganalytics/ganalytics.php

 

and update the function hookHeader to:

 $defaultMetaOrder = Meta::getMetaByPage('order',$this->context->language->id);
 if (strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.'order.php') === 0 || strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.$multilang.$defaultMetaOrder['url_rewrite']) === 0)
 {
  $this->context->smarty->assign('pageTrack', '/order/step'.(int)Tools::getValue('step').'.html');
 }
 else if(stripos($_SERVER['REQUEST_URI'], '/module/paypal/submit') === 0)
 {
  $this->context->smarty->assign('pageTrack', '/order-confirmation.php');
 }

 

I updated function strpos to stripos and now useing the === operator to test

if(strpos($_SERVER['REQUEST_URI'], '/module/paypal/submit'))

 

Hi Ha!*!*Y thanks for the reply,

 

I thought your code modification will work but it doesn't for some reason. Let me explain in steps:

 

1. This is how my function hookHeader looks at the moment:

 

function hookHeader($params)
{
 if ((method_exists('Language', 'isMultiLanguageActivated') && Language::isMultiLanguageActivated())
  || Language::countActiveLanguages() > 1)
  $multilang = (string)Tools::getValue('isolang').'/';
 else
  $multilang = '';
 $defaultMetaOrder = Meta::getMetaByPage('order',$this->context->language->id);
 if (strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.'order.php') === 0 || strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.$multilang.$defaultMetaOrder['url_rewrite']) === 0)
 {
 $this->context->smarty->assign('pageTrack', '/order/step'.(int)Tools::getValue('step').'.html');
 }
 else if(stripos($_SERVER['REQUEST_URI'], '/module/paypal/submit') === 0)
 {
 $this->context->smarty->assign('pageTrack', '/order-confirmation.php');
 }
 $this->context->smarty->assign('ganalytics_id', Configuration::get('GANALYTICS_ID'));
 $this->context->smarty->assign('isOrder', false);
 return $this->display(__FILE__, 'header.tpl');
}

 

2. Before this modification, I was not able to track ECOMMERCE CONVERSION, only the custom goals which were set like this: http://scr.hu/0gkm/3ax9d

 

As you can see the funnel works like -> one page checkout -> order placed with paypal and the goal link something like /module/paypal/submit?key=xxxxxxxx&id_order=xx

 

3. However, after your code modification, the funnel looks like that now: http://scr.hu/0gkm/e8lw1

 

After checkout and paypal payment the funnel redirects to /order-confirmation.php and this should track the ECOMMERCE CONVERSION but it doesn't...

 

This is how ecommerce conversion looks like: http://scr.hu/0gkm/kp2mh

This is ecommerce conversion when using different payment method (offlinecreditcard module) - http://scr.hu/0gkm/knkqr

 

I wondering if I should change the code and instead of /order-confirmation.php I can put /index.php?controller=order-confirmation as this works for that different payment module? (but I can't see the difference as /order-confirmation.php redirecting to the same page as /index.php?controller=order-confirmation....)

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

Do you have the goal URL as /order-confirmation.php

 

Goal URL: /order-confirmation.php

Step 1: /order/step0.html

Step 2: /authentication

Step 3: /order/step1.html

Step 4: /order/step2.html

Step 5: /order/step3.html

  • Like 1
Link to comment
Share on other sites

No, I am using one page checkout so the step 1 is /quick-order step 2 is /card-authertication (if paid by card) and /order-confirmation as the goal URL (but I haven't had a chance to test the order-confirmation goal URL yet since the latest change)

 

However, the Goal Conversion is not an issue, the Ecommerce Conversion tracking is what I am worrying about.

 

In this case the question is, do I need to set the Goals correctly in order to track the transactions in Ecommerce conversion section?

 

Thanks HA!*!*Y!

Link to comment
Share on other sites

Do you have Ecommerce tracking Enabled "Yes, an Ecommerce Site"

 

To Enable Ecommerce tracking (http://support.google.com/analytics/answer/1009612?hl=en)

1. Click Admin at the top of any screen in Analytics.

2. Use the menu in the Profile column to select the profile you want.

3. Click Profile Settings.

4. Under the E-Commerce Settings section, select Yes, an E-Commerce Site/App.

5. Click Apply.

 

 else if(stripos($_SERVER['REQUEST_URI'], '/module/paypal/submit') === 0)
 {
 $this->context->smarty->assign('pageTrack', '/order-confirmation.php');
 }

 

this code masks the url so google analytics sees page /module/paypal/submit?key=xxxxxxxx&id_order=xx as /order-confirmation.php nothing more.

 

If you need to you can update the url: /order-confirmation.php to /order-confirmation

Link to comment
Share on other sites

I have the E-Commerce tracking section enabled, as I can track the transaction from other gateways like offlinecredit card easily. However the PayPal one still doesn't work.

 

For example I had 2 sales on 12/04, one with paypal and one with offlinecredit card. The creditcard was tracked as goal and ecommerce conversion, but the paypal one was only tracked as goal without ecommerce conversion. (complection URL for offlinecredit card is tracked as /index.php?controller=order-confirmation?key=xxxxxxxx...... and the paypal one was set to order-confirmation.php (and as for PayPal, only goal was tracked, not the ecommerce conversion)

 

I don't understand why it doesn't work... :(

Link to comment
Share on other sites

see post http://www.prestashop.com/forums/index.php?/topic/230492-google-analytics-module-doesnt-track-paypal-transaction/page__view__findpost__p__1179238

 

than update your Goal's (even if you are on a one-page check out [its working for me]).

 

Goal URL: /order-confirmation.php

Step 1: /order/step0.html

Step 2: /authentication

Step 3: /order/step1.html

Step 4: /order/step2.html

Step 5: /order/step3.html

Link to comment
Share on other sites

  • 6 months later...

To get this working for a customer of mine.  I did the following:

1. edit modules/ganalytics/ganalytics.php

in function hookHeader($params) at around line 171 (i.e. after the if (strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.'order.php') === 0 bit of code)

else if(stripos($_SERVER['REQUEST_URI'], '/module/paypal/submit') === 0)
{
    $this->context->smarty->assign('pageTrack', '/order-confirmation.php');
    $this->context->smarty->assign('pageTitle', 'Paypal Payment Confirmation');
    $this->hookOrderConfirmation($params);
    return;
}

This is looking for the paypal return URL, and if it sees it just calls the hookOrderConfirmation method, which has to be adjusted as below.

Then in function hookOrderConfirmation($params) near the top of that function i have:

$order = @$params['objOrder'];
        
if($order === "undefined")
{
    $id_order     = $_GET['id_order'];
    $order        = new Order((int)$id_order);
}

This is because $params[objOrder] will not exists on a return from paypal, so we have get the order manually (from the order ID in paypals return URL)
       
This was enough to populate the smarty template correctly i.e. header.tpl .

My customer wanted to use the new analytics method (analytics.js and ecommerce.js) so I created and edited a new header.tpl under:

/themes/{your theme}/modules/ganalytics/header.tpl

Which (for my customer) looks like:
N.B.  Change the qa cookie domain to suit your site!

ga('create', '{$ganalytics_id}', 'shopapps.co.uk'); <-- change this

/themes/{your theme}/modules/ganalytics/header.tpl


<script type="text/javascript">
/*
 * NEW GA CODE
*/
{literal}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
{/literal}

  ga('create', '{$ganalytics_id}', 'milesstronger.co.uk');  // change the cookie domain to your own...
 
  {if isset($pageTrack)}
      ga('send', 'pageview', {
           'page':     '{$pageTrack}'
          {if isset($pageTitle)},'title':     '{$pageTitle}'{/if}
    });
  {else}
    ga('send', 'pageview');
  {/if}
 

 

{if $isOrder eq true}        {* If it's an order we need more data for stats *}

  ga('require', 'ecommerce', 'ecommerce.js');
  ga('ecommerce:addTransaction',
          {   
             'id'           : '{$trans.id}',        {* order ID - required          *}
            ,'affiliation'  : '{$trans.store}',     {* affiliation or store name    *}
            ,'revenue'      : '{$trans.total}',     {* total - required             *}
            ,'tax'          : '{$trans.tax}',       {* tax                          *}
            ,'shipping'     : '{$trans.shipping}',  {* shipping                     *}
            ,'city'         : '{$trans.city}',      {* city                         *}
            ,'state'        : '{$trans.state}',     {* state or province            *}
            ,'country'      : '{$trans.country}'    {* country                      *}
        }
  );

    {foreach from=$items item=item}
        qa('ecommerce:addItem',
        {
             'id'           : '{$item.OrderId}'    {* order ID - required      *}
            ,'sku'          : '{$item.SKU}'        {* SKU/code - required      *}
            ,'name'         : '{$item.Product}'    {* product name             *}
            ,'category'     : '{$item.Category}'   {* category or variation    *}
            ,'price'        : '{$item.Price}'      {* unit price - required    *}
            ,'quantity'     : '{$item.Quantity}'   {* quantity - required      *}
        }
        );
    {/foreach}
    {* submits transaction to the Analytics servers *}
    {literal}
      ga('ecommerce:send');    
    {/literal}
{/if}


{literal}


/*
 * OLD GOOGLE ANALYTICS
*/

var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{$ganalytics_id}']);
// Recommanded value by Google doc and has to before the trackPageView
_gaq.push(['_setSiteSpeedSampleRate', 5]);

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

{if $isOrder eq true}        {* If it's an order we need more data for stats *}
  _gaq.push(['_addTrans',
    '{$trans.id}',            {* order ID - required            *}
    '{$trans.store}',        {* affiliation or store name    *}
    '{$trans.total}',        {* total - required                *}
    '{$trans.tax}',            {* tax                            *}
    '{$trans.shipping}',    {* shipping                        *}
    '{$trans.city}',        {* city                            *}
    '{$trans.state}',        {* state or province            *}
    '{$trans.country}'        {* country                        *}
  ]);

    {foreach from=$items item=item}
        _gaq.push(['_addItem',
        '{$item.OrderId}',        {* order ID - required        *}
        '{$item.SKU}',            {* SKU/code - required        *}
        '{$item.Product}',        {* product name                *}
        '{$item.Category}',        {* category or variation    *}
        '{$item.Price}',        {* unit price - required    *}
        '{$item.Quantity}'        {* quantity - required        *}
        ]);
    {/foreach}
    {* submits transaction to the Analytics servers *}
{literal}
  _gaq.push(['_trackTrans']);    
{/literal}
{/if}
{literal}
(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})(); {/literal}
</script>
Edited by shopapps (see edit history)
Link to comment
Share on other sites

  • 2 months later...

Hi,

 

From memory i think we discovered a clash using old and new google analytics at the same time, so customers new file looks like this:

 

 

    themes/{your theme}/modules/ganalytics/header.tpl 

 


<script type="text/javascript">
{literal}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
{/literal}
  ga('create', '{$ganalytics_id}', 'milesstronger.co.uk');  // put your domain here (not milesstronger.co.uk)
  
  {if isset($pageTrack)}
  	ga('send', 'pageview', {
	  	 'page': 	'{$pageTrack}'
	  	{if isset($pageTitle)},'title': 	'{$pageTitle}'{/if}
	});
  {else}
	ga('send', 'pageview');
  {/if}
  

var isOrderB = "{$isOrder}";

{if $isOrder eq true}		{* If it's an order we need more data for stats *}
 var isOrder = 1;
  ga('require', 'ecommerce', 'ecommerce.js');
  ga('ecommerce:addTransaction', 
  		{   
		    'id'		: '{$trans.id}',	{* order ID - required		*}
		    'affiliation' 	: '{$trans.store}',	{* affiliation or store name	*}
		    'revenue'		: '{$trans.total}',	{* total - required		*}
		    'tax'		: '{$trans.tax}',	{* tax				*}
		    'shipping'		: '{$trans.shipping}',	{* shipping			*}
		    'city'		: '{$trans.city}',	{* city				*}
		    'state'		: '{$trans.state}',	{* state or province		*}
		    'country'		: '{$trans.country}'	{* country			*}
    	}
  );

	{foreach from=$items item=item}
		qa('ecommerce:addItem', 
		{
			'id'			: '{$item.OrderId}',	{* order ID - required	*}
			'sku'			: '{$item.SKU}',	{* SKU/code - required	*}
			'name'			: '{$item.Product}',	{* product name		*}
			'category'		: '{$item.Category}',	{* category or variation*}
			'price'			: '{$item.Price}',	{* unit price - required*}
			'quantity'		: '{$item.Quantity}'	{* quantity - required	*}
		}
		);
	{/foreach}
	{* submits transaction to the Analytics servers *}
	{literal}
	  ga('ecommerce:send');	
	{/literal}
{/if}

</script>

and then i had to tweak modules/ganalytics/ganalytics.php

 

edit the hookHeader function to allow the returning paypal page to be correctly detected:

function hookHeader($params)
	{
		if ((method_exists('Language', 'isMultiLanguageActivated') && Language::isMultiLanguageActivated())
			|| Language::countActiveLanguages() > 1)
			$multilang = (string)Tools::getValue('isolang').'/';
		else
			$multilang = '';

		//syslog(LOG_WARNING, "URI:".$_SERVER['REQUEST_URI']);
		//syslog(LOG_WARNING, "POS:".stripos($_SERVER['REQUEST_URI'], "/authentication"));
		
		$defaultMetaOrder = Meta::getMetaByPage('order',$this->context->language->id);
		if(stripos($_SERVER['REQUEST_URI'], "/authentication") === 0 )
		{
			$this->context->smarty->assign('pageTrack', '/authentication.php');
			$this->context->smarty->assign('pageTitle', $defaultMetaOrder['title']." Step Authentication"); //'Authentication'
		}
		else if (strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.'order.php') === 0 || strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.$multilang.$defaultMetaOrder['url_rewrite']) === 0)
		{
			$this->context->smarty->assign('pageTrack', '/order/step'.(int)Tools::getValue('step').'.html');
			$this->context->smarty->assign('pageTitle', $defaultMetaOrder['title']." Step ".(int)Tools::getValue('step'));
		}
		else if(stripos($_SERVER['REQUEST_URI'], '/module/paypal/submit') === 0)
		{
			$this->context->smarty->assign('pageTrack', '/order-confirmation.php');
			$this->context->smarty->assign('pageTitle', 'Paypal Payment Confirmation');
			$this->hookOrderConfirmation($params);
			return;
		}
		$this->context->smarty->assign('ganalytics_id', Configuration::get('GANALYTICS_ID'));
		$this->context->smarty->assign('isOrder', false);

		

				
				
		return $this->display(__FILE__, 'header.tpl');
	}

and i think that was it... :D

  • Like 2
Link to comment
Share on other sites

 

,'revenue' : '{$trans.total}', {* total - required *}

 

Thank's a lot for this tips!!

 

My analytics track works fine, but in that line i had "total" instead of "revenue" and so all the order was 0 Euro.

 

Now works perfect!!

Thank's!

Link to comment
Share on other sites

  • 1 year later...

Hi,

 

From memory i think we discovered a clash using old and new google analytics at the same time, so customers new file looks like this:

 

 

    themes/{your theme}/modules/ganalytics/header.tpl 

 

<script type="text/javascript">
{literal}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
{/literal}
  ga('create', '{$ganalytics_id}', 'milesstronger.co.uk');  // put your domain here (not milesstronger.co.uk)
  
  {if isset($pageTrack)}
  	ga('send', 'pageview', {
	  	 'page': 	'{$pageTrack}'
	  	{if isset($pageTitle)},'title': 	'{$pageTitle}'{/if}
	});
  {else}
	ga('send', 'pageview');
  {/if}
  

var isOrderB = "{$isOrder}";

{if $isOrder eq true}		{* If it's an order we need more data for stats *}
 var isOrder = 1;
  ga('require', 'ecommerce', 'ecommerce.js');
  ga('ecommerce:addTransaction', 
  		{   
		    'id'		: '{$trans.id}',	{* order ID - required		*}
		    'affiliation' 	: '{$trans.store}',	{* affiliation or store name	*}
		    'revenue'		: '{$trans.total}',	{* total - required		*}
		    'tax'		: '{$trans.tax}',	{* tax				*}
		    'shipping'		: '{$trans.shipping}',	{* shipping			*}
		    'city'		: '{$trans.city}',	{* city				*}
		    'state'		: '{$trans.state}',	{* state or province		*}
		    'country'		: '{$trans.country}'	{* country			*}
    	}
  );

	{foreach from=$items item=item}
		qa('ecommerce:addItem', 
		{
			'id'			: '{$item.OrderId}',	{* order ID - required	*}
			'sku'			: '{$item.SKU}',	{* SKU/code - required	*}
			'name'			: '{$item.Product}',	{* product name		*}
			'category'		: '{$item.Category}',	{* category or variation*}
			'price'			: '{$item.Price}',	{* unit price - required*}
			'quantity'		: '{$item.Quantity}'	{* quantity - required	*}
		}
		);
	{/foreach}
	{* submits transaction to the Analytics servers *}
	{literal}
	  ga('ecommerce:send');	
	{/literal}
{/if}

</script>

and then i had to tweak modules/ganalytics/ganalytics.php

 

edit the hookHeader function to allow the returning paypal page to be correctly detected:

function hookHeader($params)
	{
		if ((method_exists('Language', 'isMultiLanguageActivated') && Language::isMultiLanguageActivated())
			|| Language::countActiveLanguages() > 1)
			$multilang = (string)Tools::getValue('isolang').'/';
		else
			$multilang = '';

		//syslog(LOG_WARNING, "URI:".$_SERVER['REQUEST_URI']);
		//syslog(LOG_WARNING, "POS:".stripos($_SERVER['REQUEST_URI'], "/authentication"));
		
		$defaultMetaOrder = Meta::getMetaByPage('order',$this->context->language->id);
		if(stripos($_SERVER['REQUEST_URI'], "/authentication") === 0 )
		{
			$this->context->smarty->assign('pageTrack', '/authentication.php');
			$this->context->smarty->assign('pageTitle', $defaultMetaOrder['title']." Step Authentication"); //'Authentication'
		}
		else if (strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.'order.php') === 0 || strpos($_SERVER['REQUEST_URI'], __PS_BASE_URI__.$multilang.$defaultMetaOrder['url_rewrite']) === 0)
		{
			$this->context->smarty->assign('pageTrack', '/order/step'.(int)Tools::getValue('step').'.html');
			$this->context->smarty->assign('pageTitle', $defaultMetaOrder['title']." Step ".(int)Tools::getValue('step'));
		}
		else if(stripos($_SERVER['REQUEST_URI'], '/module/paypal/submit') === 0)
		{
			$this->context->smarty->assign('pageTrack', '/order-confirmation.php');
			$this->context->smarty->assign('pageTitle', 'Paypal Payment Confirmation');
			$this->hookOrderConfirmation($params);
			return;
		}
		$this->context->smarty->assign('ganalytics_id', Configuration::get('GANALYTICS_ID'));
		$this->context->smarty->assign('isOrder', false);

		

				
				
		return $this->display(__FILE__, 'header.tpl');
	}

and i think that was it... :D

 

Hi,

 

Can I use this fix also for PS 1.6.9 and Ganalitycs  2.1.1 ?

 

Because in the Google Analytics the orders are not tracking. The only payment method is Paypal.

 

Thanks

Angela

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

Hi,

 

I have the same problem. For my shop (built with Prestashop 1.5.6.2), Google analytics tracks orders made by any way of payment apart from order made with Paypal payments.

 

Has anyone got any solution with the latest version of Google analytics modules, ie Version 2.3.4 ?

The module is here

 

Thank you for any help.

 

Patrick

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

  • 1 year later...

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...