ohraina Posted August 22, 2014 Share Posted August 22, 2014 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 More sharing options...
MrPhil Posted August 22, 2014 Share Posted August 22, 2014 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 More sharing options...
burt Posted August 22, 2014 Share Posted August 22, 2014 1. undo everything you already did. 2. admin > modules > header tags > {install module} > google adwords conversion tracking > {install module} > {edit} > {insert conversion ID} > {save} Link to comment Share on other sites More sharing options...
ohraina Posted August 24, 2014 Author Share Posted August 24, 2014 That works out just fine. Much thanks! Link to comment Share on other sites More sharing options...
ohraina Posted August 24, 2014 Author Share Posted August 24, 2014 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.