Announcement

#1 2014-06-30 01:28:51

shami photos
Member
Pakistan
2011-06-20
15

unable to add analytics code in piwigo 2.6.3

Hi support team,
I have an issue in my gallery, I am unable to add my Google analytics code in Footer/Header.
each time message shows {403 Forbidden}
I have tried many ways, Parso footer, Statistics, Add <Head> element, Local file editor
But each time this message displays {403 Forbidden}
I am using this code

<script>
  (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-xxxxxxxx-x', 'auto');
  ga('send', 'pageview');

</script>

and this

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-xxxxxx-x']);
  _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>




Piwigo version: 2.6.3
PHP version:
MySQL version:
Piwigo URL: http://www.shamiphotos.com/gallery

Offline

 

#2 2014-06-30 03:08:18

flop25
Piwigo Team
2006-07-06
7037

Re: unable to add analytics code in piwigo 2.6.3

Hello
this has no sens

Please describe exactly each attempt starting by the easiest one "Add <Head> element" plugin


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2014-06-30 08:24:25

shami photos
Member
Pakistan
2011-06-20
15

Re: unable to add analytics code in piwigo 2.6.3

flop25 wrote:

Hello
this has no sens

Please describe exactly each attempt starting by the easiest one "Add <Head> element" plugin

Dear flop25, I have used "Add <Head> element" but when I click to save, error message shows 403 Forbidden as in screen shot.
I think it dont allow to add any script tag.

Offline

 

#4 2014-06-30 09:25:37

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: unable to add analytics code in piwigo 2.6.3

strange...

there is nothing particular in these plugins (I use Perso Footer without issues)

do other plugins with a config screen work ?

Offline

 

#5 2014-06-30 10:12:19

shami photos
Member
Pakistan
2011-06-20
15

Re: unable to add analytics code in piwigo 2.6.3

mistic100 wrote:

strange...

there is nothing particular in these plugins (I use Perso Footer without issues)

do other plugins with a config screen work ?

But I have used all plugins. But each plugin shows this error message.
Some days ago when I install PIWIGO 2.6.2  at that time there was no issue . All scripts working fine and there were no restriction to add.

But I dont know why this being happen. Is this issue due to some update in piwigo? how can I remove recent updates ?

Last edited by shami photos (2014-06-30 10:13:19)

Offline

 

#6 2014-06-30 12:53:19

benhup
Member
Netherlands
2014-06-25
31

Re: unable to add analytics code in piwigo 2.6.3

Hi shami,

Have you tried plugin "Statistics"?
Find it here: http://nl.piwigo.org/ext/extension_view.php?eid=174

You will be able to select that you want the Analytics code in the footer, when configuring the plugin.

Hope this helps!

Best regards,
Ben

Offline

 

#7 2014-06-30 16:14:55

shami photos
Member
Pakistan
2011-06-20
15

Re: unable to add analytics code in piwigo 2.6.3

I have used all the plugins . thanks Benhup :)


Any body can tell, this issue may occur due to the FTP error of my web host ?
As I have realize my FTP server is not responding.

Offline

 

#8 2014-06-30 16:19:42

shami photos
Member
Pakistan
2011-06-20
15

Re: unable to add analytics code in piwigo 2.6.3

wow. I have succeeded after adding script manually in header.tpl and upload it again in template directory :)
with {literal} tag

thanks all who replies :)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact