Creating a Hook for Google Experiments Code

I need to add 'Google experiments' code to the head section of my website. I understand the best way to do this is using hooks, however I don't have any experience with creating new hooks.



Has anyone done this, and could you provide a step by step guide on how to do it?



Thanks in advance.



J.

Hello Jkendall,



Thank you for your message.



As far as I understand, you want to add sales tracking code to your store. In this case you can use instructions from the Knowledge base article:



http://kb.cs-cart.co…g-code-addition



However, if you wish this code to appear on each page of your store, you can use the same instructions, however the path should be the following:



skins/[CUSTOMER_ACTIVE_SKIN]/customer/addons/my_changes/hooks/index



and the file should be named as scripts.post.tpl.



Please check it.



Thank you.





Pavel Zyukin

CS-Cart Support team

Pavel,

He is looking for A/B testing, not Analytics Tracking.

A/B testing requires much more support from the underlying cart than is provided by default.

Thanks guys - but yes the code is for A/B split testing.



I'm just testing two variations of the homepage at the momet - I've actually managed to get the code to work by creating an HTML block on the top of the homepage. Possibly not the most fail-proof method but seems to be working ok at the moment.



If anyone has any other methods of a/b or multivariate testing in CS-Cart I'd be keen to hear more.