@@ -140,12 +140,14 @@ export default {
|
||||
emits: ['afterQuickLogin', 'openLogin'],
|
||||
|
||||
setup() {
|
||||
const { $utm } = useNuxtApp()
|
||||
return {
|
||||
authStore: useAuthStore(),
|
||||
formsStore: useFormsStore(),
|
||||
workspaceStore: useWorkspacesStore(),
|
||||
providersStore: useOAuthProvidersStore(),
|
||||
logEvent: useAmplitude().logEvent,
|
||||
$utm
|
||||
}
|
||||
},
|
||||
|
||||
@@ -157,6 +159,7 @@ export default {
|
||||
password_confirmation: "",
|
||||
agree_terms: false,
|
||||
appsumo_license: null,
|
||||
utm_data: null
|
||||
}),
|
||||
disableEmail:false
|
||||
}),
|
||||
@@ -204,6 +207,7 @@ export default {
|
||||
methods: {
|
||||
async register() {
|
||||
let data
|
||||
this.form.utm_data = this.$utm.value
|
||||
try {
|
||||
// Register the user.
|
||||
data = await this.form.post("/register")
|
||||
|
||||
@@ -14,6 +14,7 @@ export default defineNuxtConfig({
|
||||
'@vueuse/motion/nuxt',
|
||||
'nuxt-simple-sitemap',
|
||||
'@nuxt/ui',
|
||||
'nuxt-utm',
|
||||
...process.env.NUXT_PUBLIC_GTM_CODE ? ['@zadigetvoltaire/nuxt-gtm'] : [],
|
||||
],
|
||||
build: {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"nuxt": "^3.9.1",
|
||||
"nuxt-icon": "^0.6.10",
|
||||
"nuxt-simple-sitemap": "^4.2.3",
|
||||
"nuxt-utm": "^0.1.10",
|
||||
"postcss": "^8.4.32",
|
||||
"prettier": "^3.2.5",
|
||||
"sass": "^1.69.6",
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user