should I then replace what you wrote in all my pages or can I use the original line code? your line is associated to a specific IP...
The IP that you're seeing there is your own IP address, generated by the little bit of PHP code that's in it's place in the original code. So, you want to use the original code, not the code that you're seeing in the source code after visiting the page.
Here the error I get when I upload a page as .php
Parse error: syntax error, unexpected T_STRING in /membri/racheleallena/Home.php on line 1
don't know what to do...
It sounds like you might be running into an issue with your host / server rather than the code. Are you using one of those free web hosts? Often times they lock them down so tight for security reasons that you don't get access to some things, or just have a lot of issues trying to do more advanced stuff (like this). I know the code itself works fine as I've been using it myself for a couple years or more now, and have set it up for others, which makes me think it might be your web host.
well, then thanks anyway for the help...I'll try to figure out what kind of problem it is...
If it turns out to be your host that's the problem you might want to try BlueHost. We're hosted there and they're a solid web host with good prices.
Sorry to bother you, but I have another question...the last one I hope!
you said the error may be related to the host, ok
but then why by putting my IP in the test page code the IP's showed on GA and it indicates the IP that have visited the page?
could I do the same for each one of my pages?
(maybe it's a very silly question, I am not a java pro nor php )
It's ok to keep asking, GeekDrop is here to help anyone who needs it.
When I whipped up that test page I also visited it a few times from a few different places (proxies, etc.) so that you could see that the code does actually work, so you may be seeing those instead of your own? You can check by visiting ipchicken.com, and comparing your own IP address with any of the ones shown in GA.
Also, when you viewed your own IP in the source code, was it on a page running on your own server? Or was it the one running on mine? Other than that, I'm not really sure why, I'd have to see the full source code of the actual page you're getting that error on to see what's possibly causing it.
Give this a try:
On the page with the GA code, that you've renamed to .php, (home.php), on the very first line add this (exactly as it looks; less-than sign, question mark, php): <?php
And then on the very last line of the same page, add this: ?>
You'll also need to do that for each page that you renamed to .php.
It keeps says there's an error (i.e. there is a '=' that does not work apparently...)
the very first line of code looks like this
<?php version="1.0" encoding="UTF-8"?>
I changed xml with php as you said (I tried this before too...)
I said NOT to change the .xml files to php. Only the .htm/.html files that you're putting the GA code into. See here?
First, just rename it (that file) back to .xml (and don't put the GA code into it), if it still errors try changing the <?php to <?xml