Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1400661

    Hello,

    I have 2 different codes in use on different Enfold child themes in my functions.php that add Clicky Analytics code to my website.

    On some of my websites I use this code:

    function alwin_clicky_analytics_footer(){
    ?>
    <script src=”//static.getclicky.com/xxxxxxxx.js”></script>
    <?php
    }
    add_action(‘wp_head, ‘alwin_clicky_analytics_footer’);

    And on some websites I use this:

    function clicky_analytics_header(){
    ?>
    <script type="text/javascript">
    <script src="//static.getclicky.com/xxxxxxxx.js"></script>
    </script>
    <?php
    }
    add_action('wp_head', 'clicky_analytics_header');

    They both seem to work fine. I just like to know if one may be better then the other?

    #1400676

    or :
    ;)

    function clicky_analytics_header(){
    ?>
    	<script type="text/javascript" src="//static.getclicky.com/xxxxxxxx.js"></script>
    <?php
    }
    add_action('wp_head', 'clicky_analytics_header');
    #1400780

    Hi,

    The first one, or the suggestion by @guenni007 should be enough :-)

    Best regards,
    Rikard

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.