I would hook into the wp_head
action. I would place this in a plugin so as to abstract it from your presentation layer. This allows for scalability and changing of themes. This also prevents any analytics collateral damage if a step is missed in migration from one theme to the next.
1 2 3 4 5 6 7 8 | add_action('wp_head', 'wpse_43672_wp_head'); function wpse_43672_wp_head(){ //Close PHP tags ?> ADD YOUR PLAIN HTML CODE HERE <?php //Open PHP tags } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.