Hi Jungs,
Mhh komm grad nicht weiter hab google Analytics eingerichtet per Code.
Und zwar in die Index.php.Nun habe ich viel gelesen die (footer.php) wäre dafür besser?!!
Bitte um Rat:razz:
Footer.php:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24038889-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>
<div class="clear"></div>
</div>
<div id="footer">
<span class="text">
Die urheberrechtlich geschützten Inhalte, Warenzeichen und zugehörigen Materialien, die sich auf das Spiel
Rift: Planes of Telara™ beziehen, sind Eigentum von Trion Worlds, Inc. (sowie ggf. seinen Lizenzgebern)
und werden mit Erlaubnis von Trion verwendet. Alle Rechte vorbehalten.
<?php
$blog_name = '<a href="'.get_bloginfo('url').'">'.get_bloginfo('name').'</a>';
printf(__('Copyright %s %s %s · %s <br/>','lightword'),'©',date('Y'),$blog_name,'<a href="http://www.wordpress.org" title="" target="_blank"></a>')
;?>
oder index.php?
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24038889-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>
<?php get_header(); ?>
<div id="content-body">
<?php if (function_exists('wp_snap')) { echo wp_snap(); } ?>
<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php if (function_exists("post_class")) post_class(); else print 'class="post"'; ?> id="post-<?php the_ID(); ?>">
<?php lightword_show_sidebox(); ?>
<h2><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php lightword_simple_date(); ?>
<?php if ($lw_post_author == "Main page" || $lw_post_author == "Both") : ?>
<div class="about_author">
<h4><?php _e('Posted by','lightword'); ?> <a href="<?php the_author_meta('url'); ?>"><?php the_author(); ?></a></h4>
</div>
<?php endif; ?>
<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { the_post_thumbnail(array( 200,200 ), array( 'class' => 'alignleft' )); } ?>
<?php the_content(''); ?>
<?php if(function_exists('wp_print')) { print_link(); } ?>
<?php wp_link_pages('before=<div class="nav_link">'.__('PAGES','lightword').': &after=</div>&next_or_number=number&pagelink=<span class="page_number">%</span>'); ?>
<div class="cat_tags clear">
<span class="category"><?php if($lw_disable_tags == "true" || !get_the_tags()) { _e('Filed under:','lightword'); echo " "; the_category(', ');} else if (get_the_tags() && $lw_disable_tags == "false") { _e('Tagged as:','lightword'); echo " "; the_tags(''); } ?></span>
<span class="continue"><?php $pos = strpos($post->post_content, '<!--more-->'); if($pos==''){ ?><a class="nr_comm_spot" href="<?php the_permalink(); ?>#comments"><?php if(lightword_fb_get_comment_type_count('comment')==1) _e('1 Comment','lightword'); elseif('open' != $post->comment_status) _e('Comments Off','lightword'); elseif(lightword_fb_get_comment_type_count('comment') == 0) _e('No Comments','lightword'); else echo lightword_fb_get_comment_type_count('comment')." ".__('Comments','lightword'); ?></a><?php }else{ ?><a title="<?php _e('Read more about','lightword'); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>#more-<?php echo $id; ?>"><?php _e('Continue reading','lightword'); ?></a><?php } ?></span><div class="clear"></div>
</div>
<div class="cat_tags_close"></div>
</div>
<?php comments_template(); ?>
<?php endwhile; else: ?>
<h2><?php _e('Not Found','lightword'); ?></h2>
<p><?php _e("Sorry, but you are looking for something that isn't here.","lightword"); ?></p>
<?php endif; ?>
<?php
if ( !function_exists('wp_pagenavi') ) {
?>
<div class="newer_older">
<span class="newer"> <?php previous_posts_link(__('« Newer Entries','lightword')) ?></span>
<span class="older"> <?php next_posts_link(__('Older Entries »','lightword')) ?></span>
</div>
<?php
}else{
wp_pagenavi();
}
?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>