From 1011c34d19e91577f00627ff6409d73e130edd95 Mon Sep 17 00:00:00 2001 From: William Chong Date: Tue, 5 Nov 2024 19:50:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=88=20Set=20ll=5Fmedium=20for=20intern?= =?UTF-8?q?al=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Footer.vue | 9 ++++++++- src/components/NFTBook/ItemCardV2.vue | 7 +++++++ src/components/SiteHeader.vue | 7 ++++++- src/mixins/nft-or-collection.js | 6 ++++++ src/mixins/utm.js | 7 ++++++- src/pages/index.vue | 7 ++++++- src/pages/store/index.vue | 16 ++++++++++++++++ 7 files changed, 55 insertions(+), 4 deletions(-) diff --git a/src/components/Footer.vue b/src/components/Footer.vue index a5d84395e..9ae286415 100644 --- a/src/components/Footer.vue +++ b/src/components/Footer.vue @@ -65,7 +65,14 @@
{{ $t('footer_nav_store_books') }} diff --git a/src/components/NFTBook/ItemCardV2.vue b/src/components/NFTBook/ItemCardV2.vue index 83141ab61..8ecf9b0bb 100644 --- a/src/components/NFTBook/ItemCardV2.vue +++ b/src/components/NFTBook/ItemCardV2.vue @@ -67,6 +67,10 @@ export default { type: Boolean, default: true, }, + medium: { + type: String, + default: '', + }, }, data() { return { @@ -74,6 +78,9 @@ export default { }; }, computed: { + linkMedium() { + return this.medium || undefined; + }, classId() { return this.itemId.startsWith('likenft1') ? this.itemId : ''; }, diff --git a/src/components/SiteHeader.vue b/src/components/SiteHeader.vue index 5da43908c..21b848a9d 100644 --- a/src/components/SiteHeader.vue +++ b/src/components/SiteHeader.vue @@ -23,7 +23,12 @@
@@ -421,6 +422,7 @@ class-cover-frame-aspect-ratio="min-h-[360px] laptop:min-h-[0] aspect-[4/5]" :cover-resize="300" :is-link-disabled="item.isMultiple" + medium="index_grid_item" @click-cover="handleClickItem($event, item)" /> @@ -452,6 +454,7 @@ @@ -571,7 +574,9 @@ name: 'store', query: { tag: 'autograph', - utm_source: 'landing_page_signature_banner_cta', + utm_medium: + $route.query.utm_medium || + 'landing_page_signature_banner_cta', }, }) " diff --git a/src/pages/store/index.vue b/src/pages/store/index.vue index ce95bbfc8..2fd222cf9 100644 --- a/src/pages/store/index.vue +++ b/src/pages/store/index.vue @@ -309,6 +309,7 @@ :item-id="item.classId" class-cover-frame-aspect-ratio="aspect-[4/5]" :is-link-disabled="item.isMultiple" + :medium="linkMedium" @click-cover="handleClickItem($event, item)" /> @@ -717,6 +718,21 @@ export default { } return baseUrl; }, + linkMedium() { + const { + query: { ll_medium: qsMedium, tag, q }, + } = this.$route; + if (qsMedium) { + return qsMedium; + } + if (tag) { + return `tag-${tag}`; + } + if (q) { + return 'search'; + } + return 'listing'; + }, // Price filter related priceFilterList() { return [