Uncaught TypeError: Cannot read properties of undefined (reading ‘seriesTypes’)

What’s the problem in my code?

pay attention to the word function

enter image description here

enter image description here

enter image description here

    <script type="text/javascript">
  (function(m,e,t,r,i,k,a){m[i]=m[i]function(){(m[i].a=m[i].a[]).push(arguments)};
  m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
  (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");

  ym(87351386, "init", {
       clickmap:true,
       trackLinks:true,
       accurateTrackBounce:true
  });
</script>