I just pasted a google analytics snipped into my template. When I preview the view source for the page, the script snipped is displaying all in one line.

How do I get it to display as it does in the page.tpl.php file?

I am using netbeans.

share|improve this question

1 Answer

up vote 1 down vote accepted

My guess is that you are running into EOL marker differences. That boils down to editor settings, and NetBeans copnfiguration help would be best at a sister side, If the code works, then don't worry about it.

As a side note, I don't recall running into any situations that prevented me from using the normal Google Analytics module. Recent versions let you adjust the code, so you should be able to match up with any tracking code you have. In addition, you can configure it to ignore admins, track downloads, and do a lot more.

share|improve this answer
Thank you @MPD Are you saying that by installing the Google analytics module I don't need to paste the code snipped into the page.tpl.php file? Is it possible to preview the analytics via the reports section of the drupal site, or do I still need to log into google analytics? – kine456 Feb 8 at 2:15
1  
Yes, the GA module should preclude needing to manually adding tracking code. I honestly don't recall if you can view Analytics within Drupal, as I always us the GA site. – MPD Feb 8 at 2:19

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.