Browse Source

added segment identify

master
Spencer Flagg 3 years ago
parent
commit
5fd505e6e5
4 changed files with 42 additions and 6 deletions
  1. +7
    -6
      assets/css/main.css
  2. +13
    -0
      pages/dates.vue
  3. +14
    -0
      pages/flights.vue
  4. +8
    -0
      pages/go.vue

+ 7
- 6
assets/css/main.css View File

@ -1,3 +1,9 @@
:root {
--m-s: 0.1s;
--h-s: 0.3s;
--d: calc(var(--h-s) - var(--m-s));
}
html, html,
body, body,
#__nuxt, #__nuxt,
@ -56,12 +62,6 @@ main {
overflow: hidden; overflow: hidden;
} }
:root {
--m-s: 0.1s;
--h-s: 0.3s;
--d: calc(var(--h-s) - var(--m-s));
}
.nav--hide { .nav--hide {
transition: padding-top var(--m-s) linear var(--h-s), max-height var(--h-s) linear 0s; transition: padding-top var(--m-s) linear var(--h-s), max-height var(--h-s) linear 0s;
padding-top: 0; padding-top: 0;
@ -179,6 +179,7 @@ main {
.flyout .vs__dropdown-toggle { .flyout .vs__dropdown-toggle {
background: #eee; background: #eee;
border-radius: 1.2rem 1.2rem 1.2rem 1.2rem; border-radius: 1.2rem 1.2rem 1.2rem 1.2rem;
padding: 0;
} }
.flyout .vs--open .vs__dropdown-toggle { .flyout .vs--open .vs__dropdown-toggle {

+ 13
- 0
pages/dates.vue View File

@ -92,6 +92,19 @@ export default {
return mappedDows return mappedDows
} }
}, },
mounted () {
this.$segment.page('dates');
this.$segment.track('dates__mount-page', {
origin: this.$route.params.o,
destination: this.$route.params.d
});
const emailCookie = this.$cookies.get('email')
if(emailCookie){
this.$segment.identify(emailCookie, {
email: emailCookie
});
}
},
created () { created () {
// console.log(this.$route.path) // console.log(this.$route.path)

+ 14
- 0
pages/flights.vue View File

@ -370,6 +370,20 @@ export default {
this.schedules = [...data.records] this.schedules = [...data.records]
}, },
mounted () {
this.$segment.page('flights');
this.$segment.track('flights__mount-page', {
origin: this.$route.params.o,
destination: this.$route.params.d,
departureDate: this.$route.params.departure,
});
const emailCookie = this.$cookies.get('email')
if(emailCookie){
this.$segment.identify(emailCookie, {
email: emailCookie
});
}
},
created () { created () {
// console.log(this.$route.path) // console.log(this.$route.path)

+ 8
- 0
pages/go.vue View File

@ -238,6 +238,14 @@ export default {
}, },
mounted () { mounted () {
this.$segment.page('go');
const emailCookie = this.$cookies.get('email')
if(emailCookie){
this.$segment.identify(emailCookie, {
email: emailCookie
});
}
// //const cookieRes = await fetch( "http://" + process.env.LOCAL_IP + ":" + process.env.LOCAL_PORT + '/login/check', { method: 'GET' }) // //const cookieRes = await fetch( "http://" + process.env.LOCAL_IP + ":" + process.env.LOCAL_PORT + '/login/check', { method: 'GET' })
// //await console.log(cookieRes.json()) // //await console.log(cookieRes.json())
//console.log('asdf') //console.log('asdf')

Loading…
Cancel
Save