Avatar lownotes asked

Google Analytics code placement is in bottom, should be above head.

I'm using Catalyst with latest version of the template.

The google analytics code is at the bottom of the page, but google now wants it above the </head> tag.

What is the best way to fix this.

Thanks

  • Joomla
  • Warp Theme
  • Catalyst

9 Answers

1

Avatar mustaq Yootheme answered

If you are sure about the location of the code, you can add it to your templates layouts/templates.php or Create a new Style with your own template.php file in your own style to aid easy upgrades of the template.

YOOgards

0

Avatar lownotes answered

http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html

Thanks for your reply Mustaq. I think you should check your google analytics code generator page. On mine, I can't even generate the old codes, they only create the new async code. which is supposed to be placed in front of </head>.

I can make another template, but seems like this should be part of the template.

0

Avatar david.carroll answered

Please review the links below and see if either resolves your issue:

  • www.yootheme.com/support/question/4608
  • www.yootheme.com/support/question/3590#answer-15880

Please let me know if I was able to answer your question.

Best Regards,

David Carroll

0

Avatar pmarty answered

The google analytics tracking code MUST be placed just before the </head> tag. It is clearly explained in the Google Analytics setup pages: http://goo.gl/Q2mgs
Ok javascripts may slow down page render times, but this one is really useful for any webmaster and Warp implementation should follow Google recommendation in order to have a full compliant service.
For example, using the warp automatic integration for analytics code prevent me to use associated webmaster tools.

I had to disable warp settings and change manually the placement of the google analytics tracking code to the head section of my template
So please, Yoo people, could you take some time to fix this behavior ?

0

Avatar jamie.d.shields answered

I put the tracking code at the bottom in all my sites and never have a problem.
You can have it at the top but it means it needs to load that script before it renders the page so the page is perceived to load slower.

As your using the asynchronous script it wont block loading like a non-asynchronous script but it still needs to load it before it renders the page.

Its up to you where you put it but IMHO it should be at the bottom.

J

0

Avatar dietmar.nadolny answered

Hallo Leute,

ich habe das gleiche Problem und verstehe hier nur Bahnhof, mein Englisch ist dafür nicht gut genug. Ich sehe nur, dass ich im template den Code eingeben soll, das habe ich gemacht, aber analytics funktioniert nicht.

Warum wird das template nicht korrigiert, damit es klappt, oder man lässt es im template weg und ich ändere 20 Seiten per Hand?

Gruß
regioprint

yoo_nano_2 seit 25.10.2012 mit joomla 2.5 stable

Hi,
i do this:

If you are sure about the location of the code, you can add it to your templates layouts/templates.php

but i think this is not a good way, because it do the job that the template must do.

Edited

0

Avatar infinitegrid answered

This is to point out a deficiency in language articulation only.

When I look at setting dialog box in the template where we are asked for:

Tracking Code:

My first assumption was that you were asking for my ACTUAL CODE, not the programatic code. Hence, I placed the UI-x code number in the field and it displays on the Front End and on every page as it should.

However, if you Login to your Google Analytics Account accessing the ADMINISTRATIVE Control Panel you would then select TRACKING INFO where your precise code segment is generated for you. Copy and then PASTE this into the TRACKING CODE field in the template's settings area where you have TRACKING CODE: and you should be all set.

Google Link to TABBED area. You will need to login with administrative rights to your Analytics account at Google to see the page. https://www.google.com/analytics/web/?et=&hl=&authuser=#management/Property/a36850284w65090519p66869413/%3FpropertyComposite.tabId%3DtrackingCodeTab/

Article http://www.yootheme.com/support/question/4608 also applies to some extent.

From here you should be 100% ok using the NANO 2 Template for 2.5.x.

Allen Quinn

Edited

Know someone who can answer? Share a link to this question via email or twitter.