-
AuthorPosts
-
ariane1001 Friend
ariane1001
- Join date:
- October 2009
- Posts:
- 13
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
April 9, 2013 at 7:47 am #186602Hi,
I would like to insert my Google Analytics code in my template. I followed this post: http://www.joomlart.com/forums/topic/analytics-into-ja-mendozite/
But I don’t see the analytics code, what is going wrong?
Site url: http://welzijngo.nl/Ariane
pavit Moderatorpavit
- Join date:
- September 2007
- Posts:
- 15749
- Downloads:
- 199
- Uploads:
- 2274
- Thanks:
- 417
- Thanked:
- 4028 times in 3778 posts
April 9, 2013 at 7:59 am #489296Hi
Try to add your google analytics code before the </head> tag
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-XX']);
_gaq.push(['_trackPageview']);(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();</script>
</head>
ariane1001 Friendariane1001
- Join date:
- October 2009
- Posts:
- 13
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
April 9, 2013 at 12:24 pm #489333Hello,
Tried that also. My code is different but that’s what I have got from the Google analytics website.
Am I putting it in the right file? templates/ja_mendozite/page/default.php?
Thanks
max_santiago Friendmax_santiago
- Join date:
- January 2013
- Posts:
- 216
- Downloads:
- 49
- Uploads:
- 58
- Thanks:
- 120
- Thanked:
- 8 times in 3 posts
March 3, 2014 at 10:04 pm #525130<em>@ariane1001 368247 wrote:</em><blockquote>Hello,
Tried that also. My code is different but that’s what I have got from the Google analytics website.
Am I putting it in the right file? templates/ja_mendozite/page/default.php?
Thanks</blockquote>
I have same Ariane question: is path ‘templates/ja_mendozite/page/default.php’ correct and into default.php we have to copy ‘Google Analytics Code’ before closed-tag ‘head’?!
m.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 4, 2014 at 10:57 am #525267@ariane1001: Have you sorted it out at your end? I see your site is working fine now with google analytic script
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-39968602-1', 'welzijngo.nl');
ga('send', 'pageview');</script>
@max_santiago: You can follow steps below:Copy the default.php file in this plugins/system/jat3/jat3/base-themes/default/page/ path.
Create “page” folder and paste the file above into, you should have:
<blockquote>templates/ja_mendozite/page/default.php</blockquote>Then, open this default.php file and add google analytics below “</body>” or </head> tags
Once done to clear cache from admin area.
-
AuthorPosts
This topic contains 5 replies, has 4 voices, and was last updated by Ninja Lead 10 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum