-
AuthorPosts
-
July 30, 2014 at 11:55 am #297646
Hello,
I have a question. I am looking for a place to put a trackingcode. They say: “paste this code just before the end of the HTML body, that is before </body>”.
What i did is looking in the theme editor and look for body. I can find header but after that i am lost. :-)
Hope you could help me!
Thank you so much!
Greets Hans
Edit: I put </body> in the title and it won’t display so i removed the </>
- This topic was modified 10 years, 3 months ago by Hansnmgn.
July 30, 2014 at 12:16 pm #297654Hi Hansnmgn!
You can add Google Analytics code in Enfold theme options > Google analytics field.
For any other code you need to add, please go to Appearace > Editor and open Header.php file and </body>Cheers!
YigitJuly 30, 2014 at 1:03 pm #297688Hi Yigit,
Thank you for your quick replay. It is another code than Google Analytics.
To make sure i understand it rigth:
1) Go to Appearance
2) Go to Editor
3) Go to Header.php
4) Look in the .Header.php for </body>
5) place the code before the </body>After the </head> i have the folowing code:
<body id="top" <?php body_class($style." ".$avia_config['font_stack']." ".$blank); avia_markup_helper(array('context' => 'body')); ?>> <div id='wrap_all'> <?php if(!$blank) //blank templates dont display header nor footer { //fetch the template file that holds the main menu, located in includes/helper-menu-main.php get_template_part( 'includes/helper', 'main-menu' ); } ?> <div id='main' data-scroll-offset='<?php echo avia_header_setting('header_scroll_offset'); ?>'> <?php do_action('ava_after_main_container'); ?>
Must i place the tracking code insite this?
Thank you!
Greets Hans
July 30, 2014 at 2:41 pm #297730Hi!
Sorry i realized i made a mistake. I meant to say Footer.php file. You can also add following code to Functions.php file to add your script
function add_my_custom_script(){ ?> <script> PASTE YOUR CODE HERE </script> <?php } add_action('wp_footer', 'add_my_custom_script');
Cheers!
YigitJuly 30, 2014 at 5:53 pm #297849Hi Yigit,
Thank you. It worked!
Greets!
July 30, 2014 at 6:13 pm #297862 -
AuthorPosts
- The topic ‘Insert code before body .’ is closed to new replies.