How to code
-
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 pageHow would I code the include?
The blog I need help with is: (visible only to logged in users)
-
-
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.
-
I don’t want to use JS but will need to look up which blog later tonight. Will post then, thank you
-
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 -
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/#javascriptCan I use Google Analytics?
No, Google Analytics cannot be used on WordPress.com blogs at this time. http://en.support.wordpress.com/stats/#additional-infoBottom 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/
-
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
-
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/
-
-
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/
- The topic ‘How to code’ is closed to new replies.