Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google Analytics in the Archive (and Forum) Details »»
Google Analytics in the Archive (and Forum)
Version: 2.0, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.8.x Rating:
Released: 07-08-2010 Last Update: 05-23-2011 Installs: 39
Supported Uses Plugins Auto-Templates
Re-useable Code Translations  

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.

Download Now

File Type: zip Google Analytics in Archive by BOP5v2.zip (3.2 KB, 196 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-09-2010, 10:18 PM
salafmisr.net's Avatar
salafmisr.net salafmisr.net is offline
 
Join Date: Apr 2010
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 07-09-2010, 10:26 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool... I will update the mod but I think it's important to keep so people don't forget to do this.
Reply With Quote
  #4  
Old 07-11-2010, 03:29 PM
Manoel J?nior Manoel J?nior is offline
 
Join Date: Feb 2009
Location: SP / Brasil
Posts: 778
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Prefer this trick.

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

Thanks! Installed
Reply With Quote
  #5  
Old 10-14-2010, 08:33 AM
Fergal C Fergal C is offline
 
Join Date: Dec 2004
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by salafmisr.net View Post
...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!
Reply With Quote
  #6  
Old 10-14-2010, 12:47 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 10-14-2010, 01:00 PM
Jack12's Avatar
Jack12 Jack12 is offline
 
Join Date: May 2010
Location: Western Australia
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Cheers.
Reply With Quote
  #8  
Old 10-15-2010, 09:40 AM
Fergal C Fergal C is offline
 
Join Date: Dec 2004
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View 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.
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.
Reply With Quote
  #9  
Old 01-01-2011, 07:43 PM
SnakeEaterITA SnakeEaterITA is offline
 
Join Date: Jul 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #10  
Old 01-01-2011, 08:05 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Attached Images
File Type: gif ss_archive.gif (27.8 KB, 0 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04513 seconds
  • Memory Usage 2,322KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete