Getting sales information with Google Analytics

Having problem with the visitor information being tracked but not the sales information.
Is there anything else that needs to be configured to get the sales information in the google widget?

image

Litium version: 7

Hi, did you see this thread about ecommerce tracking?

Yes, I did. But the link to the documentation refers to Litium V6. Is there any documentation on V7?

In Litium 7 you will set the account information on the channel instead of the website, otherwise it is the same logic as for Litium 6.

Are you using GTM or Universal analytics? We use universal analytics and have same issue.

We are using analytics with basic configuration. I guess we will have to look into how it should be configured

Universal analytics need to have a call to GetBodyStartScript that is missing in accelerator, this is tracked by https://docs.litium.com/support/bugs/bug_details?id=45504.

Thanks for info!
Is this easy to implement in the accelerator? Or do we need to wait for the next release for this change

you need to add a call to GetBodyStartScripts and pass it to you view but the script should be in top of body not inte head as for GTM script.

var topofBodyScripts = _trackingScriptService.GetBodyStartScripts(pageModel.Page);

Should this code be on every page or only on the checkout page?

edit:
Added the code as it is implemented in the Accelerator V6.

The trackingscripts are now loaded. But still no sales tracking. @Spotonkastebo do you have the same problem?

Do you print the variable out as Html.Raw in your view file?

the variable is returned from the controller as return Content(scripts). Then called by Html.Action in the view.
I can see now in GA that there are sales registered and it did show up in the dashboard after a while.

1 Like

I havent fixed this my self yet i only see that script is included i den code genereated by GetStartBodyScripts.

We have 2 different sites setup, one for B2B and one for B2C, I’ve noticed that we only getting sales information in GA on the B2C site.
The only thing we configured in litium is the UA Id on the channel and the only difference is that GTM is also configured on the B2B-site. Do anyone know if that is why no sales are registered in analytics?

Is the GTM configured with GA snippets?