tag manager

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

tag manager

sebastian.ovide
Hello all

I'm trying to add google tag manager to geonetwork. There is a piece of
code provided by google to be added just after the <head> so I'm adding it
to base-layout.xsl.

But I'm getting this error:

22-Jan-2020 09:37:19.982 INFO [main]

> org.apache.catalina.startup.Catalina.start Server startup in 50128 ms
>
> Error on line 48 column 51 of base-layout.xsl:
>   SXXP0003: Error reported by XML parser: The reference to entity "l" must
> end with the ';' delimiter.
> 2020-01-22 09:37:21,258 ERROR [jeeves.service] -    -> exception during
> transformation for : catalog.search
> 2020-01-22 09:37:21,268 ERROR [jeeves.service] -    ->  (C) stylesheet :
> /usr/local/tomcat/webapps/geonetwork/xsl/../xslt/ui-search/search.xsl
> 2020-01-22 09:37:21,268 ERROR [jeeves.service] -    ->  (C) message    :
> Failed to compile stylesheet. 1 error detected.
> 2020-01-22 09:37:21,269 ERROR [jeeves.service] -    ->  (C) exception  :
> TransformerConfigurationException
>
> the code provided by google is this (see
https://developers.google.com/tag-manager/quickstart)

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
<!-- End Google Tag Manager -->



any ideas ?

thaks
--
Sebastian E. Ovide

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: tag manager

Francois Prunayre
Hi, "&" should be "&amp;" in the script in XSL

HTH
Francois

Le mer. 22 janv. 2020 à 10:42, Sebastian E. Ovide <[hidden email]>
a écrit :

> Hello all
>
> I'm trying to add google tag manager to geonetwork. There is a piece of
> code provided by google to be added just after the <head> so I'm adding it
> to base-layout.xsl.
>
> But I'm getting this error:
>
> 22-Jan-2020 09:37:19.982 INFO [main]
> > org.apache.catalina.startup.Catalina.start Server startup in 50128 ms
> >
> > Error on line 48 column 51 of base-layout.xsl:
> >   SXXP0003: Error reported by XML parser: The reference to entity "l"
> must
> > end with the ';' delimiter.
> > 2020-01-22 09:37:21,258 ERROR [jeeves.service] -    -> exception during
> > transformation for : catalog.search
> > 2020-01-22 09:37:21,268 ERROR [jeeves.service] -    ->  (C) stylesheet :
> > /usr/local/tomcat/webapps/geonetwork/xsl/../xslt/ui-search/search.xsl
> > 2020-01-22 09:37:21,268 ERROR [jeeves.service] -    ->  (C) message    :
> > Failed to compile stylesheet. 1 error detected.
> > 2020-01-22 09:37:21,269 ERROR [jeeves.service] -    ->  (C) exception  :
> > TransformerConfigurationException
> >
> > the code provided by google is this (see
> https://developers.google.com/tag-manager/quickstart)
>
> <!-- Google Tag Manager -->
> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
> new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
> j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
> '
> https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f)
> ;
> })(window,document,'script','dataLayer','GTM-XXXX');</script>
> <!-- End Google Tag Manager -->
>
>
>
> any ideas ?
>
> thaks
> --
> Sebastian E. Ovide
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: tag manager

sebastian.ovide
perfect, that worked ! thank you

On Wed, 22 Jan 2020 at 09:50, Francois Prunayre <[hidden email]>
wrote:

> Hi, "&" should be "&amp;" in the script in XSL
>
> HTH
> Francois
>
> Le mer. 22 janv. 2020 à 10:42, Sebastian E. Ovide <
> [hidden email]> a écrit :
>
>> Hello all
>>
>> I'm trying to add google tag manager to geonetwork. There is a piece of
>> code provided by google to be added just after the <head> so I'm adding it
>> to base-layout.xsl.
>>
>> But I'm getting this error:
>>
>> 22-Jan-2020 09:37:19.982 INFO [main]
>> > org.apache.catalina.startup.Catalina.start Server startup in 50128 ms
>> >
>> > Error on line 48 column 51 of base-layout.xsl:
>> >   SXXP0003: Error reported by XML parser: The reference to entity "l"
>> must
>> > end with the ';' delimiter.
>> > 2020-01-22 09:37:21,258 ERROR [jeeves.service] -    -> exception during
>> > transformation for : catalog.search
>> > 2020-01-22 09:37:21,268 ERROR [jeeves.service] -    ->  (C) stylesheet :
>> > /usr/local/tomcat/webapps/geonetwork/xsl/../xslt/ui-search/search.xsl
>> > 2020-01-22 09:37:21,268 ERROR [jeeves.service] -    ->  (C) message    :
>> > Failed to compile stylesheet. 1 error detected.
>> > 2020-01-22 09:37:21,269 ERROR [jeeves.service] -    ->  (C) exception  :
>> > TransformerConfigurationException
>> >
>> > the code provided by google is this (see
>> https://developers.google.com/tag-manager/quickstart)
>>
>> <!-- Google Tag Manager -->
>> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
>> new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
>> j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
>> '
>> https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f)
>> ;
>> })(window,document,'script','dataLayer','GTM-XXXX');</script>
>> <!-- End Google Tag Manager -->
>>
>>
>>
>> any ideas ?
>>
>> thaks
>> --
>> Sebastian E. Ovide
>>
>> _______________________________________________
>> GeoNetwork-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
>> GeoNetwork OpenSource is maintained at
>> http://sourceforge.net/projects/geonetwork
>>
>

--
Sebastian E. Ovide

[image: https://www.linkedin.com/in/ovide]
<https://www.linkedin.com/in/ovide>

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork