Jump to content

Archived

This topic is now archived and is closed to further replies.

me23

modify head tags

Recommended Posts

Hello,

Google Analytics was announced today (http://www.google.com/analytics/), and I'd like to install the necessary code on my OSC store. The only thing it requires is to insert a <script> snippet inside the <head> tags on every page. Can anyone tell me what OSC file to edit to add the necessary code on every page?

Thanks!

Share this post


Link to post
Share on other sites

That would be most of the files in the root directory. Some don't have a head section (stylesheet.css) and some shouldn'be be seen by the SE's (checkout_oricess.php) but you will need to go through each to determine in which ones you want to place the code.

 

Jack

Share this post


Link to post
Share on other sites
That would be most of the files in the root directory. Some don't have a head section (stylesheet.css) and some shouldn'be be seen by the SE's (checkout_oricess.php) but you will need to go through each to determine in which ones you want to place the code.

 

Jack

 

FYI ... Jack is right most files need mod's under the catalog directory. Add this after <title>:

 

<?php

if ($request_type == 'SSL')

{

?>

<script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">

</script>

<script type="text/javascript">

_uacct="UA-111111";

urchinTracker();

</script>

<?

}

else

{

?>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

</script>

<script type="text/javascript">

_uacct="UA-1111111";

urchinTracker();

</script>

<?

}

?>

 

When someone figures out the looping for the items in the form regarding checkout_process.php let me know.

 

Best Regards,

 

Ryan

Share this post


Link to post
Share on other sites

Great - thank you very much Ryan and Jack! I'll give it a try and if I can provide any follow-up advice, I'll do so here.

Share this post


Link to post
Share on other sites

anyone got this wokring yet.

 

I've added the code in above, with my details. Just waiting to see if my status changes now.

 

Also wondering if it's a good idea to add this anyhow, is there anypoint, oscommerce can give you most of the info you need with contribs.

 

What does everyone think.

Share this post


Link to post
Share on other sites
That would be most of the files in the root directory. Some don't have a head section (stylesheet.css) and some shouldn'be be seen by the SE's (checkout_oricess.php) but you will need to go through each to determine in which ones you want to place the code.

 

Jack

 

how can I insert the google analitys code when I'm using the must have contrinution header tag controller module?

Share this post


Link to post
Share on other sites

×