[Isis-users] Including Google analytics in Winisis

spinaker spinaker at adinet.com.uy
Thu Jul 2 12:28:46 CEST 2015


Dear Nahed

I don't know what you want to do with this script, but as a general 
syntax rule you should take note of two simple rules

 1. quotes (') are reserved chars in PFT's to declare strings
 2. when you need to use a quote (*'*) inside your function, then you
    have to use inverted quotes (*`*) to declare the function

So, I'd try to enclose your full script between inverted quotes, 
something like this

*`*<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 
<http://www.google-analytics.com/analytics.js>','ga');
   ga('create', 'XXXXXXXX-2', 'auto');
   ga('send', 'pageview');
  </script>*`*


Regards
Ernesto Spinak



El 29/06/2015 a las 9:39, nahed el shazly escribió:
> Dear Sirs,
>
> I was trying to include the following Google analytics code before the 
> </head> tag one of the pfts which yields the results and it seems that 
> it creates a conflict with the script within the file so no results 
> are displayed.  Could you please advise where to add this tag and all 
> the necessary tags needed to run it smoothly.
>
> <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 
> <http://www.google-analytics.com/analytics.js>','ga');
>
>   ga('create', 'XXXXXXXX-2', 'auto');
>   ga('send', 'pageview');
>
> </script>
>
> When I tried to add the code to an external javascript file and refer 
> to it from the pft, I received the following
> WXIS|compiler error|invalid identifier|(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i|
> Looking forward for your feedback.
> Thanks
>
>
> _______________________________________________
> isis-users mailing list
> isis-users at iccisis.org
> To manage your own subscription options go to: http://lists.iccisis.org/listinfo/isis-users
> Or contact Henk Rutten: hlrutten at xs4all.nl


-- 
   .^.                                .^.
   ( )                                ( )
   ===                                ===
  =[=]================================[=]=
   | |  Ernesto Spinak                | |
   | |  spinaker at adinet.com.uy        | |
   | |  Montevideo, Uruguay           | |
   | |  tel/fax  (598) 2622-3352      | |
   | |  celular  (598) 99612238      | |
  =[=]================================[=]=
   ===                                ===
   ( )                                ( )
    V                                  V

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20150702/e9640bd3/attachment.html>


More information about the isis-users mailing list