Integrating Snowplow to a vue.js application


#1

Good day!

I have a freshly pressed and squeezed vue.js application that would benefit enormously from some analytics being output from it and being pushed towards some collectors somewhere - snowplow would appear to be the best tool - but I find nothing when it comes to vue.js

Is vue.js a supported framework within the snowplow ecosystem?
If not, has anyone adapted snowplow for vue?
If it is supported or packaged nicely somewhere - could someone point me in the right direction?

Many thanks in advance for your help.

Matthew Wooller


#2

Hi @mwooller,

I haven’t tested on vue.js specifically, but sine it’s a javascript framework the javascript tracker is your best bet.

You can test it out by setting up a Snowplow Mini instance and sending some events.

Snowplow Mini is a small-scale real-time instance of Snowplow, which works for smaller volumes. We mostly use it for testing but it is a good way to scope out your tracking. It doesn’t take long to set up - the first time I did it took about 45 minutes with little experience of AWS.

The release notes for Snowplow Mini have some good directions on using the interface.

Good luck!

Best,
Colm


#3

You can definitely use Snowplow from a Vue app using the Javascript tracker as @Colm has mentioned above. Here’s two (non-exhaustive) ways to do this

  • Have a number of methods which utilise the Snowplow Javascript methods to send events
  • Have a number of methods which push (and/or replicate your VueX state) into the dataLayer and use GTM or a tag manager to trigger these events. This method is often much easier if you storing a large number of state details.