Need help? Check out our Support site, then


How to code

  1. I'm adding a script that offers the use of JavaScript (ick, no) or this

    Dynamic Content Implementation optional
    Use a common include or template to paste the code above instead of manually adding it to every page

    How would I code the include?

    The blog I need help with is icollectmenus.wordpress.com.

  2. Not that blog. Just saw the tag line

  3. Javascript cannot be added to a WordPress.com blog. If you tell us the result you intend to achieve, maybe we can come up with a workaround.

  4. I don't want to use JS but will need to look up which blog later tonight. Will post then, thank you

  5. Found it. It is for the Google Analytics code. I want it on each page but don't want to have to remember to try to include it. A script would help :)

    <script type="text/javascrip">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-3XXXXXX7-1']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl'; : 'http://www';) + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>

    Dynamic Content Implementation optional
    Use a common include or template to paste the code above instead of manually adding it to every page

  6. We cannot use JavaScript for security reasons. The software strips the code out of free hosted WordPress.com blogs.
    http://en.support.wordpress.com/code/#javascript

    Can I use Google Analytics?
    No, Google Analytics cannot be used on WordPress.com blogs at this time. http://en.support.wordpress.com/stats/#additional-info

    Bottom line: If you think you must have Google analytics you will have to hire a web host and set up your own WordPress.org install. Read the comparison here > http://support.wordpress.com/com-vs-org/

  7. I do have my own hosted blogs. Sorry, i need the code for my own blogs not using JS. I don't do JS (security risk) so want the code for the template or include

  8. I do have my own hosted blogs.

    If this thread is about those blogs that are NOT being hosted by WordPress.com then you are posting to the wrong support forum. We don't provide support here for WordPress.ORG software. If that's the software you want help with you need to post to http://wordpress.org/support/

  9. Sorry. I did a search for WordPress help forums and this site is listed.

  10. Heloo again,
    Many people get confused about this. I want to be sure you are clear.

    1. On this support forum we provide support for this blog which is hosted by WordPress.COM http://icollectmenus.wordpress.com/

    2. We cannot use JavaScript and we cannot use Google Analytics on WordPress.COM blogs.

    3. If you are referring to WordPress.ORG installs then know we cannot help you here. That support is provided at http://wordpress.org/support/

Topic Closed

This topic has been closed to new replies.

About this Topic