![]() |
Quote:
and put in your api key number. You will not receive no more support till you click install. |
Thankyou for speedy response.
I hadn't marked it as installed yet as I didn't think I had fully installed it. I've marked it now. I thought I had to add my Google analytics code above the </body> tag of one of the files? |
Quote:
They add your key in the settings/options in the adminCP. This adds the code for you automatically. |
Found a mistake:
Quote:
|
Thanks for your help BBR-APBT. :)
|
When adding or inserting Google Analytics tracking code in vBulletin 4 forums software, either in styles, templates, plugins, products or ad HTML code of newly added advertising function, error message similar to the following may appear when saving the code:
The following error occurred when attempting to evaluate this template: Parse error: syntax error, unexpected ‘[‘ in /home/forums/includes/adminfunctions_template.php(4595) : eval()’d code on line 18 This is likely caused by a malformed conditional statement. It’s highly recommended that you fix this error before continuing, but you may continue as-is if you wish. Two options of “Go Back” or “Continue” are available for user selection. And of course, even if user forcefully save and make active or enable the Google Analytics tracking code, the script doesn’t work, and does not appear on web pages. Google Analytics tracking code or script contains some special characters which does not parse properly. Thus, in order to embed Google Analytics tracking code, the easier way is to wrap the code with <vb:literal> and </vb:literal> tags so that the code is treated literally during page rendering. For example, <vb:literal> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript">\> try { var pageTracker = _gat._getTracker("****"); pageTracker._trackPageview(); } catch(err) {}</script> </vb:literal> The Google Analytics tracking code can be placed in footer template, or better suggestion is to place it into ad_footer_end template (inside Ad Location Templates) as to avoid future upgrading issues where templates need to manually merged. |
Quote:
Simple install my plugin. Makes it easier all the way around. |
thanks :D
|
really useful.
Thanks dude! |
Updated:
Version: 1.0.3 - Rewrite of the code to give the option to use the (Standard Tracking Code) or the (Asynchronous Tracking Code) |
All times are GMT. The time now is 11:43 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|