Google Ecommerce not tracking where customers have come

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 1 month ago #280430

Hi,

Yes, it's in the latest build so simply redownload and reinstall and that will be it.
Otherwise, you can also copy the file plugins/system/hikashopanalytics/hikashopanalytics.php where I made the modification.

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

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
7 years 1 month ago #280545

Thanks.

I've got it going on all our sites now and seems to be working fine.

Only item I've noticed is on one order that was paid via PayPal I got a Source/Medium of "paypal.com / referral".

So far only one order that has paid via PayPal that has done that so may be a fluke.

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

  • Posts: 234
  • Thank you received: 4
6 years 7 months ago #291239

Hello

Could you please pass on the corrected code used for this fix? I am currently using HikaShop Business 3.2.1 and only using the Add to Cart legacy and all other options are NOT using the legacy. The date of my hikashopanalytics.php file is 13/12/2017.

Thanks
Iain

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #291251

Hi,

Download the latest version of the HikaShop install package on our website.
Then, you'll find that file in back/extensions/plg_system/hikashopanalytics/
You can just copy it to the plugin folder plugins/system/hikashopanalytics/ in order to get the file with all the patches we made since then.

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

  • Posts: 234
  • Thank you received: 4
6 years 7 months ago #291306

Hello,

I have the latest version and I can not download it from the website, it wants me to buy a new version.

Cheers
Iain

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 7 months ago #291311

Hi,

I've checked your account but your subscription is valid and thus there is no reason you can't access the download. Go in the menu My account>My subscriptions on our website once logged and you'll have the download link for the Business edition there.
If you don't, please send a screenshot of the page.

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

  • Posts: 234
  • Thank you received: 4
6 years 6 months ago #292167

Hi

I have downloaded it and left it to see about the tracking and still no joy. It says every visitor is coming from Direct.

Any thoughts?

Cheers
iain

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

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

Hi,

I've looked again, and I saw that on top of updating the plugin php file, you also have to update the file components/com_hikashop/views/checkout/tmpl/step.php with the one from front/views/checkout/tmpl/step.php
but that's only useful with the old checkout of HikaShop and you said that you're not using the legacy checkout.
So I don't see why that wouldn't help, unless the issue you have is not the same as the issue @jazzmang had.

Normally, with the new GA plugin file, you should have the script below added to the HTML of each of the checkout pages:

<script type="text/javascript">
window.hikashop.ready(function(){
	if(!ga || typeof(ga) != "function")
		return;
	ga(function(tracker){
		var clientId = tracker.get("clientId"),
			elem = document.getElementById("hikashop_checkout_analytics_field_ga");
		if(elem) elem.value = clientId;
	});
});
</script>
do you see it ?

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

  • Posts: 234
  • Thank you received: 4
6 years 6 months ago #292219

Hi

This is for the website Craven-equipment.co.uk which is not using the legacy module.

I have checked ...onents/com_hikashop/views/checkout/tmpl/end.php
and ...nents/com_hikashop/views/checkout/tmpl/cart.php and neither have the code you listed.

Cheers
Iain

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

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

Hi,

It's normal that you don't find the code in these files.
As I said, you need to look for that code in the HTML of the pages of your checkout.
I've done it for you and the code is there:
monosnap.com/file/NPtMGsBpvddjLUh7ZebAJo6XkCVNB5
Also, you can check the column order_payment_params of the table hikashop_order via your phpmyadmin. There, you should find the analytics_ga parameter with the client_id for your orders which is used by the Google Analytics plugin to identify the client during direct calls.
All of this means that your correctly got the patch for that capability and so GA should have the client_id send to them.
So if you still have an issue with Ga, it's probably different from the issue that was talked about on this thread.

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

  • Posts: 234
  • Thank you received: 4
6 years 6 months ago #292275

HI Guys

Thanks, the main issue is that all of my transactions are listed as being "Direct / None" as being the source and I know this not to be true.

Thoughts
Iain

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

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

Hi,

This would indicate that the data source is not specified:
developers.google.com/analytics/devguide...otocol/v1/parameters
And that is indeed the case.
But even if we were adding the parameter to say that the data source comes from "web", you would just have "web" as the source.
I don't see the point in doing that.
Please understand that we're not google analytics/adwords/adsense specialists.
What are you supposed to have there ? And how is it relevant to what you're trying to do ?

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

  • Posts: 234
  • Thank you received: 4
6 years 6 months ago #292424

Hi

Thanks for the response, what I am expecting is that Hikashop will pass information about the customer to GA when the customer completes their purchase. This information will display where the customer came from in the first place, Facebook, referral etc. This is why I have started by search within Hikashop since it must send said details to GA.

Thanks in advance.
Iain

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

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

Hi,

The information of the customer that HikaShop is supposed to send is normally the client_id, and that is done already.
stackoverflow.com/questions/26461439/goo...nt-id-sent-with-meas

However, the source is dictacted by several parameters that you're supposed to include in the URLs pointing to your website pages in order to identify the source:
support.google.com/analytics/answer/1033863?hl=en
And if you don't have the correct parameters, it's possible that the source is missing. For example, without the utm_medium parameter it can happen:
stackoverflow.com/questions/44974727/utm...ugh-google-analytics

So since we know that the client_id being passed to GA works in HikaShop and that it is stored for your orders on your website (we confirmed that earlier), I'm inclined in thinking that there is something missing with the source parameters in your URLs. So please review that.

The following user(s) said Thank You: mad-q

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

  • Posts: 234
  • Thank you received: 4
5 years 9 months ago #303823

Hi Nicolas,

Thank you for your reply, I've noticed that the code attached with the ("clientid") is on all of my checkout pages. However as soon as the user hits submit and see's the conformation of order page the code is no longer there. Would this be a problem?

Here's the code I'm referring to:
monosnap.com/file/NPtMGsBpvddjLUh7ZebAJo6XkCVNB5

Thanks again.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 9 months ago #303827

Hello,

The client id is saved in the cart parameters when submitted. It's not problematic if the hidden input is not there afterwards since the data is already stored to be used later when the order is confirmed.

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.

Time to create page: 0.093 seconds
Powered by Kunena Forum