PDA

View Full Version : Google Analytics Javascript code.... on VB5


mito22
02-16-2018, 05:30 AM
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

kkinsey
03-19-2018, 05:26 PM
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.)

noypiscripter
03-20-2018, 07:07 PM
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 1521578020 at 1521578020 ---------------

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

Enable Google Analytics
Google Analytics Javascript