• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Google Analytics Code Issues

Started by thomaskloos,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thomaskloosTopic starter

I just signed up for google analytics tracking for my phpVibe site. When I add the code to the configuration, I get a 404 error.

Is there a place I can add the javascript google gave me to add to all the pages? Something in the template folder maybe?

Thanks!
Thomas Kloos
  •  

PHPVibe A.

Hi!

You can place it in tpl/main/tpl.globals.php

For 404, can you tell me what is the landing page? (the link of the page when it returns 404), and also if you have mod_security enabled?

thomaskloosTopic starter

I have tried placing it there but then I get a server 500 error.
  •  

thomaskloosTopic starter

  •  

PHPVibe A.

The url is good. Must be a mod_security issues, some faulty rule killing the page.

thomaskloosTopic starter

  •  

PHPVibe A.

And it still does that? Check the error log, anything related to this?

thomaskloosTopic starter

Nothing in error logs.

When I added it to the tpl.globals.php it caused a 500 server error.  Guess I did'nt add it in the right place. It is a javascript, and my guess is has some un-escaped characters that the PHP engine is picking up as commands.
  •  

PHPVibe A.

If you add it in an echo you need to escape the js code. Replace ' with \'

http://www.php.net/manual/de/language.types.string.php

Example:


echo 'it\'s an beautifull word'
$x = 'We didn\'t know';
$y = "Cause \" give errors here";

teckvo

I copied google analytics code and pasted inside admin, but google still doesn't recognize it.

I receive no tracking after i updated to the latest phpvibe version.
  •  

PHPVibe A.


Similar topics (7)