I am attempting to modify the google_analytics addon to also track sales for Clicky Analytics. When I modified the func.php I am calling a function to display the script while viewing the page. The orginal google_analytics func.php did a http get … fn_http_request('GET', $url, $transaction); … I just need to have the additional script run in the pages standard output… above the footer.tpl.
I don't think my code below is proper because it mixes in the output, etc…
function fn_clicky_anaylitics_send($order_info, $goal_id = 0)
Any help pointing me in the proper direction would be greatly appreciated.
You might want to consider just doing a template modification to add script to a specific page at the end of the page. You could even use an html block. I think you're making it much more complicated than it needs to be. All your data is available in template variables and I'd suggest using the order_confirmation hook.
Well the problem is that the current google_analytics addon makes calls to google when you decrease inventory. Essentially it reports to google on all of your sales, even ones that you make through the admin interface. I want to do the same thing so our phone orders taken through the admin interface are being tracked with Clicky Analytics also.