zz-shopify-components 0.22.1-beta.3 → 0.22.1-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,6 +55,7 @@
55
55
  %}
56
56
  </div>
57
57
  <a
58
+ {% if block.settings.btn_id != blank %}data-track-zz-element="{{ block.settings.btn_id }}"{% endif %}
58
59
  class='tw-block {{ btn_class }} tw-mx-auto tw-mt-[30px] tw-px-[28px] lg:tw-px-[12px] tw-w-fit tw-h-[42px] lg:tw-h-[28px] tw-rounded-[3px] tw-cursor-pointer tw-text-white tw-font-medium tw-text-[16px] lg:tw-text-[14px] tw-leading-[42px] lg:tw-leading-[28px] tw-bg-black tw-transition hover:tw-bg-black/80'
59
60
  style='background: {{ block.settings.btn_bg_color }}; color: {{ block.settings.btn_text_color }};hover: color: {{ block.settings.btn_hover_color }};'
60
61
  href='{{ block.settings.url }}'
@@ -172,6 +173,12 @@
172
173
  "info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
173
174
  "visible_if": "{{ block.settings.function_type == 'link_map' }}"
174
175
  },
176
+ {
177
+ "type": "text",
178
+ "id": "btn_id",
179
+ "label": "统计业务id",
180
+ "info": "用于埋点统计"
181
+ },
175
182
  ],
176
183
 
177
184
  "presets": [
@@ -54,6 +54,7 @@
54
54
  class='tw-block tw-relative tw-text-center {{ btn_class }} tw-w-full tw-mx-auto tw-mt-[30px] tw-h-[24px] lg:tw-h-[34px] tw-rounded-[3px] tw-cursor-pointer tw-text-white tw-font-medium tw-text-[9px] lg:tw-text-[12px] tw-leading-[24px] lg:tw-leading-[34px] tw-bg-black tw-transition hover:tw-bg-black/80'
55
55
  style='background: {{ block.settings.btn_bg_color }}; color: {{ block.settings.btn_text_color }};hover: color: {{ block.settings.btn_hover_color }};'
56
56
  href='{{ block.settings.url }}'
57
+ {% if block.settings.btn_id != blank %}data-track-zz-element="{{ block.settings.btn_id }}"{% endif %}
57
58
  >
58
59
  {{ block.settings.btn_text }}
59
60
  <span class="max-lg:tw-hidden tw-absolute tw-right-[8px] tw-top-[11px]">
@@ -168,6 +169,12 @@
168
169
  "info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
169
170
  "visible_if": "{{ block.settings.function_type == 'link_map' }}"
170
171
  },
172
+ {
173
+ "type": "text",
174
+ "id": "btn_id",
175
+ "label": "统计业务id",
176
+ "info": "用于埋点统计"
177
+ },
171
178
  ],
172
179
 
173
180
  "presets": [
@@ -128,6 +128,12 @@
128
128
  </style>
129
129
 
130
130
  <div
131
+ {% if block.settings.module_id != blank %}
132
+ data-track-zz-block="{{ block.settings.module_id }}"
133
+ {% endif %}
134
+ {% if block.settings.is_exposure != false %}
135
+ data-track-zz-exposure="true"
136
+ {% endif %}
131
137
  class='swiper zz-accessories-swiper'
132
138
  data-id='{{ block.id }}'
133
139
  >
@@ -252,6 +258,20 @@
252
258
  ],
253
259
  "default": "normal"
254
260
  },
261
+ {
262
+ "type": "text",
263
+ "id": "module_id",
264
+ "label": "唯一业务id",
265
+ "info": "需要唯一不要与其他模块重复,用户定位、埋点统计、代码隐藏控制等"
266
+ },
267
+ {
268
+ "type": "checkbox",
269
+ "id": "is_exposure",
270
+ "label": "是否曝光统计",
271
+ "default": false,
272
+ "info": "勾选后会对section模块进行曝光统计埋点, 必须填写唯一业务id"
273
+ },
274
+
255
275
  ],
256
276
  "blocks": [
257
277
  {
@@ -75,6 +75,19 @@
75
75
  "label": "Sites Link 121",
76
76
  "info": "国家对应链接的表,国家即是国家选择器上显示的字段,国家和路由之间用冒号隔开( 冒号后要加空格)。国家之间换行,“default”为其他未写的默认的链接 EG: Canada: https://hoverair.com/ default: https://hoverair.com/ ",
77
77
  "visible_if": "{{ block.settings.shop_select == 'JP' }}"
78
+ },
79
+ {
80
+ "type": "text",
81
+ "id": "module_id",
82
+ "label": "唯一业务id",
83
+ "info": "需要唯一不要与其他模块重复,用户定位、埋点统计、代码隐藏控制等"
84
+ },
85
+ {
86
+ "type": "checkbox",
87
+ "id": "is_exposure",
88
+ "label": "是否曝光统计",
89
+ "default": false,
90
+ "info": "勾选后会对section模块进行曝光统计埋点, 必须填写唯一业务id"
78
91
  },
79
92
  ],
80
93
  "presets": [
@@ -94,6 +107,12 @@
94
107
  data-x121-img='{{block.settings.img_121_icon | image_url}}'
95
108
  data-request-type='{{ block.settings.request_type }}'
96
109
  data-shop-select='{{ block.settings.shop_select }}'
110
+ {% if block.settings.module_id != blank %}
111
+ data-track-zz-block="{{ block.settings.module_id }}"
112
+ {% endif %}
113
+ {% if block.settings.is_exposure != false %}
114
+ data-track-zz-exposure="true"
115
+ {% endif %}
97
116
  >
98
117
  <div class='tw-flex tw-justify-center tw-items-center tw-my-[30px] lg:tw-my-[80px]'>
99
118
 
@@ -400,6 +419,7 @@
400
419
  <div
401
420
  class='tw-flex world-video-learn-more tw-cursor-pointer tw-items-center tw-gap-[12px] tw-bg-white/20 tw-backdrop-blur-[10px] tw-text-white tw-font-medium tw-h-[48px] tw-rounded-[100px] tw-px-[24px]'
402
421
  data-product-type='{product-type}'
422
+ data-track-zz-element="world-video-learn-more" data-track-zz-params="product_type:{product-type};id:{id}"
403
423
  >
404
424
  <img
405
425
  class='product-icon tw-w-[auto] tw-h-[34px]'
@@ -418,6 +438,7 @@
418
438
  <div
419
439
  class='tw-flex world-video-learn-more tw-cursor-pointer tw-items-center tw-gap-[12px] tw-bg-white/20 tw-backdrop-blur-[10px] tw-text-white tw-font-medium tw-h-[36px] tw-rounded-[75px] tw-px-[18px]'
420
440
  data-product-type='{product-type}'
441
+ data-track-zz-element="world-video-learn-more" data-track-zz-params="product_type:{product-type};id:{id}"
421
442
  >
422
443
  <img
423
444
  class='product-icon tw-w-[auto] tw-h-[25px]'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.22.1-beta.3",
3
+ "version": "0.22.1-beta.5",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",
@@ -601,8 +601,15 @@
601
601
  <div
602
602
  id='{{ banner.id }}-bannerlink'
603
603
  data-banner-name="{{ banner.settings.banner_name }}"
604
+ {% if banner.settings.banner_name != blank %}
605
+ data-track-zz-block="{{ banner.settings.banner_name }}"
606
+ data-track-zz-exposure="true"
607
+ {% endif %}
604
608
  class='{{ banner.id }}-site-event swiper-content tw-w-full tw-max-w-screen tw-relative tw-text-left tw-h-full'
605
609
  style="{% if banner.settings.need_btn == false %}cursor: pointer;{% endif %}"
610
+ {% if banner.settings.need_btn == false and banner.settings.banner_name != blank %}
611
+ data-track-zz-element="{{ banner.settings.banner_name }}"
612
+ {% endif %}
606
613
  >
607
614
  {%- if banner.type == 'img' -%}
608
615
  {% render 'zz-img',
@@ -700,6 +707,9 @@
700
707
  {%- if banner.settings.function_type == 'link' -%}
701
708
  <a
702
709
  href='{{ banner.settings.link }}'
710
+ {% if banner.settings.banner_name != blank %}
711
+ data-track-zz-element="{{ banner.settings.banner_name }}"
712
+ {% endif %}
703
713
  class='{{ banner.id }}-site-event tw-w-fit tw-block tw-no-underline tw-h-[48px] max-lg:tw-px-[20px] lg:tw-px-[24px] max-lg:tw-h-[36px] tw-leading-[48px] max-lg:tw-leading-[36px] tw-text-center tw-rounded-full tw-text-[16px] max-lg:tw-text-[13px] max-lg:tw-mx-auto tw-cursor-pointer'
704
714
  style='color: {{ banner.settings.btn_color | default: 'black' }}; border: 1px solid {{ banner.settings.btn_border_color | default: 'white' }}; background: {{ banner.settings.btn_background_color | default: 'white' }}'
705
715
  >
@@ -709,6 +719,9 @@
709
719
  {%- elsif banner.settings.function_type == 'link_map' -%}
710
720
  <div
711
721
  id='{{ banner.id }}-site-btn'
722
+ {% if banner.settings.banner_name != blank %}
723
+ data-track-zz-element="{{ banner.settings.banner_name }}"
724
+ {% endif %}
712
725
  class='{{ banner.id }}-site-event tw-w-fit tw-h-[48px] max-lg:tw-px-[20px] lg:tw-px-[24px] max-lg:tw-h-[36px] tw-leading-[48px] max-lg:tw-leading-[36px] tw-text-center tw-rounded-full tw-text-[16px] max-lg:tw-text-[13px] max-lg:tw-mx-auto tw-cursor-pointer'
713
726
  style='color: {{ banner.settings.btn_color | default: 'black' }}; border: 1px solid {{ banner.settings.btn_border_color | default: 'white' }}; background: {{ banner.settings.btn_background_color | default: 'white' }}'
714
727
  >
@@ -418,6 +418,7 @@
418
418
 
419
419
  <style>
420
420
  #shopify-section-{{section.id}} {
421
+ position: relative;
421
422
  background: {{ section.settings.bg_color }};
422
423
  display: flex;
423
424
  flex-direction: column;