Extension, Plugin

Archived
Forum
(read-only)

Minimee

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From John D. Wells

     

Google tracking JS

General

Bhashkar Yadav
Bhashkar Yadav

Hi John,

I use Minimee in almost every website. Thanks a ton for delivering this great add-on. I am facing a little problem with the google tracking code.

As google tracking code is having the commented code like:

/* <![CDATA[ */
...............
...............
...............
...............
/* ]]> */ 

but when template is being parsed the commented code is being removed and while looking the page source its showing like:

/* */
...............
...............
...............
...............
/*  */ 

Due to which tracking code isn’t working anymore.

I think, the extension hooked with “template_post_parse” is parsing template code and removing this code. Could you please help me for it if I can have some settings to fix this problem.


Thanks,

John D Wells
# 1
Developer
John D Wells

Hi Bhashkar,

For the time being, you can disable Minimee’s HTML minification, which will prevent this from happening.

Why do you have Analytics code wrapped in CDATA tags?  And why are the opening and closing CDATA tags commented out?  I’ve never seen that particular setup before.

Cheers,
John

Bhashkar Yadav
# 2
Bhashkar Yadav

Hi John,

Thanks for your prompt reply. Yes, by disabling Minimee’s HTML minification, the CDATA tags are showing.

Actually the Analytics code was provided and i was instructed to put the same.

Thanks for your help.


Bhashkar

John D Wells
# 3
Developer
John D Wells

Hi Bhashkar,

Just to be clear, you are still wrapping all of that in SCRIPT tags, correct?  If that’s the case, I’m surprised that the removal of the CDATA tags actually breaks your code.  Perhaps you’ve been given some GA code that I have not seen before.  Is the URL somewhere live that I can take a look?  I’m curious!

Cheers,
John