vBulletin Search Engine Optimization
This is a discussion on New Google Analytics Code within the General Discussion forums, part of the vBSEO SEO Plugin category; I've put this here rather than troubleshooting because the new code is not officially part of vBSEO 'yet' (but I ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| New Google Analytics Code
I've put this here rather than troubleshooting because the new code is not officially part of vBSEO 'yet' (but I notice that it has been implemented on this forum) so is just a preemptive strike. Since installing the new Analytics code I've noticed that the registration goal conversions are no longer tracking. Anyone else tried installing the code and noticed this? |
|
#2
| ||||
| ||||
|
The new Analytics code will be implemented within the new version. However if you want to implement it right now please do the following : You can modify functions_vbseo.php file for that. Find PHP Code: HTML Code: $newtext = preg_replace('#(</body>)#is','
<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">
var pageTracker = _gat._getTracker("'.VBSEO_ANALYTICS_CODE.'");
pageTracker._initData();
pageTracker._trackPageview('.($track_url?"'$track_url'":"").');
</script>
'.'\\1',$newtext,1);
Last edited by Oleg Ignatiuk; 03-22-2008 at 04:49 AM. |
|
#3
| |||
| |||
|
Hi Mert I posted about it a few days ago (Google Analytics has a new tracker?) but I've found that since doing it it no longer tracks registrations (using the funnel). Any ideas? |
|
#4
| |||
| |||
| Quote:
Quote:
Hi -- I have replaced the old Analytics code with the new one, but I'm getting an error message ("Done, but with errors on page") on pages which are used for a user registration... apparently due to the Google Analytics script on the page. Affected pages (scripts) are: 1) forum/register.php 2) forum/register.php?do=register 3) forum/register.php?do=addmember Note: This problem only appears when viewing pages in Internet Explorer, in FireFox it doesn't show any errors. UPDATE: I can see the "urchinTracker" code below the new Analytics code on those pages used for the registration. Could that be the problem? I don't see any urchinTracker code on the other pages. Quote:
Any help appreciated !! UPDATE: When I deleted the "urchinTracker" code from the scripts mentioned above all error messages disappeared. I think "pageTracker._trackPageview" inside the new Google Analytics code replaced the function of the old urchinTracker code and they can not be placed together on the same script page. Last edited by wld; 03-12-2008 at 12:37 PM. |
|
#5
| ||||
| ||||
|
anybody else having problems with this? i install the code change and i just get white pages on my site. |
|
#6
| |||
| |||
|
no problems here. You seeing anything in your error.log file? |
|
#7
| ||||
| ||||
|
The urchinTracker(XX) code should be repalced with pageTracker._trackPageview(XX) in this case as well.
__________________ Oleg Ignatiuk / Crawlability Inc. vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#8
| ||||
| ||||
|
I was referring to Mert's code post, not the extra urchinTracker() stuff. Nothing in the error log. |
|
#9
| ||||
| ||||
|
Looks like there are a couple of slashes missing there (vB parser removes them for some reason), here is the code: HTML Code: $newtext = preg_replace('#(</body>)#is','
<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">
var pageTracker = _gat._getTracker("'.VBSEO_ANALYTICS_CODE.'");
pageTracker._initData();
pageTracker._trackPageview('.($track_url?"'$track_url'":"").');
</script>
'.'\\1',$newtext,1);
__________________ Oleg Ignatiuk / Crawlability Inc. vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. Last edited by Oleg Ignatiuk; 03-21-2008 at 12:10 PM. |
|
#10
| ||||
| ||||
| Quote:
Last edited by Oleg Ignatiuk; 03-21-2008 at 12:09 PM. |
|
#11
| ||||
| ||||
|
Do you mean html validation (which page)?
__________________ Oleg Ignatiuk / Crawlability Inc. vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#12
| ||||
| ||||
|
Breaks validation at showthread pages [Invalid] Markup Validation of http://www.ayyas.com/guncel-olaylar/22057-gene/ - W3C Markup Validator If i use the old analytics code everything is ok |
|
#13
| ||||
| ||||
|
Please try to enclose js code in html comment: HTML Code: <script language="Javascript"><!-- ... //--> </script>
__________________ Oleg Ignatiuk / Crawlability Inc. vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#14
| |||
| |||
|
I get a plank page after changing the code. Can you please exact post which code I should be replaced with which code?
|
|
#15
| ||||
| ||||
|
The instruction is included in post#2 above: New Google Analytics Code
__________________ Oleg Ignatiuk / Crawlability Inc. vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need to add advanced _udn into Google Analytics Code | Zip-Lock | Analysis: Traffic & SERPS | 1 | 03-22-2007 09:13 PM |
| Got My Google Analytics code today | shanemcse | Analysis: Traffic & SERPS | 10 | 11-15-2006 12:07 AM |
| How do I add the Google Analytics Code? | Lammypie | General Discussion | 10 | 05-22-2006 09:08 PM |
| 2.2.2/2.3.0 Google Analytics Code | Keith Cohen | Bug Reporting | 4 | 12-08-2005 01:11 PM |
| Finding my Google Analytics Code | Michael | Troubleshooting | 1 | 11-21-2005 04:24 PM |