GA Internal Template Fails HTML Validation Check at W3C

Template outputs

<script type="application/javascript">

However, https://validator.w3.org/ informs me that

Warning: The type attribute is unnecessary for JavaScript resources.

What do you guys think about removing this bit as it throws off the validator?

For myself, how do I use a custom GA template rather than the internal one. My GA ID is specified in the Site’s config.toml

You simply create a partial for your GA script and use it in your project’s templates.

Regarding the type attribute this is down to supporting older non HTML5 browsers. I suppose that at some point the type attribute will be removed, but probably not just yet.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.