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

#   Where toplace Google Analytics code 4 conversions

##

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

13 years 1 month ago [\#127183](#127183) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#127183 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

Please, use the code tag when you want to paste some code, please !!

Otherwise, your fix is right

Regards,

---

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

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

- **[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")**
- [![oxheadproductions's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27717.jpg)](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")
- [ Offline](/forum/user/27717-oxheadproductions)

Less More

- Posts: 47
- Thank you received: 0
-
-

12 years 11 months ago -  12 years 11 months ago [\#132576](#132576) by [oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")  Replied by *[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#132576 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

hikashop 2.2.2
Joomla 2.5

I have a similar issue and I don't know where to install the tracking google code. I tried pasting at the end of both "end" and "after_end" files as suggested at the beginning of the thread and they didn't work. So do I have the wrong file or is it pasted in the wrong location in the files?

I was told by the marketing team to *place the "order confirmation" right before the &lt;/body&gt;*... however they were unfamiliar with hikashop...if that helps.

&lt;script type=text/javascript&gt;
var hostProtocol = (("https:" == document.location.protocol) ? "https" : "http");
document.write('&lt;scr'+'ipt src="', hostProtocol+
'![:/](/irritated.gif ":/")/101.xg4ken.com/media/getpx.php?cid=57e22848-b5e3-4e75-99df-4935f02def79','" type="text/JavaScript"&gt;&lt;\/scr'+'ipt&gt;');
&lt;/script&gt;
&lt;script type=text/javascript&gt;
var params = new Array();
params[0]='id=57e22848-b5e3-4e75-99df-4935f02def79';
params[1]='type=conv';
params[2]='val=25';
params[3]='orderId=';
params[4]='promoCode=';
params[5]='valueCurrency=USD';
params[6]='GCID='; //For Live Tracking only
params[7]='kw='; //For Live Tracking only
params[8]='product='; //For Live Tracking only
k_trackevent(params,'101');
&lt;/script&gt;

&lt;noscript&gt;
&lt;img src="[ 101.xg4ken.com/media/redir.php?track=1&amp;t...D&amp;GCID=&amp;kw=&amp;product=](https://101.xg4ken.com/media/redir.php?track=1&token=57e22848-b5e3-4e75-99df-4935f02def79&type=conv&val=25&orderId=&promoCode=&valueCurrency=USD&GCID=&kw=&product=)" width="1" height="1"&gt;
&lt;/noscript&gt;

Last edit: 12 years 11 months ago by [oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTA1LXdoZXJlLXRvcGxhY2UtZ29vZ2xlLWFuYWx5dGljcy1jb2RlLTQtY29udmVyc2lvbnM/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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: 86556
- Thank you received: 14304
-
-

12 years 11 months ago [\#132710](#132710) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#132710 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

There is no need to place any code anywhere. Simply configure the HikaShop Google Analytics plugin via the joomla plugins manager and it should work.

The following user(s) said Thank You: [oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")

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

- **[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")**
- [![oxheadproductions's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27717.jpg)](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")
- [ Offline](/forum/user/27717-oxheadproductions)

Less More

- Posts: 47
- Thank you received: 0
-
-

12 years 11 months ago [\#132728](#132728) by [oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")  Replied by *[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#132728 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

Too easy. Thanks again.

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

- **[river](/forum/user/9591-river "View river's Profile")**
- [![river's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar9591.gif)](/forum/user/9591-river "View river's Profile")
- [ Offline](/forum/user/9591-river)

Less More

- Posts: 344
- Thank you received: 3
-
-

12 years 11 months ago [\#133013](#133013) by [river](/forum/user/9591-river "View river's Profile")  Replied by *[river](/forum/user/9591-river "View river's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133013 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

Can I use the " HikaShop Google Analytics plugin" for tracking Google Adwords Conversions also ?
....or does it only work for regular Google Analytics stats ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTA1LXdoZXJlLXRvcGxhY2UtZ29vZ2xlLWFuYWx5dGljcy1jb2RlLTQtY29udmVyc2lvbnM/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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: 86556
- Thank you received: 14304
-
-

12 years 11 months ago [\#133064](#133064) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133064 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

It's for none of that.
adwords conversions and normal GA stats can be done with joomal plugins. This plugin sends GA ecommerce statistics:
[ support.google.com/analytics/answer/1037249?hl=en](https://support.google.com/analytics/answer/1037249?hl=en)

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

- **[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")**
- [![oxheadproductions's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27717.jpg)](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")
- [ Offline](/forum/user/27717-oxheadproductions)

Less More

- Posts: 47
- Thank you received: 0
-
-

12 years 11 months ago [\#133191](#133191) by [oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")  Replied by *[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133191 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

> oxheadproductions wrote: Too easy. Thanks again.

Sorry I tried the plugin as suggested and the advertisement folks couldn't get the results they needed. So I gave them access to my joomla admin... and they attempted to install the code in the appropriate files... no luck again. This is there response....

*"I checked my systems today and it still appears that the code is not showing up on your Order Confirmation page. Can you please reach out to Hika Shop and have them show you how to place custom code on the "Order Confirmation" page of your site. ....etc"*

The custom code we are attempting to find a home for is....

&lt;script type=text/javascript&gt;
var hostProtocol = (("https:" == document.location.protocol) ? "https" : "http");
document.write('&lt;scr'+'ipt src="', hostProtocol+
'![:/](/irritated.gif ":/")/101.xg4ken.com/media/getpx.php?cid=57e22848-b5e3-4e75-99df-4935f02def79','" type="text/JavaScript"&gt;&lt;\/scr'+'ipt&gt;');
&lt;/script&gt;
&lt;script type=text/javascript&gt;
var params = new Array();
params[0]='id=57e22848-b5e3-4e75-99df-4935f02def79';
params[1]='type=conv';
params[2]='val=25';
params[3]='orderId=';
params[4]='promoCode=';
params[5]='valueCurrency=USD';
params[6]='GCID='; //For Live Tracking only
params[7]='kw='; //For Live Tracking only
params[8]='product='; //For Live Tracking only
k_trackevent(params,'101');
&lt;/script&gt;

&lt;noscript&gt;
&lt;img src="101.xg4ken.com/media/redir.php?track=1&amp;t...D&amp;GCID=&amp;kw=&amp;product=" width="1" height="1"&gt;
&lt;/noscript&gt;

**Bottom line**... where is the file found on my FTP or within Hikashop for the order "confirmation page"

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTA1LXdoZXJlLXRvcGxhY2UtZ29vZ2xlLWFuYWx5dGljcy1jb2RlLTQtY29udmVyc2lvbnM/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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: 86556
- Thank you received: 14304
-
-

12 years 11 months ago [\#133193](#133193) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133193 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

If you want to add tracking code in the confirmation page of HikaShop, you can edit the file "after_end" of the view "checkout" via the menu Display&gt;Views provided that you didn't configure any return URL in your payment methods.

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

- **[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")**
- [![oxheadproductions's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27717.jpg)](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")
- [ Offline](/forum/user/27717-oxheadproductions)

Less More

- Posts: 47
- Thank you received: 0
-
-

12 years 11 months ago [\#133199](#133199) by [oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")  Replied by *[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133199 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

...I have attempted to add the code to "after_end" file before without luck. I don't understand "configure any return URL in your payment methods" I'm assuming if I don't understand then I didn't do it.

Can you help me understand?... maybe this is the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTA1LXdoZXJlLXRvcGxhY2UtZ29vZ2xlLWFuYWx5dGljcy1jb2RlLTQtY29udmVyc2lvbnM/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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: 86556
- Thank you received: 14304
-
-

12 years 11 months ago [\#133205](#133205) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133205 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

When you edit a payment method via the menu System&gt;Payment methods there is a "return URL" option there. It should be blank or it won't work.

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

- **[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")**
- [![oxheadproductions's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar27717.jpg)](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")
- [ Offline](/forum/user/27717-oxheadproductions)

Less More

- Posts: 47
- Thank you received: 0
-
-

12 years 11 months ago [\#133208](#133208) by [oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")  Replied by *[oxheadproductions](/forum/user/27717-oxheadproductions "View oxheadproductions's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133208 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

so far so good... yes the "return URL was blank. Perhaps the location of the tracking code within the "after_end" file will make a difference. I added the code at the end following this (my code for my after_end file)
*****************
&lt;?php
/**
* @package HikaShop for Joomla!
* @version 2.2.2
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 [ www.gnu.org/licenses/gpl-3.0.html](http://www.gnu.org/licenses/gpl-3.0.html)
*/
defined('_JEXEC') or die('Restricted access');
?&gt;&lt;?php
$app = JFactory::getApplication();
$app-&gt;enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE') );

*****************

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTA1LXdoZXJlLXRvcGxhY2UtZ29vZ2xlLWFuYWx5dGljcy1jb2RlLTQtY29udmVyc2lvbnM/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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: 86556
- Thank you received: 14304
-
-

12 years 11 months ago [\#133418](#133418) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Where toplace Google Analytics code 4 conversions](/forum/2-general-talk-about-hikashop/83905-where-toplace-google-analytics-code-4-conversions?start=20#133418 "Where do I place the code provided by Google Analytics to measure conversions on the shop? Thanks")*

You should add your code at the beginning of that file.

The following user(s) said Thank You: [tbroderick](/forum/user/36185-tbroderick "View tbroderick's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzgzOTA1LXdoZXJlLXRvcGxhY2UtZ29vZ2xlLWFuYWx5dGljcy1jb2RlLTQtY29udmVyc2lvbnM/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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.086 seconds

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