# Getting sales information with Google Analytics

**URL:** <https://forum.litium.com/t/getting-sales-information-with-google-analytics/813>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [April 23, 2019, 7:30am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813 "2019-04-23T07:30:28Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [April 23, 2019, 7:30am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/1 "2019-04-23T07:30:28Z")

</div>

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](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/79ce77c203af72fba155cb9de741dbfc6350546b.png)

Litium version: 7

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [April 23, 2019, 7:39am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/2 "2019-04-23T07:39:12Z")

</div>

Hi, did you see this thread about ecommerce tracking?

> [@Google Analytics extended e-commerce tracking](https://forum.litium.com/t/google-analytics-extended-e-commerce-tracking/610):
>
> We are currently setting up Google Analytics (GA) tracking via Litium Backoffice and we are using the “Google Tag Manager” method. Basic tracking works well and data is sent to GA. We have also enabled e-commerce tracking, in both GA and GTM using the “data layer” method. However, we cannot see any e-commerce data being sent to GA from Litium. Do we need to do any additional configuration or programming in the solution or should we expect e-commerce tracking to work out-of-the-box? Litium ver…

---

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [April 23, 2019, 8:03am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/3 "2019-04-23T08:03:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [April 23, 2019, 8:47am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/4 "2019-04-23T08:47:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [April 23, 2019, 9:01am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/5 "2019-04-23T09:01:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [April 23, 2019, 9:10am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/6 "2019-04-23T09:10:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [April 23, 2019, 9:42am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/7 "2019-04-23T09:42:26Z")

</div>

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](https://docs.litium.com/support/bugs/bug_details?id=45504).

---

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [April 23, 2019, 10:14am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/8 "2019-04-23T10:14:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [April 23, 2019, 10:21am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/9 "2019-04-23T10:21:03Z")

</div>

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);

---

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [April 24, 2019, 8:08am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/10 "2019-04-24T08:08:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [April 24, 2019, 12:00pm UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/11 "2019-04-24T12:00:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [April 24, 2019, 12:06pm UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/12 "2019-04-24T12:06:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [April 24, 2019, 12:13pm UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/13 "2019-04-24T12:13:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Spotonkastebo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/spotonkastebo/32/717_2.png) [@Spotonkastebo](https://forum.litium.com/u/Spotonkastebo)\
**Post date:** [April 25, 2019, 11:28am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/14 "2019-04-25T11:28:04Z")

</div>

> [@emilsjog](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![emilsjog](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@emilsjog](https://forum.litium.com/u/emilsjog)\
**Post date:** [September 16, 2019, 10:20am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/15 "2019-09-16T10:20:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [September 16, 2019, 10:36am UTC](https://forum.litium.com/t/getting-sales-information-with-google-analytics/813/16 "2019-09-16T10:36:27Z")

</div>

Is the GTM configured with GA snippets?
