#Insert tracking snippet in Astro for performance metrics

7 messages · Page 1 of 1 (latest)

sharp ermine
#

I am trying to make a case against WordPress. Astro is so much faster than WordPress. I am testing with Pingdom and their "Real User Monitoring". They ask me to put this snippet on my page:

<script src="//rum-static.pingdom.net/pa-671d36847a5fd400120000de.js" async></script>

I am unsure how to do that with Astro in an elegant and efficient way. Any ideas or hints to the docs where I could read this?

sick crane
#

Does it need to be on every page?

#

And do you have a layout file in your project?

if you have a base layout you use for each page you could drop the script in there

#

If you only need it on the landing page for example you could drop it in index.astro

sharp ermine