Forums

how to add content under with plugin ? (3 posts)

  1. Rincewind
    Member
    Posted 1 year ago #

    How can I add some content under the <body> tag with a plugin.

    Am writing a google analytics/adsense plugin and with it I need to add some code under the body tag for when the domain is a secondary domain in my google account so it tracks the hits and adsense correctly.

    <script type="text/javascript">
    window.google_analytics_uacct = "UA-11111111-1";
    </script>

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Use wp_footer.

  3. Rincewind
    Member
    Posted 1 year ago #

    Thank you for the response, however wp_footer doesn't give me the results I was looking for.

    If I follow the code here : http://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer

    This is what I get in my html : <p>This is inserted at the bottom</p></body></html>

    This is too late I need the code to be after the opening body tag, and not before the closing one, do you have any more ideas as to how I can do this ?

Topic Closed

This topic has been closed to new replies.

About this Topic