gatsby-plugin-smartlook-tracking

1.0.0 • Public • Published

gatsby-plugin-smartlook-tracking

Easily add Smartlook Analytics to your Gatsby site.

Install

yarn add gatsby-plugin-smartlook-tracking

or

npm i gatsby-plugin-smartlook-tracking --save

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-smartlook-tracking`,
    options: {
      includeInDevelopment: true, // optional parameter to include script in development
      id: YOUR_SMARTLOOK_ID,
    },
  },
];

To find your Smartlook ID, go on your dashboard and look at the last line from the snippet of code given:

<script type='text/javascript'>
  window.smartlook||(function(d) {
    var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
    var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
    c.charset='utf-8';c.src='https://rec.smartlook.com/recorder.js';h.appendChild(c);
    })(document);
    smartlook('init', '[your smartlook id]');
</script>```

Package Sidebar

Install

npm i gatsby-plugin-smartlook-tracking

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.07 kB

Total Files

7

Last publish

Collaborators

  • coquardcyr