vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Administrative and Maintenance Tools - Google Analytics in the Archive (and Forum) (https://vborg.vbsupport.ru/showthread.php?t=246171)

BirdOPrey5 07-08-2010 10:00 PM

Google Analytics in the Archive (and Forum)
 
1 Attachment(s)
New Version 2.0
New in 2.0: New Improved Google Tracking Code, Code in forum moved to recommended location before the </head> tag.

Uninstall old versions before installing Version 2.0

You will need your Google Analytics tracking ID when installing or upgrading. (UA-XXXXXX-X)

The main purpose of this mod was originally to add your Google Analytics code to the archive. The archive traditionally gets overlooked because the standard instructions of copying your analytics code into the footer doesn't cover the archive.

You simply copy and paste your tracking ID into the mod and enable it in your forums and/or archive.

To confirm it is working go to your archive and view the source on any archive page. At the bottom directly above the VB Copyright info should be your google code.

I have tested this in 3.8.6 and 3.8.7 and it will work in all 3.8.x and probably in 3.7 and earlier as well.
For VB4.x see this version: https://vborg.vbsupport.ru/showthread.php?t=256325

You won't see any indication on the pages but you can demo the product at:
http://www.juot.net/forums/archive/index.php
(You will have to view source to confirm it is working.)

Please mark as installed if you use this. :)

Full instructions in .zip file.

salafmisr.net 07-09-2010 10:18 PM

hello

you don't need a plugin to do that

just open the index.php file in the archive folder , and place the Google Analytics script at the end of it , and voila ! the code is working like a charm in all the archive pages

BirdOPrey5 07-09-2010 10:26 PM

cool... I will update the mod but I think it's important to keep so people don't forget to do this.

Manoel J?nior 07-11-2010 03:29 PM

Prefer this trick.

For when I upgrade my vBulletin, will not have to worry about changing the file on hand.

Thanks! Installed

Fergal C 10-14-2010 08:33 AM

Quote:

Originally Posted by salafmisr.net (Post 2067013)
...just open the index.php file in the archive folder , and place the Google Analytics script at the end of it...

Should that be at the very end of it, i.e. after the last closing PHP tag "?>"

Thanks!

BirdOPrey5 10-14-2010 12:47 PM

No...

In index.php look for the code:
Code:

$output .= "
<div id=\"copyright\">$vbphrase[vbulletin_copyright]</div>
</div>
</body>
</html>";

And paste the google code directly before </body>.

Remember you will need to redo this each time you upgrade vbulletin if you do it this way.

Also you will have to 'escape' every double quote in the google code with a slash \ as explained in the top post.

EDIT- Actually it might work at the very very end of the file, AFTER the php closing tag too... I haven't tested it but that should work and no need to escape the quotes. But it wouldn't be valid HTML because all the code should be before the </html> so it may not work in all browsers.

Jack12 10-14-2010 01:00 PM

Great work (not that you need to be told :p) mate, will install when I've got a little spare time.

Cheers.

Fergal C 10-15-2010 09:40 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2110076)
...EDIT- Actually it might work at the very very end of the file, AFTER the php closing tag too... I haven't tested it but that should work and no need to escape the quotes. But it wouldn't be valid HTML because all the code should be before the </html> so it may not work in all browsers.

Thanks BirdOPrey5, I've added it there and it seems to work OK. Perhaps it's not valid HTML, but hopefully won't do any harm in the archive.

SnakeEaterITA 01-01-2011 07:43 PM

Even if I put the code in my template, it looks like Analytics is unable to get the traffic data from the forum...anyone with the same problem?

BirdOPrey5 01-01-2011 08:05 PM

1 Attachment(s)
I go to Google Analytics -> Content Overview -> Full Report and do a search for "archive" and I see a bunch or archive URLs so i know it's working...

I suppose it's possible if the code wasn't escaped properly you might not got it to work... I will upgrade this from a plugin to a real installable mod so people don't have to escape the code themselves...

Also you made sure to wait 24 hours before checking your analytics?


All times are GMT. The time now is 11:00 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
  • Page Generation 0.01052 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete