Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 16 Feb 2018, 07:30
mito22 mito22 is offline
Join Date: Oct 2005
Google Analytics Javascript code.... on VB5

I've this code...from google.... but appears don't work....

I must use all? Or wich selected parts?

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=""></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-XXXXXXXXX-3');

Thanks for the help
Reply With Quote
Old 19 Mar 2018, 19:26
kkinsey kkinsey is offline
Join Date: Oct 2011
Where did you place this code?

It should go in the <head> of the document, which means that in vBulletin it should (probably*) be in the "headinclude" template.

* this is assuming vB5, a fairly standard template set (as opposed to highly modified, etc.)
while ($breathing) {
write_more_code(); }
Reply With Quote
Old 20 Mar 2018, 21:07
noypiscripter's Avatar
noypiscripter noypiscripter is offline
Join Date: Aug 2013
If you are on vB 5.4.0, you can put the entire code including the script tags in the Google Analytics settings in AdminCP. For lower versions, you need to exclude the script tags which will not work in your case because it is using an external script in the src.

--------------- Added 20 Mar 2018 at 21:33 ---------------

The exact settings are in Settings > Options > Search Engine Tools

Enable Google Analytics
Google Analytics Javascript
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Administrative and Maintenance Tools Google Analytics Code Plugin DomainArchitect vBulletin 3.7 Add-ons 14 02 Jan 2009 22:18

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

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

New To Site? Need Help?

All times are GMT. The time now is 02:38.

Layout Options | Width: Wide Color: