External script [Clutch Widget] integration

660 views Asked by At

After changing route and come back to the page where it locates, the widget disappears in UI, But reloading the page render the widget. Followed this blog: https://vueschool.io/articles/vuejs-tutorials/how-to-load-third-party-scripts-in-nuxt-js/. But not getting solution.

<div
    class="clutch-widget mt-6"
    data-url="https://widget.clutch.co"
    data-widget-type="1"
    data-height="40"
    data-darkbg="1"
    data-clutchcompany-id="1715171"
  />

    head () {
  return {
    script: [
      {
        hid: 'clutch',
        type: "text/javascript",
        src:"https://widget.clutch.co/static/js/widget.js",
        defer: true,
        // async: false,
        // Changed after script load
        callback: () => {
          console.log('head: ', this.isClutchWidgetLoaded)
          this.isClutchWidgetLoaded = true
         }
      },
    ]
  }
},
0

There are 0 answers