Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Google Analytics code shows in front-end

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

I have inserted the Google Analytics code in the Custom Code field Before </head> in the Nebula template. However, the code is shown in two lines at the top of the template in front-end.

I can only remove the code from front-end by deleting the code string in back-end.

What do I do wrong?
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
Is it the exact snippet as per Google analytics with the script tags?
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Yes. I have copied it from the Analytics account.
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
Have a link?

Also perhaps add a screenshot of the custom code panel

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
www.abmano.dk/

I cannot upload a screenshot, but the code string I inserted in the Before </head> is (I have made my Analytics account no. neutral):

s-cript
(function(i,s,o,g,r,a,m){i=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-xxxxxxx-x', 'abmano.dk');
ga('send', 'pageview');

/script

Every time I insert a code, a '-' is automatically inserted after 2 characters, e.g. s-cript. This also goes with other codes, and I cannot delete the '-'.
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
The word scrip is enclosed by <>, but I am not allowed to write it in the comments.
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
Try attaching the snippet using a text file in the chrome browser
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
paulus103 wrote:
Try attaching the snippet using a text file in the chrome browser

screenshot.JPG


File Attachment:

File Name: ga.txt
File Size: 0 KB
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
Are you saying the template is stripping or the forum? or both

As that has incomplete js tags
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The forum does not allow the word script enclosed by <>.
The template add a '-' in the string as you can see from the screenshot, and it cannot be deleted.
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
What template version number are you using?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
1.4.0
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
hmm just tried adding a snippet I created and it works ok

What framework version number is installed?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Hi,

Something is modifying the script tags before saving to the database.

Are you running any firewall components?
I think this is something rsfirewall does.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
RSFirewall is installed. How do I bypass this? I am not that pleased to uninstall RSFirewall.
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hi,

I do not use rsfirewall so I am not sure of the exact settings.

You would need to either check the settings and allow the analytics to be saved or check with the component documentation/ask the developers how to allow this.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
FYI - the error was due to RSFirewall, and it was solved by following their instructions on www.rsjoomla.com/support/documentation/view-article/785-scrambled-tags-iframe-becomes-i-frame.html.

Thanks for your help!
  • BBRA's Avatar
  • BBRA
  • 12 Month basic
  • 21 posts
  • 1 Thanks
  • Karma: 0
The administrator has disabled public write access.
The following user(s) said Thank You: manh
Cool - thanks for posting back the solution :)

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers