utm tracking in db (#574)

* utm tracking in db

* fix array key bug
This commit is contained in:
Favour Olayinka
2024-09-18 17:50:04 +01:00
committed by GitHub
parent 7f6c21408c
commit a057045ef6
8 changed files with 44 additions and 1 deletions

View File

@@ -30,6 +30,9 @@
</template>
<script setup>
import { useNuxtApp } from "nuxt/app";
const { $utm } = useNuxtApp();
const router = useRouter()
const route = useRoute()
const authStore = useAuthStore()
@@ -49,7 +52,8 @@ function handleCallback() {
opnFetch(`/oauth/${provider}/callback`, {
method: 'POST',
params: {
code
code,
utm_data: $utm.value
}
}).then(async (data) => {
authStore.setToken(data.token)