Use Piwik in Nuxt.js application

How do we use the Piwik script and the Javascript API for the custom consent in our Nuxt.js application? We cant seem to reach ppms though we have added the script as first element in the body-tag.

Hi, this is Piotr from the Data Collection & Integrations team at Piwik PRO.

Right now we don’t provide an official integration with Nuxt.js or even Vue.js.

Vue.js is in our backlog for future data sources we want to develop. We’ll add a feature request to make sure we also support Nuxt.js.

In the meantime, let’s wait to see if any member of the community had experience with implementing Piwik PRO in those apps.

Hi! Okay, we don’t actually need a official integration. We just want to know how to implement Piwik with a cookie consent we have built our self. Should we be able to reach the Javascript API via ppms from anywhere when we have the script in place in body and head?

Hi. Usually you only need the asynchronous installation code. Then you can use all our JavaScript APIs directly.

When it comes to integration with some custom consent manager, you could follow this guide: How can I integrate a third-party cookie consent tool with Piwik PRO? | Piwik PRO help center

Hi Emmeli,

There is a number of ways you can go about it.

  1. “I just want to fire specific tags based on consent governed by my 3rd party tool. I don’t care about anything else”
  • disable our consent manager in Administration → select Site or app → Privacy
  • when creating a tag select “doesn’t require consent”
  • when creating a variable and trigger make sure to listen to your 3rd party CMP API whether consent for such tag has been granted
  1. “I want to be able to use your consent settings within your tag manager and see opt-in rates in analytics”
  1. “I don’t use a 3rd party vendor. I created my own solution and want to integrate it with your CMP API”

Let me know which route you took and if you need any more help with it!