Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

code before </body> tag


ohraina

Recommended Posts

Hello,

I'm trying to use some tracking code for ad words and I'm a newbie and the instructions are to:

Copy the code in the box below. paste the code into every web page you want to log traffic for, immediately before the </body> tag.

Could anyone tell me how to do this seemingly simple task? I attached php files. Please check if that's ok. Thank you.

checkout_success.php

create_account.php

Link to comment
Share on other sites

In both files, I would put the new code after the </form> tag. It's just Javascript, so it should be able to go just about anywhere, but in general it's best not to stuff unrelated code into the middle of a form.

 

I can't look at the full osC code right now, but I think application_bottom.php outputs the </body> tag. It's possible that you might want to move the new code to after the template_bottom.php file, which would mean splitting that last PHP block:

<?php  require(DIR_WS_INCLUDES . 'template_bottom.php'); ?>
  ...the new Google script code here...

<?php  require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Link to comment
Share on other sites

 

In both files, I would put the new code after the </form> tag. It's just Javascript, so it should be able to go just about anywhere, but in general it's best not to stuff unrelated code into the middle of a form.

 

I can't look at the full osC code right now, but I think application_bottom.php outputs the </body> tag. It's possible that you might want to move the new code to after the template_bottom.php file, which would mean splitting that last PHP block:

<?php  require(DIR_WS_INCLUDES . 'template_bottom.php'); ?>
  ...the new Google script code here...

<?php  require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Thanks for tips.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...