[Skip to main content](#vessel-content)

#   Enchanced analytics

##

- **[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")**
- [![Rabbiteggs's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34027.jpg)](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile") Topic Author
- [ Offline](/forum/user/34027-rabbiteggs)

Less More

- Posts: 102
- Thank you received: 3
-
-
-
-

10 years 5 months ago -  10 years 5 months ago [\#242561](#242561) by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")  *[Enchanced analytics](/forum/30-integrations/884992-enchanced-analytics#242561 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.0 -- Error-message(debug-mod must be tuned on) -- : Problem with enchanced analytics  Hello,  Does anyone know how to enable enchanced analytics? I try to use plugin for hika, but no results. I found on forum this code, but it doesn't collect information about revenue by categories and there is no datalayer.push. Thnx.  Code:")* was created by *[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.5.0
-- Error-message(debug-mod must be tuned on) -- : Problem with enchanced analytics

Hello,

Does anyone know how to enable enchanced analytics? I try to use plugin for hika, but no results.
I found on forum this code, but it doesn't collect information about revenue by categories and there is no datalayer.push. Thnx.

**Code:**
Code:

$siteName = '*********'; $account= 'UA-*********'; $app = JFactory::getApplication(); $order_id = $app-&gt;getUserState('com_hikashop.order_id'); $orderClass = hikashop_get('class.order'); $this-&gt;order = $orderClass-&gt;loadFullOrder($order_id); $order_total = round($this-&gt;order-&gt;order_full_price, 2); $shipping_price = round($this-&gt;order-&gt;order_shipping_price, 2); $revenue = $order_total - $shipping_price; $order_total_no_vat = round($this-&gt;order-&gt;order_subtotal_no_vat, 2); $tax = $order_total - $order_total_no_vat; $js = ' &lt;!-- Google Analytics ecommerce --&gt; &lt;script&gt; (function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]&#124;&#124;function(){ (i[r].q=i[r].q&#124;&#124;[]).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"); ga("create", "' . $account . '", "auto"); ga("send", "pageview");'.$extra_required.' ga("require", "ecommerce", "ecommerce.js"); ga("ecommerce:addTransaction", { "id": "' . $order_id .'", "affiliation": "' . str_replace(array('\\','"'), array('\\\\', '\\\"'), $siteName) . '", "revenue": "' . $revenue . '", "shipping": "' . $shipping_price . '", "tax": "' . round($tax, 2) . '" }); '; foreach($this-&gt;order-&gt;products as $product) { $js .= 'ga("ecommerce:addItem", { "id": "' . $order_id . '", "name": "' . str_replace(array('\\','"'), array('\\\\', '\\\"'), strip_tags($product-&gt;order_product_name)) . '", "sku": "' . str_replace(array('\\','"'), array('\\\\', '\\\"'), $product-&gt;order_product_code) . '", "category": "", "price": "' . ($product-&gt;order_product_price + $product-&gt;order_product_tax) . '", "quantity": "' . (int)$product-&gt;order_product_quantity . '" }); '; } $js .= ' ga("ecommerce:send"); &lt;/script&gt; &lt;!-- End Google Analytics --&gt; ';

Last edit: 10 years 5 months ago by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODQ5OTItZW5jaGFuY2VkLWFuYWx5dGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

10 years 5 months ago [\#242565](#242565) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Enchanced analytics](/forum/30-integrations/884992-enchanced-analytics#242565 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.0 -- Error-message(debug-mod must be tuned on) -- : Problem with enchanced analytics  Hello,  Does anyone know how to enable enchanced analytics? I try to use plugin for hika, but no results. I found on forum this code, but it doesn't collect information about revenue by categories and there is no datalayer.push. Thnx.  Code:")*

Hi,

That code is already in HikaShop. All you have to do is to configure the HikaShop Analytics plugin via the Joomla plugins manager.
Make sure that you use the latest version of HikaShop as we fixed several issues with it since the 2.6.0 which could explain why it doesn't work for you.
Also, you need to properly configure it, so maybe you're missing something in the settings of the plugin. And finally, the statistics can sometimes be delayed in GA, up to 48h.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODQ5OTItZW5jaGFuY2VkLWFuYWx5dGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")**
- [![Rabbiteggs's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34027.jpg)](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile") Topic Author
- [ Offline](/forum/user/34027-rabbiteggs)

Less More

- Posts: 102
- Thank you received: 3
-
-
-
-

10 years 4 months ago [\#242652](#242652) by [Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")  Replied by *[Rabbiteggs](/forum/user/34027-rabbiteggs "View Rabbiteggs's Profile")* on topic *[Enchanced analytics](/forum/30-integrations/884992-enchanced-analytics#242652 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.0 -- Error-message(debug-mod must be tuned on) -- : Problem with enchanced analytics  Hello,  Does anyone know how to enable enchanced analytics? I try to use plugin for hika, but no results. I found on forum this code, but it doesn't collect information about revenue by categories and there is no datalayer.push. Thnx.  Code:")*

Hm... I configure plugin so as you write in FAQ , and waited 3-4 days and no results.

- [ ![1&#95;2016-06-10.png](/forum/attachment/31996) ](/forum/attachment/31996 "1&#95;2016-06-10.png") [ ](/forum/attachment/31996?download=1 "1&#95;2016-06-10.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODQ5OTItZW5jaGFuY2VkLWFuYWx5dGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

10 years 4 months ago [\#242677](#242677) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Enchanced analytics](/forum/30-integrations/884992-enchanced-analytics#242677 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.5.0 -- Error-message(debug-mod must be tuned on) -- : Problem with enchanced analytics  Hello,  Does anyone know how to enable enchanced analytics? I try to use plugin for hika, but no results. I found on forum this code, but it doesn't collect information about revenue by categories and there is no datalayer.push. Thnx.  Code:")*

Try turning off the "direct call" setting.
Also, can you confirm that you also have a standard Google Analytics plugin setup on your website ?
[ extensions.joomla.org/extensions/extensi...ers=0&amp;clearfilters=1](http://extensions.joomla.org/extensions/extension?searchall=google&filter%5Btags%5D%5B%5D=475&filter%5Bcore_catid%5D=&filter%5Bincludes%5D=&filter%5Bversions%5D=&filter%5Btype%5D=&filter%5Bhasdemo%5D=&order=&filter%5Bnewupdated%5D=&filter%5Bscore%5D=&filter%5Bfavourites%5D=&dir=DESC&limitstart=0&controller=filter&view=extension&layout=list&Itemid=145&clearorders=0&clearfilters=1)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODQ5OTItZW5jaGFuY2VkLWFuYWx5dGljcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.067 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
