Google Analytics plugin problem

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #104815

Hello,

We have the latest Hikashop version, 2.1.3, and we experience some strange behavior with the Google Analytics plugin. In some cases the plugin doesn't get triggered. In fact it shows only a few transaction, like 10 percent maybe. What can cause this? This is the screenshot with the plugin configuration :



This is what we have in analytics:


And this is for the the sales on 14.05.2013.


As you can see there are around 13 transactions on 14.05, however in the analytics there is only one. Unfortunately, the Hikashop report for sales doesn't work either, shows way to much for the income. So right now we don't have a simple solution for monitoring our sales statistics.

Thanks!

Attachments:
Last edit: 11 years 6 months ago by otx.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 6 months ago #105016

Hi,

The sale will only be taken into account when the user goes back to your store after finishing paying on the payment gateway.
If you're using PayPal as payment gateway, it doesn't redirect back the user to your store automatically at the end of the process by default.
You need to activate that setting in your PayPal account if you want to have all the sales sent to Analytics.

HikaShop sales reports are working fine on our end. Do you have a recent version of HikaShop ? There were some bugs with the calculations before. Or maybe you didn't configure the report properly ? We would need more information to help you here...

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #105021

Hi,

The user stays on our page through the whole checkout process. As payment methods we have only cash on delivery, so the users never leaves our store.

I will check the sales reports for the Hikashop 2.1.3, the previous versions had problems with this and I didn't saw this mentioned as fixed in the changelog. I will come back with the result.

If you need any further information regarding the analytics plugin I'm here to assist you, it would be really useful to have this working.

Regards,
Dezso Markon
vitaking.ro

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 6 months ago #105077

Hi,

Note that the Google Analytics plugin will send the data when the order is confirmed.
If you use the cash on delivery plugin, it's possible that this doesn't happen based on how the plugin and HikaShop is configured, and thus the GA plugin wouldn't send the data to GA.
For example, if the status at the end of the checkout is "created" and that you changed it to "shipped" directly, the order will never be confirmed and thus no data will be sent.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #105096

Hi,

Thank you for this information. Maybe this is the reason for this behavior. Although it is still strange that sometimes is working as expected.
This is a Romanian store, so we have changed the order statuses in Romanian. We needed to, because this appears in the confirmation mails and we don't want to have English in it. So maybe we have to change something in the plugin also, but I can't find this parameter in the settings. As you can see in the screenshot, we have 'confirmat' for the English 'confirmed'. So this should be the confirmation status which need to be processed by the analytics plugin. Can you please help me with this?



Regards,
Dezso Markon
vitaking.ro

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 6 months ago #105125

It's probably the problem.
You probably didn't set the option "Payment confirmed order status" option of the configuration with the status you're using for the orders when you ship them.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #105131

Hi,

It seems that is not the problem. We have this in configuration:


The status of a new transaction by default is 'in derulare'. After this we always confirm our new transactions with 'confirmat', and when the goods are sent from our company we set to 'expediat', which means shipped. This sequence is an internal policy and it is always respected (to be sure I just checked this with our sales department).

Regards,
Dezso Markon
vitaking.ro

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #105221

Hi,

How have you changed the statuses name ?
In the translation file ?

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #105254

Hi,

I couldn't find in the language file, nor in the configuration, so I have changed directly in the mysql database, in the hikashop_config table. Unfortunately I didn't check if the analytics plugin takes the status from the database or the string is hard-coded. Maybe you know the answer and some possible fix for this?

Regards,
Dezso Markon
vitaking.ro

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #105273

Hi,

I think that the problem is due to the change made in database. The plugin, and all the other things are based on the name in the database, so changing it here can broke many things.
Thanks to revert back the default values, and if you have Falang or Joomfish installed, you can go in HikaShop > System > Order status and change the statuses here by clicking on the flags.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #105287

Hi,

I really don't want to install yet another component just for translating a couple of strings. I don't want to get involved in a multilingual site. And even if I choose to install one of them, I'm not sure I will be able to translate the Hikashop order statuses, if they are hard coded. This should be something basic - to send the correct order statuses to your customers in their native language. Kind of hard to believe that there isn't a simple solution for this. Am I missing something? I think this should be accessible through the language files, or at least through the email templates. No way to achieve this?

EDIT

I just checked the plugin and it is not hard-coded. This is the function which reads the status from the database:

function onAfterOrderUpdate(&$order){
		$config=&hikashop_config();
		$confirmed = $config->get('order_confirmed_status');
		if(!isset($order->order_status)) return true;
		if($order->order_status!=$confirmed){
			return true;
		}
		$app = JFactory::getApplication();
		$app->setUserState(HIKASHOP_COMPONENT.'.display_ga',1);
		$app->setUserState(HIKASHOP_COMPONENT.'.order_id',$order->order_id);
		$app->setUserState(HIKASHOP_COMPONENT.'.error_display_ga',0);
		return true;
	}

Furthermore, I just find out that the statuses can be edited in the administration backend (you have to check and click edit, a simple click on it won't do it), so there is no need to edit the table in the database. So at this point it seems to me that the problem is laying somewhere else.

Regards,
Dezso Markon
vitaking.ro

Last edit: 11 years 6 months ago by otx.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 6 months ago #105445

Hi,

About order translations, I made some improvements in HikaMarket in order to have a easier translation system just the order statuses.
It would be possible to translate them thanks to the classical language file. My patch should be integrated in HikaShop soon, but it requires to edit a lot of views so we will need some time to check it all.
But with this patch, it will be easier for you to translate the order statuses without modifying them in the database.

I see that your orders are "shipped" but the plugin works only with the "confirmed" status. How does the orders are confirmed ?
Which payment system are you using ? The customer are to return back in your website and see the order confirmed in order to call the google analytics.
Depending the payment system, the order can be confirmed by another "instance" than the customer. In some case, the customer could not see the "order confirmed transition", so the google analytics plugin will not display the tracker on this page (which will not be displayed).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #105451

Hi,

Through the checkout process the customers doesn't get returned to our site. We are using single page checkout, so they simply fill in their address, choose their shipment and payment preferences and that's it. As payment method we have only cash on delivery, so they doesn't need to leave and then return to our page. The sales department receives the orders, and if it is a valid order they change the status to "confirmed" from the admin back-end. When the goods leaves our company we set the status to "shipped". In this way the user know that we are taken care of his order. I think this is something normal, in fact this is the reason we have order statuses.

The reason we have changed the text is simply because they appear in mails which are sent to the customers when a status change occurs, and we want everything in Romanian. It's kind of unprofessional to have mixed languages in the mails. The text can be changed through the administration back-end, so in fact there is no reason for a translation system (in my prior post it was a misunderstand from my part, it wasn't changed in the database, but in the admin back-end). I have checked the plugin and it reads the status from the database, so theoretically this could be in any language, doesn't really matters. Obviously something is wrong because the plugin gets triggered only in some rare cases. If you need access to the admin back-end to check the settings, I can grant you.

Regards,
Dezso Markon
vitaking.ro

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 6 months ago #105484

Hi,

I don't think the problem comes from the plugin.

As I explain you just before, Analytics is something triggers by the customer, but the user itself.
It uses some javascript to do it.

When and order is confirmed, the plugin will add his javascript to the rendering page but.
In some various cases like: some backend views or some payment plugin with notifications ; the orders are confirmed without printing any page.
Any user will see a complete page so the javascript won't be display or won't be executed by someone.

In these cases, the code is not called, Analytics is not triggers and you won't have any statistics.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 53
  • Thank you received: 2
11 years 6 months ago #105501

Hi,

I'm so sorry but I don't understand your second sentence. I think would be easier from both of us if you or someone else from the Hikashop team would write a nice howto on how to use this plugin in order to:

1. The customers gets the notification emails in their native languages about the statuses of their orders
2. The owner of the shop has every sales and product statistics available in Google Analytics.

If the problem doesn't come from the plugin then please provide some useful information about what we need to do or change in order to have the statistics in analytics. Thank you for your help!

Regards,
Dezso Markon
vitaking.ro

Last edit: 11 years 6 months ago by otx.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 6 months ago #105957

Hi,

1. There is nothing to do for that. The statuses automatically use the translation files of HikaShop and will display in the language of the user provided that the statuses are translated in your language, like for any other text of the interface of HikaShop. Of course, you need to keep the default ones for that.

2. There is nothing to do, that should already be the case. And it seems to be already working for some orders so I don't see why it wouldn't work for others... Maybe you have a javascript error on the pages ? Or GA refuse some of the order data because you changed something somewhere in HikaShop which mess with the standard data expected by GA (for example, if you changed all the codes and names of your zones, GA won't be able to recognize the data that HikaShop sends it).

The best to find out will be to get the debug info of the google analytics plugin.
If you turn on the debug mode of the GA plugin, it will use that method to be able to see what's going on during the confirmation:
developers.google.com/analytics/resource...ubleshooting#gaDebug
So if you have that option turned on in the plugin and the plugin published and the firebug console of firefox opened while you confirm the order status of an order in the backend, you will see the debug information printed in the console and potential errors. Here is an example of the debug data that you will get in firebug:
www.hikashop.com/media/kunena/attachment...ytics_back-end_2.jpg
That will allow us to understand what's going on.

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum