Created
October 2, 2019 20:24
-
-
Save shansmith01/921cc9eddbec790a9c5f471b8a71770a to your computer and use it in GitHub Desktop.
Example JS in head of gastby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Helmet> | |
<script> | |
{`(function(m,e,w,s){c=m.createElement(e);c.onload=function(){ | |
Mews.D.apply(null,s)};c.async=1;c.src=w;t=m.getElementsByTagName(e)[0];t.parentNode.insertBefore(c,t);}) | |
(document,'script','https://www.mews.li/distributor/distributor.min.js',[['${ | |
data.datoCmsHostel.mewsId | |
}']]);`} | |
</script> | |
<script type="application/ld+json"> | |
{JSON.stringify(schemaOrgJSONLD)} | |
</script> | |
<link rel="dns-prefetch" href="//www.mews.li" /> | |
<link rel="dns-prefetch" href="//cdn.mews.li" /> | |
</Helmet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
I put standard code on the website but it does not work. What am I doing wrong?
<script>(function(m,e,w,s){c=m.createElement(e);c.onload=function(){ Mews.D.apply(null,s)};c.async=1;c.src=w;t=m.getElementsByTagName(e)[0];t.parentNode.insertBefore(c,t);}) (document,'script','https://www.mews.li/distributor/distributor.min.js',[['722f4763-5e69-418f-a8c3-ab660128f107']]);</script>