Nuxt (SSR)
Initialize
<!-- app.vue -->
<script setup>
import { tiun } from '@tiun/sdk';
import { onMounted, onUnmounted } from 'vue';
onMounted(() => {
if (!tiun.isInitialized) {
tiun.init({
snippetId: 'YOUR_SNIPPET_ID',
language: 'en', // set to your site's language
});
}
});
onUnmounted(() => {
tiun.destroy();
});
</script>
<template>
<NuxtPage />
</template>Checkout
Shared state with useState
useStateGate content
Paywall events (time-based)
Content management (time-based)
Alternative: plugin approach
Last updated
Was this helpful?