Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 Feb 2018, 06: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="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-XXXXXXXXX-3');
</script>



Thanks for the help
Reply With Quote
  #2  
Old 19 Mar 2018, 18: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.)
__________________
<?php
while ($breathing) {
write_more_code(); }
?>
Reply With Quote
  #3  
Old 20 Mar 2018, 20: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 20:33 ---------------

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

Enable Google Analytics
Google Analytics Javascript
__________________
Glenn Vergara - Former vB Developer
Looking for vB mods? Even for vBCloud?
vB Mods That Rock!

Reply With Quote
Reply

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 21: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
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 13:34.

Layout Options | Width: Wide Color: