Application

Events categorised under application/sales channel level will be triggered when any action performed for sales channel. e.g. If new Coupon is created for sales channel.

Tags

This event will be generated where there is any action done on tags

Events
application/tags/create/v1
# this event is triggered when tag is created
application/tags/update/v1
# this event is triggered when tag is updated
application/tags/delete/v1
# this event is triggered when tag is deleted

Tags/tags/create/v1

this event is triggered when tag is created

Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "required": [
77 "tags"
78 ],
79 "properties": {
80 "tags": {
81 "type": "object",
82 "required": [
83 "_id",
84 "tags",
85 "application",
86 "__v",
87 "company"
88 ],
89 "properties": {
90 "__v": {
91 "type": "integer"
92 },
93 "_id": {
94 "type": "string"
95 },
96 "tags": {
97 "type": "array",
98 "items": {
99 "type": "object",
100 "required": [
101 "sub_type",
102 "type",
103 "position"
104 ],
105 "properties": {
106 "_id": {
107 "type": "string"
108 },
109 "name": {
110 "type": "string",
111 "description": "Name given to the tag"
112 },
113 "type": {
114 "type": "string",
115 "description": "Type of Tag - whether it is CSS or JavaScript"
116 },
117 "content": {
118 "type": "string"
119 },
120 "position": {
121 "type": "string",
122 "description": "Position at which the tag is injected in HTML - whether it's in the head, body-top, or body-bottom"
123 },
124 "sub_type": {
125 "type": "string",
126 "description": "Tag is external or inline"
127 },
128 "template": {
129 "type": "object",
130 "properties": {
131 "template_id": {
132 "type": "string",
133 "description": "Unique identifier for the template linked to the tag."
134 },
135 "template_version": {
136 "type": "string",
137 "description": "Version number of the template used for configuration."
138 },
139 "template_fields": {
140 "type": "array",
141 "description": "List of dynamic key-value pairs defining configuration fields for third-party integrations or custom settings.",
142 "items": {
143 "type": "object",
144 "properties": {
145 "key": {
146 "type": "string",
147 "description": "Field name representing the configuration key."
148 },
149 "value": {
150 "type": "string",
151 "description": "vValue assigned to the configuration field."
152 }
153 }
154 }
155 }
156 }
157 }
158 }
159 },
160 "description": "List of tags (either CSS/JS) that will be injected into website's HTML"
161 },
162 "company": {
163 "type": "string"
164 },
165 "application": {
166 "type": "string",
167 "description": "sales channel ID corresponding to the website into which the tags will be injected"
168 }
169 }
170 }
171 }
172 }
173 }
174}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "convex.b29bc7b6-9a60-4f5d-96b6-a9e6d129bdee"
5 ],
6 "name": "tags",
7 "type": "create",
8 "version": "1",
9 "created_timestamp": 1712125495190,
10 "id": "rGjRf4A2C2mkahzmomK37QWiEepFrFRkIveWaaCxMJY=",
11 "category": "application"
12 },
13 "company_id": 6811,
14 "application_id": "65c1ed4d877d97b7884b2f23",
15 "contains": [
16 "tags"
17 ],
18 "payload": {
19 "tags": {
20 "_id": "65e591f4a2bc1056c18962c7",
21 "application": "65c1ed4d877d97b7884b2f23",
22 "company": "6811",
23 "tags": [
24 {
25 "content": "let startTime = Date.now();\nfunction visenzeCallback () {\n\twindow.visenzeSearchWidget = window.visenzeWidget4447;\n\tconsole.debug('visenzeSearchWidget is initialized in ' + (Date.now() - startTime) + 'ms');\n}\n\nfunction visenzeCallbackMobile () {\n\twindow.visenzeSearchWidgetMobile = window.visenzeWidget4447;\n\tconsole.debug('visenzeSearchWidgetMobile is initialized in ' + (Date.now() - startTime) + 'ms');\n}\n\n!function(x,e,t,n,r,i,a){var o=localStorage.getItem(\"va-uid\")||function x(){let e=new Date().getTime(),t=\"xxxxxxxx.xxxx.4xxx.yxxx.xxxxxxxxxxxx\".replace(/[xy]/g,x=>{let t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(\"x\"===x?t:3&t|8).toString(16)});return t}(),c=x.getElementsByTagName(e)[0],d=x.createElement(e),g=new URL(`https://search-dev.visenze.com/v2/widget-init?app_key=${t}&placement_id=${n}&container=${r}&uid=${o}`);i&&(g+=`&contexts=${i}`),d.async=!0,d.src=g,d.onload=function(){a&&a()},c.parentNode.insertBefore(d,c)}(document,\"script\",\"e227b0969dbe12985bd62b047fdcbea2\",\"4447\",\".ps-widget-4447\", \"\", visenzeCallback);\n\n!function(x,e,t,n,r,i,a){var o=localStorage.getItem(\"va-uid\")||function x(){let e=new Date().getTime(),t=\"xxxxxxxx.xxxx.4xxx.yxxx.xxxxxxxxxxxx\".replace(/[xy]/g,x=>{let t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),(\"x\"===x?t:3&t|8).toString(16)});return t}(),c=x.getElementsByTagName(e)[0],d=x.createElement(e),g=new URL(`https://search-dev.visenze.com/v2/widget-init?app_key=${t}&placement_id=${n}&container=${r}&uid=${o}`);i&&(g+=`&contexts=${i}`),d.async=!0,d.src=g,d.onload=function(){a&&a()},c.parentNode.insertBefore(d,c)}(document,\"script\",\"e227b0969dbe12985bd62b047fdcbea2\",\"4447\",\".ps-widget-4447-mobile\", \"\", visenzeCallbackMobile);\n\nwindow.addEventListener('load', function() {\n const searchWidgetContainerDesktop = document.createElement('div');\n\t\tsearchWidgetContainerDesktop.classList.add('ps-widget-4447');\n \n const searchWidgetContainerMobile = document.createElement('div');\n\t\tsearchWidgetContainerMobile.classList.add('ps-widget-4447-mobile');\n \n\t\tconst iconContainers = document.querySelectorAll('.right');\n \n iconContainers[0].appendChild(searchWidgetContainerDesktop);\n iconContainers[1].appendChild(searchWidgetContainerMobile);\n \n \t\tsetTimeout(() => {\n \tvisenzeSearchWidget.rerender();\n visenzeSearchWidgetMobile.rerender();\n }, 100)\n});",
26 "_id": "660397f64f419feb069eda82",
27 "name": "visenze-search-widget",
28 "type": "js",
29 "sub_type": "inline",
30 "compatible_engines": [
31 "vue2",
32 "react"
33 ],
34 "position": "body-bottom",
35 "pages": [
36 {
37 "page_slug": "about-us",
38 "type": "system"
39 }
40 ],
41 "template": {
42 "template_id": "2311",
43 "template_version": "v3",
44 "template_fields": [
45 {
46 "key": "src",
47 "value": "https://cdn.example.com/script.js"
48 },
49 {
50 "key": "integrity",
51 "value": "sha384-abc123..."
52 },
53 {
54 "key": "source",
55 "value": "ads"
56 },
57 {
58 "key": "priority",
59 "value": "high"
60 }
61 ]
62 }
63 },
64 {
65 "url": "https://e711-158-140-146-52.ngrok-free.app/widget-scripts/add-to-cart.js",
66 "_id": "660cc0824803612f66e4a2cb",
67 "name": "ViSenze Add to Cart tracking script",
68 "type": "js",
69 "sub_type": "external",
70 "compatible_engines": [],
71 "position": "body-bottom",
72 "pages": [
73 {
74 "page_slug": "product",
75 "type": "system"
76 }
77 ],
78 "__source": {
79 "type": "extension",
80 "id": "65e54deed85c58b8a10696c8"
81 },
82 "template": {
83 "template_id": "2311",
84 "template_version": "v3",
85 "template_fields": [
86 {
87 "key": "src",
88 "value": "https://cdn.example.com/script.js"
89 },
90 {
91 "key": "integrity",
92 "value": "sha384-abc123..."
93 },
94 {
95 "key": "source",
96 "value": "ads"
97 },
98 {
99 "key": "priority",
100 "value": "high"
101 }
102 ]
103 }
104 },
105 {
106 "url": "https://e711-158-140-146-52.ngrok-free.app/widget-scripts/transaction.js",
107 "_id": "660cc0824803612f66e4a2cc",
108 "name": "ViSenze Transaction tracking script",
109 "type": "js",
110 "sub_type": "external",
111 "compatible_engines": [],
112 "position": "body-bottom",
113 "pages": [
114 {
115 "page_slug": "order-status",
116 "type": "system"
117 }
118 ],
119 "__source": {
120 "type": "extension",
121 "id": "65e54deed85c58b8a10696c8"
122 },
123 "template": {
124 "template_id": "2311",
125 "template_version": "v3",
126 "template_fields": [
127 {
128 "key": "src",
129 "value": "https://cdn.example.com/script.js"
130 },
131 {
132 "key": "integrity",
133 "value": "sha384-abc123..."
134 },
135 {
136 "key": "source",
137 "value": "ads"
138 },
139 {
140 "key": "priority",
141 "value": "high"
142 }
143 ]
144 }
145 },
146 {
147 "url": "https://e711-158-140-146-52.ngrok-free.app/widget-scripts/add-to-cart.js",
148 "_id": "660cc0a35c786cf7642da90c",
149 "name": "ViSenze Add to Cart tracking script",
150 "type": "js",
151 "sub_type": "external",
152 "compatible_engines": [],
153 "position": "body-bottom",
154 "pages": [
155 {
156 "page_slug": "product",
157 "type": "system"
158 }
159 ],
160 "__source": {
161 "type": "extension",
162 "id": "65e54deed85c58b8a10696c8"
163 },
164 "template": {
165 "template_id": "2311",
166 "template_version": "v3",
167 "template_fields": [
168 {
169 "key": "src",
170 "value": "https://cdn.example.com/script.js"
171 },
172 {
173 "key": "integrity",
174 "value": "sha384-abc123..."
175 },
176 {
177 "key": "source",
178 "value": "ads"
179 },
180 {
181 "key": "priority",
182 "value": "high"
183 }
184 ]
185 }
186 },
187 {
188 "url": "https://e711-158-140-146-52.ngrok-free.app/widget-scripts/transaction.js",
189 "_id": "660cc0a35c786cf7642da90d",
190 "name": "ViSenze Transaction tracking script",
191 "type": "js",
192 "sub_type": "external",
193 "compatible_engines": [],
194 "position": "body-bottom",
195 "pages": [
196 {
197 "page_slug": "order-status",
198 "type": "system"
199 }
200 ],
201 "__source": {
202 "type": "extension",
203 "id": "65e54deed85c58b8a10696c8"
204 },
205 "template": {
206 "template_id": "2311",
207 "template_version": "v3",
208 "template_fields": [
209 {
210 "key": "src",
211 "value": "https://cdn.example.com/script.js"
212 },
213 {
214 "key": "integrity",
215 "value": "sha384-abc123..."
216 },
217 {
218 "key": "source",
219 "value": "ads"
220 },
221 {
222 "key": "priority",
223 "value": "high"
224 }
225 ]
226 }
227 },
228 {
229 "content": "matches=window.location.href.match(/\\d+$/);if(matches){window.visenzeProductId=matches[0]};!function(e,t,a,n,s,r){e[s]=e[s]||[];var c=new URLSearchParams(e.location.search).get(r)||a.getItem(r),i=t.getElementsByTagName(n)[0],o=t.createElement(n),p=new URL(\"https://search-dev.visenze.com/v2/deploy-configs?app_key=24e66d09959a664193ca7a09a88eddfc\");c&&(p.searchParams.append(\"debug_id\",c),a.setItem(r,c)),o.async=!0,o.src=p,i.parentNode.insertBefore(o,i)}(window,document,localStorage,\"script\",\"visenzeLayer\",\"visenzeDebugId\");\n",
230 "_id": "660cf6375c786cf7642db71a",
231 "name": "ViSenze Recommendations Tag",
232 "type": "js",
233 "sub_type": "inline",
234 "compatible_engines": [
235 "vue2",
236 "react"
237 ],
238 "position": "head",
239 "pages": [],
240 "template": {
241 "template_id": "2311",
242 "template_version": "v3",
243 "template_fields": [
244 {
245 "key": "src",
246 "value": "https://cdn.example.com/script.js"
247 },
248 {
249 "key": "integrity",
250 "value": "sha384-abc123..."
251 },
252 {
253 "key": "source",
254 "value": "ads"
255 },
256 {
257 "key": "priority",
258 "value": "high"
259 }
260 ]
261 }
262 }
263 ],
264 "__v": 353
265 }
266 }
267}

Tags/tags/update/v1

this event is triggered when tag is updated

Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "required": [
77 "tags"
78 ],
79 "properties": {
80 "tags": {
81 "type": "object",
82 "required": [
83 "_id",
84 "tags",
85 "application",
86 "company",
87 "__v"
88 ],
89 "properties": {
90 "__v": {
91 "type": "integer"
92 },
93 "_id": {
94 "type": "string"
95 },
96 "tags": {
97 "type": "array",
98 "items": {
99 "type": "object",
100 "required": [
101 "sub_type",
102 "type",
103 "position"
104 ],
105 "properties": {
106 "_id": {
107 "type": "string"
108 },
109 "name": {
110 "type": "string",
111 "description": "Name given to the tag"
112 },
113 "type": {
114 "type": "string",
115 "description": "Type of Tag - whether it is CSS or JavaScript"
116 },
117 "content": {
118 "type": "string"
119 },
120 "position": {
121 "type": "string",
122 "description": "Position at which the tag is injected in HTML - whether it's in the head, body-top, or body-bottom"
123 },
124 "sub_type": {
125 "type": "string",
126 "description": "Tag is external or inline"
127 },
128 "template": {
129 "type": "object",
130 "properties": {
131 "template_id": {
132 "type": "string",
133 "description": "Unique identifier for the template linked to the tag."
134 },
135 "template_version": {
136 "type": "string",
137 "description": "Version number of the template used for configuration."
138 },
139 "template_fields": {
140 "type": "array",
141 "description": "List of dynamic key-value pairs defining configuration fields for third-party integrations or custom settings.",
142 "items": {
143 "type": "object",
144 "properties": {
145 "key": {
146 "type": "string",
147 "description": "Field name representing the configuration key."
148 },
149 "value": {
150 "type": "string",
151 "description": "vValue assigned to the configuration field."
152 }
153 }
154 }
155 }
156 }
157 }
158 }
159 },
160 "description": "List of tags (either CSS/JS) that will be injected into website's HTML"
161 },
162 "company": {
163 "type": "string"
164 },
165 "application": {
166 "type": "string",
167 "description": "ID of the application where the tags will be injected"
168 }
169 }
170 }
171 }
172 }
173 }
174}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "convex.0a3110ae-fd89-4273-9797-c5ab12496d6d"
5 ],
6 "name": "tags",
7 "type": "update",
8 "version": "1",
9 "created_timestamp": 1712080722856,
10 "id": "5jnqTqcIiT54IoMnYVuX3HrZ0gmA2Fb6FS7Zz0Iglgg=",
11 "category": "application"
12 },
13 "company_id": 884,
14 "application_id": "000000000000000000000001",
15 "contains": [
16 "tags"
17 ],
18 "payload": {
19 "tags": {
20 "_id": "5f7c37b2dd0144bb3a353c5f",
21 "tags": [],
22 "application": "000000000000000000000001",
23 "company": "884",
24 "__v": 328
25 }
26 }
27}

Tags/tags/delete/v1

this event is triggered when tag is deleted

Payload
Hide
application_id
array|string
Required
sales channel ID for which this event is triggered
company_id
integer
Required
company ID for which this event is triggered
contains
array of string
Required
This array will have all the keys present at root level of 'payload' object
event
object
Required
Show
payload
object
Required
Show
Payload Schema JSON
1{
2 "type": "object",
3 "required": [
4 "company_id",
5 "contains",
6 "event",
7 "payload",
8 "application_id"
9 ],
10 "properties": {
11 "application_id": {
12 "type": [
13 "array",
14 "string"
15 ],
16 "description": "sales channel ID for which this event is triggered"
17 },
18 "company_id": {
19 "type": "integer",
20 "description": "company ID for which this event is triggered"
21 },
22 "contains": {
23 "type": "array",
24 "description": "This array will have all the keys present at root level of 'payload' object",
25 "items": {
26 "type": "string"
27 }
28 },
29 "event": {
30 "type": "object",
31 "required": [
32 "category",
33 "created_timestamp",
34 "id",
35 "name",
36 "trace_id",
37 "type",
38 "version"
39 ],
40 "properties": {
41 "category": {
42 "type": "string",
43 "description": "category of the event. If it is at sales channel level or company level"
44 },
45 "created_timestamp": {
46 "type": "integer",
47 "description": "event generation timestamp in epoch milliseconds"
48 },
49 "id": {
50 "type": "string",
51 "description": "Unique ID for an event. This id can be used to verifiy if event is already processed by receiver"
52 },
53 "name": {
54 "type": "string",
55 "description": "Name of the event"
56 },
57 "trace_id": {
58 "type": "array",
59 "description": "internal trace_id for Fynd Platform services",
60 "items": {
61 "type": "string"
62 }
63 },
64 "type": {
65 "type": "string",
66 "description": "Type/Action of the event. e.g. create/update/delete"
67 },
68 "version": {
69 "type": "string",
70 "description": "Version of the event."
71 }
72 }
73 },
74 "payload": {
75 "type": "object",
76 "required": [
77 "tags"
78 ],
79 "properties": {
80 "tags": {
81 "type": "object",
82 "required": [
83 "_id",
84 "tags",
85 "application",
86 "__v",
87 "company"
88 ],
89 "properties": {
90 "__v": {
91 "type": "integer"
92 },
93 "_id": {
94 "type": "string"
95 },
96 "tags": {
97 "type": "array",
98 "items": {
99 "type": "object",
100 "required": [
101 "sub_type",
102 "type",
103 "position"
104 ],
105 "properties": {
106 "_id": {
107 "type": "string"
108 },
109 "url": {
110 "type": "string"
111 },
112 "name": {
113 "type": "string",
114 "description": "Name given to the tag"
115 },
116 "type": {
117 "type": "string",
118 "description": "Type of Tag - whether it is CSS or JavaScript"
119 },
120 "__source": {
121 "type": "object",
122 "required": [
123 "type",
124 "id"
125 ],
126 "properties": {
127 "id": {
128 "type": "string"
129 },
130 "type": {
131 "type": "string"
132 }
133 }
134 },
135 "position": {
136 "type": "string",
137 "description": "Position at which the tag is injected in HTML - whether it's in the head, body-top, or body-bottom"
138 },
139 "sub_type": {
140 "type": "string",
141 "description": "Tag is external or inline"
142 },
143 "template": {
144 "type": "object",
145 "properties": {
146 "template_id": {
147 "type": "string",
148 "description": "Unique identifier for the template linked to the tag."
149 },
150 "template_version": {
151 "type": "string",
152 "description": "Version number of the template used for configuration."
153 },
154 "template_fields": {
155 "type": "array",
156 "description": "List of dynamic key-value pairs defining configuration fields for third-party integrations or custom settings.",
157 "items": {
158 "type": "object",
159 "properties": {
160 "key": {
161 "type": "string",
162 "description": "Field name representing the configuration key."
163 },
164 "value": {
165 "type": "string",
166 "description": "vValue assigned to the configuration field."
167 }
168 }
169 }
170 }
171 }
172 }
173 }
174 },
175 "description": "List of tags (either CSS/JS) that will be injected into website's HTML"
176 },
177 "company": {
178 "type": "string"
179 },
180 "application": {
181 "type": "string",
182 "description": "ID of the application where the tags will be injected"
183 }
184 }
185 }
186 }
187 }
188 }
189}
Payload Example
1{
2 "event": {
3 "trace_id": [
4 "convex.08534137-207d-43f6-82f2-9c9f520a0cb5"
5 ],
6 "name": "tags",
7 "type": "delete",
8 "version": "1",
9 "created_timestamp": 1711756917053,
10 "id": "ZAvbgni3n6DoCiODbxFaQtVi98KDABAW5g+JeLpRt/I=",
11 "category": "application"
12 },
13 "company_id": 61,
14 "application_id": "5eb2e60f5de52793c06ea942",
15 "contains": [
16 "tags"
17 ],
18 "payload": {
19 "tags": {
20 "_id": "6260f08e18b4b059ec1c44ea",
21 "tags": [
22 {
23 "url": "https://meta.extensions.fynd.com/js/injector.js?APP_SLUG=mp-extension&__release=v0.0.0-000000",
24 "_id": "63fe51fb1ec4e70bdced5a69",
25 "name": "meta-dispatch-script",
26 "type": "js",
27 "sub_type": "external",
28 "compatible_engines": [],
29 "position": "body-bottom",
30 "pages": [],
31 "__source": {
32 "type": "extension",
33 "id": "63c0edae2fc3d4ceb700d520"
34 }
35 },
36 {
37 "content": "\n\t<!-- Google Tag Manager -->\n\t\t(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n\t\tnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n\t\tj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n\t\t'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n\t\t})(window,document,'script','dataLayer',\"GTM-12389\");\n\t<!-- End Google Tag Manager -->\n\n\t// Data layer script\n\tconst listener = () => {\n\tconst FPI_EVENTS = {\n\t\t//USER\n\t\tLOG_IN: 'user.login',\n \tLOG_OUT: 'user.logout',\n\t\t//USER\n\t\tPROFILE_UPDATE: 'user.update',\n\t\t//PLP\n\t\tPRODUCT_LIST_VIEW: 'product_list.view',\n\t\tCOLLECTION_LIST_VIEW: 'collection_list.view',\n\t\tPRODUCT_LIST_CLICK: 'product_list.click',\n\t\tPRODUCT_FILTER: 'product_list.filter',\n\t\tPRODUCT_SORT: 'product_list.sort',\n\t\t// PDP\n\t\tPRODUCT_DETAIL_PAGE_VIEW: 'product.view',\n\t\tNOTIFY_PRODUCT: 'notify.product',\n\t\tADD_TO_COMPARE: 'compare.add',\n\t\tREMOVE_FROM_COMPARE: 'compare.remove',\n\t\tADD_TO_WISHLIST: 'wishlist.add',\n\t\tREMOVE_FROM_WISHLIST: 'wishlist.remove',\n\t\t// CART\n\t\tVIEW_CART: 'cart.view',\n\t\tADD_TO_CART: 'cart.newProduct',\n\t\tREMOVE_FROM_CART: 'cart.remove',\n\t\tUPDATE_CART: 'cart.update',\n\t\t// ORDER\n\t\tORDER_CHECKOUT: 'order.checkout',\n\t\tADD_PAYMENT_INFORMATION: 'order.payment_information',\n\t\tADD_ADDRESS_INFORMATION: 'order.address_information',\n\t\tORDER_PROCESSED: 'order.processed',\n\t\tORDER_TRACKING_VIEW: 'order_tracking.view',\n\t\t// REFUND\n\t\tREFUND_SUCCESS: 'refund.success',\n\t\t// SEARCH\n\t\tSEARCH_PRODUCTS: 'search.products',\n\t\tPINCODE_SERVICEABILITY: 'pincode.serviceablility'\n\t};\n\n\tconst getGTMEventName = (event) => {\n\t\tconst GTM_EVENTS = {\n\t\t\t[FPI_EVENTS.PRODUCT_DETAIL_PAGE_VIEW]: 'view_item',\n\t\t\t[FPI_EVENTS.ADD_TO_CART]: 'add_to_cart',\n\t\t\t[FPI_EVENTS.REMOVE_FROM_CART]: 'remove_from_cart',\n\t\t\t[FPI_EVENTS.ORDER_CHECKOUT]: 'begin_checkout',\n\t\t\t[FPI_EVENTS.ORDER_PROCESSED]: 'purchase',\n\t\t\t[FPI_EVENTS.REFUND_SUCCESS]: 'refund',\n\t\t\t[FPI_EVENTS.PRODUCT_LIST_VIEW]: 'view_item_list',\n\t\t\t[FPI_EVENTS.COLLECTION_LIST_VIEW]:'view_collection',\n\t\t\t[FPI_EVENTS.ADD_TO_WISHLIST]: 'add_to_wishlist',\n\t\t\t[FPI_EVENTS.VIEW_CART]: 'view_cart',\n\t\t\t[FPI_EVENTS.SEARCH_PRODUCTS]: 'products_searched',\n\t\t\t[FPI_EVENTS.ADD_PAYMENT_INFORMATION] : 'add_payment_info',\n\t\t\t[FPI_EVENTS.ADD_ADDRESS_INFORMATION]: 'add_shipping_info',\n\t\t\t[FPI_EVENTS.LOG_IN]: 'login',\n \t\t[FPI_EVENTS.LOG_OUT]: 'logout',\n\t\t\t[FPI_EVENTS.PROFILE_UPDATE]: 'profile_update'\n\t\t}\n\t\treturn GTM_EVENTS[event] || 'not_known'\n\t}\n\tconst transformData = (event, eventData) => {\n\t\tlet payload = {}\n\t\tswitch (event) {\n\t\t\tcase FPI_EVENTS.SEARCH_PRODUCTS: {\n\t\t\t\tconst { search_text } = eventData;\n\t\t\t\tpayload = {\n\t\t\t\t\t'query': search_text\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.LOG_IN: {\n\t\t\t\tconst { user_id, login_value, method, gender, phone_number, email } = eventData;\n\t\t\t\tpayload = {\n\t\t\t\t\t'user_id': user_id,\n\t\t\t\t\t'login_value': login_value,\n\t\t\t\t\t'method': method,\n\t\t\t\t\t'gender': gender,\n\t\t\t\t\t'email': email,\n\t\t\t\t\t'phone_number': phone_number\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.LOG_OUT: {\n\t\t\t\tconst { user_id, phone, email } = eventData;\n\t\t\t\tpayload = {\n\t\t\t\t\t'user_id': user_id,\n\t\t\t\t\t'phone': phone,\n\t\t\t\t\t'email': email\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.PROFILE_UPDATE: {\n\t\t\t\tconst { gender, email, phone_number, user_id} = eventData;\n\t\t\t\tpayload = {\n\t\t\t\t\t'user_id': user_id,\n\t\t\t\t\t'gender': gender,\n\t\t\t\t\t'email': email,\n\t\t\t\t\t'phone_number': phone_number\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.ADD_TO_WISHLIST: {\n\t\t\t\tconst { item } = eventData;\n\t\t\t\tlet item_category = \"\"\n\t\t\t\tif(item.categories && item.categories.length) {\n\t\t\t\t\titem_category = item.categories[0].name\n\t\t\t\t}\n\t\t\t\tpayload.items = [{\n\t\t\t\t\t'item_id': item.uid,\n\t\t\t\t\t'item_name': item.name,\n\t\t\t\t\t'currency': \"INR\",\n\t\t\t\t\t'discount': item.discount,\n\t\t\t\t\t'item_brand': item.brand? item.brand.name : '',\n\t\t\t\t\titem_category,\n\t\t\t\t\t'price': item.price ? item.price.effective.max : '',\n\t\t\t\t\t'quantity': 1\n\t\t\t\t}];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.REMOVE_FROM_WISHLIST: {\n\t\t\t\tconst { item } = eventData;\n\t\t\t\tlet item_category = \"\"\n\t\t\t\tif(item.categories && item.categories.length) {\n\t\t\t\t\titem_category = item.categories[0].name\n\t\t\t\t}\n\t\t\t\tpayload.items = [{\n\t\t\t\t\t'item_id': item.uid,\n\t\t\t\t\t'item_name': item.name,\n\t\t\t\t\t'currency': \"INR\",\n\t\t\t\t\t'discount': item.discount,\n\t\t\t\t\t'item_brand': item.brand.name,\n\t\t\t\t\titem_category,\n\t\t\t\t\t'price': item.price && item.price.effective.max,\n\t\t\t\t\t'quantity': 1\n\t\t\t\t}];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.PRODUCT_DETAIL_PAGE_VIEW: {\n\t\t\t\tconst { product } = eventData;\n\t\t\t\tpayload.items = [{\n\t\t\t\t\t'item_name': product.name,\n\t\t\t\t\t'item_id': product.uid,\n\t\t\t\t\t'item_brand': product.brand.name,\n\t\t\t\t\t'item_category': product.category.name,\n\t\t\t\t\t'price': product.price.max,\n\t\t\t\t\t'quantity': 1,\n\t\t\t\t\t'currency': 'INR'\n\t\t\t\t}]\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.PRODUCT_LIST_VIEW: {\n\t\t\t\tconst {items} = eventData;\n\t\t\t\tconst itemsOfListing = [];\n\t\t\t\titems.forEach(item => {\n\t\t\t\t\tlet item_category = \"\"\n\t\t\t\t\tif(item.categories && item.categories.length) {\n\t\t\t\t\t\titem_category = item.categories[0].name\n\t\t\t\t\t}\n\t\t\t\t\tlet objectToBePushed = {\n\t\t\t\t\t\t'item_id': item.item_code ? item.item_code : '',\n\t\t\t\t\t\t'item_name': item.name ? item.name : '',\n\t\t\t\t\t\t'currency': 'INR',\n\t\t\t\t\t\t'discount': item.discount ? item.discount : '',\n\t\t\t\t\t\t'item_brand': item.brand.name ? item.brand.name : '',\n\t\t\t\t\t\t'price': item.price.effective.max ? item.price.effective.max : '',\n\t\t\t\t\t\t'quantity': 1,\n\t\t\t\t\t\t'item_list_name': eventData.name || 'Product Listing',\n\t\t\t\t\t\t'item_list_id': eventData.slug || eventData.url || 'listing_page',\n\t\t\t\t\t\t'item_uid': item.uid ? item.uid : '',\n\t\t\t\t\t\titem_category\n\t\t\t\t\t};\n\t\t\t\t\titemsOfListing.push(objectToBePushed);\n\t\t\t\t})\n\t\t\t\tpayload.item_list_name = eventData.name || 'Product Listing';\n\t\t\t\tpayload.item_list_id = eventData.slug || eventData.url || 'listing_page';\n\t\t\t\tpayload.items = itemsOfListing;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.COLLECTION_LIST_VIEW: {\n\t\t\t\tpayload.items = [\n\t\t\t\t\t{\n\t\t\t\t\t\titem_list_name: eventData.name || 'Product Listing',\n \t\t\t\t\titem_list_id: eventData.slug || eventData.url || 'listing_page'\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.ADD_TO_CART: {\n\t\t\t\tconst {cart_id, products} = eventData;\n\t\t\t\tlet itemsToBePushed = [];\n\t\t\t\tproducts.forEach(product => itemsToBePushed.push({\n\t\t\t\t\t'item_id': product.uid,\n\t\t\t\t\t'item_name': product.name,\n\t\t\t\t\t'currency': 'INR',\n\t\t\t\t\t'item_brand': product.brand.name,\n\t\t\t\t\t'price': product.price.effective,\n\t\t\t\t\t'quantity': product.quantity.current,\n\t\t\t\t\t'item_category': product.category.name\n\t\t\t\t}))\n\t\t\t\tpayload.items = itemsToBePushed;\n\t\t\t\tpayload.cart_id = cart_id;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.ORDER_CHECKOUT: {\n\t\t\t\tconst { products, cart_id, breakup_values } = eventData;\n\t\t\t\tconst itemsOfBag = [];\n\t\t\t\tproducts.forEach(product => {\n\t\t\t\t\tlet objectToBePushed = {\n\t\t\t\t\t\t'item_id': product.uid,\n\t\t\t\t\t\t'item_name': product.name,\n\t\t\t\t\t\t'currency': 'INR',\n\t\t\t\t\t\t'discount': product.discount,\n\t\t\t\t\t\t'item_brand': product.brand.name,\n\t\t\t\t\t\t'price': product.price ? product.price.effective : '',\n\t\t\t\t\t\t'quantity': product.quantity.current,\n\t\t\t\t\t\t'item_category': product.category.name\n\t\t\t\t\t};\n\t\t\t\t\titemsOfBag.push(objectToBePushed);\n\t\t\t\t})\n\t\t\t\tpayload.value = breakup_values.raw.subtotal\n\t\t\t\tpayload.cart_id = cart_id;\n\t\t\t\tpayload.items = itemsOfBag;\n\t\t\t\tpayload.coupon = breakup_values.raw.coupon;\n\t\t\t\tpayload.coupon_code = breakup_values.coupon.code;\n\t\t\t\tpayload.shipping = breakup_values.raw.delivery_charge;\n\t\t\t\tpayload.discount = breakup_values.raw.discount;\n\t\t\t\tpayload.currency = 'INR';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.ADD_PAYMENT_INFORMATION: {\n\t\t\t\tconst payment_information = eventData;\n\t\t\t\tpayload.currency = \"INR\";\n\t\t\t\tpayload.value = payment_information.value;\n\t\t\t\tpayload.coupon = payment_information.coupon.coupon_code;\n\t\t\t\tpayload.payment_type = payment_information.payment.payment_type;\n\t\t\t\tpayload.shipping = payment_information.delivery_charges;\n\t\t\t\tpayload.cart_id = payment_information.cart.cart_id;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.ADD_ADDRESS_INFORMATION: {\n\t\t\t\tconst payment_information = eventData;\n\t\t\t\tpayload.currency = \"INR\";\n\t\t\t\tpayload.value = payment_information.value;\n\t\t\t\tpayload.coupon = payment_information.coupon.coupon_code;\n\t\t\t\tpayload.pincode = payment_information.pincode;\n\t\t\t\tpayload.cart_id = payment_information.cart.cart_id;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.REMOVE_FROM_CART: {\n\t\t\t\tconst {cart_id, products} = eventData;\n\t\t\t\tlet itemsToBePushed = [];\n\t\t\t\tproducts.forEach(product => itemsToBePushed.push({\n\t\t\t\t\t'item_id': product.uid,\n\t\t\t\t\t'item_name': product.name,\n\t\t\t\t\t'currency': 'INR',\n\t\t\t\t\t'discount': product.discount,\n\t\t\t\t\t'item_brand': product.brand.name,\n\t\t\t\t\t'price': product.price ? product.price.effective : '',\n\t\t\t\t\t'quantity': product.quantity.current,\n\t\t\t\t\t'item_category': product.category.name\n\t\t\t\t}))\n\t\t\t\tpayload.items = itemsToBePushed;\n\t\t\t\tpayload.cart_id = cart_id;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.VIEW_CART: {\n\t\t\t\tconst { cart_id, products, breakup_values_raw } = eventData;\n\t\t\t\tpayload.cart_id = cart_id;\n\t\t\t\tlet itemsToBePushed = [];\n\t\t\t\tproducts.forEach(product => {\n\t\t\t\t\tlet objectToBePushed = {\n\t\t\t\t\t\t'item_id': product.uid,\n\t\t\t\t\t\t'item_name': product.name,\n\t\t\t\t\t\t'currency': 'INR',\n\t\t\t\t\t\t'discount': product.discount,\n\t\t\t\t\t\t'item_brand': product.brand.name,\n\t\t\t\t\t\t'price': product.price ? product.price.effective : '',\n\t\t\t\t\t\t'quantity': product.quantity.current,\n\t\t\t\t\t\t'item_category': product.category.name\n\t\t\t\t\t};\n\t\t\t\t\titemsToBePushed.push(objectToBePushed);\n\t\t\t\t})\n\t\t\t\tpayload.currency = 'INR';\n\t\t\t\tpayload.value = breakup_values_raw.subtotal\n\t\t\t\tpayload.items = itemsToBePushed;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.UPDATE_CART: {\n\t\t\t\tconst { cart_id, products, operation } = eventData;\n\t\t\t\tpayload.items = products.map(product => {\n\t\t\t\t\tconst price = product.price_per_unit.converted.effective\n\t\t\t\t\tconst quantity = product.quantity.current;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'item_name': product.name,\n\t\t\t\t\t\t'item_id': product.uid,\n\t\t\t\t\t\t'item_brand': product.brand.name,\n\t\t\t\t\t\t'item_category': product.category.name,\n\t\t\t\t\t\t'price': !isNaN(price * quantity) ? (price * quantity).toFixed(2) : '',\n\t\t\t\t\t\t'quantity': product.quantity.current,\n\t\t\t\t\t\t'currency': 'INR',\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tpayload.cart_id = cart_id;\n\t\t\t\tpayload.event_action = operation === 'increment_quantity' ? FPI_EVENTS.ADD_TO_CART : operation === 'decrement_quantity' ? FPI_EVENTS.REMOVE_FROM_CART : event\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.ORDER_PROCESSED: {\n\t\t\t\tconst order_data = eventData;\n\t\t\t\tpayload.transaction_id = order_data.order_id,\n\t\t\t\tpayload.value = order_data.breakup_values_raw.total;\n\t\t\t\tpayload.shipping = order_data.breakup_values_raw.delivery_charges;\n\t\t\t\tpayload.currency = 'INR';\n\t\t\t\tpayload.coupon = order_data.breakup_values_raw.coupon\n\t\t\t\tpayload.items = order_data.items.map(product => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'item_name': product.name,\n\t\t\t\t\t\t'item_id': product.id,\n\t\t\t\t\t\t'item_brand': product.brand.name,\n\t\t\t\t\t\t'item_price': product.price,\n\t\t\t\t\t\t'item_quantity': product.quantity,\n\t\t\t\t\t\t'item_category': product.l1_categories || [],\n\t\t\t\t\t\t'item_category2': product.l2_categories || [],\n\t\t\t\t\t\t'item_category3': product.l3_category_name ? [product.l3_category_name] : [],\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase FPI_EVENTS.REFUND_SUCCESS: {\n\t\t\t\tconst { refund_data } = eventData;\n\t\t\t\tconst shipments = refund_data.statuses[0].shipments\n\t\t\t\tpayload.transaction_id = Object.keys(shipments)[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tpayload = eventData\n\t\t}\n\t\treturn payload;\n\t}\n\n\tconst pushToDataLayer = (event, eventData) => {\n\t\tconst payload = transformData(event, eventData);\n\t\tevent = payload.event_action ? payload.event_action : event;\n\t\tevent = getGTMEventName(event);\n\t\tif(event === 'not_known') return\n\t\tdataLayer.push({ ecommerce: null });\n\t\tpayload.userAgent = window.navigator.userAgent;\n\t\tdataLayer.push({\n\t\t\tevent,\n\t\t\tecommerce: payload,\n\t\t});\n\t};\n\n\n\tfunction getSkipEvents (){\n\t\tlet result = [];\n\t\ttry {\n\t\t\t\n\t\t\tresult = gtmeGetFPISkipEvents();\n\t\t\n\t\t} catch(e){\n\t\t\tconsole.log(\"NO_FILTERED_LOGIC_FOUND\");\n\t\t\tresult = []\n\t\t}\n\t\treturn result;\n\t}\n\n\n\tif (FPI) {\n\t\tObject.keys(FPI_EVENTS).filter((ev) => {\n\t\t\tconst skipEvents = getSkipEvents();\n\t\t\treturn skipEvents && skipEvents.includes(ev)? false: true\n\t\t}).forEach((event) => {\n\t\t\tFPI.event.on(FPI_EVENTS[event], (eventData) => {\n\t\t\t\tconsole.log(`FPI ${event}`);\n\t\t\t\tpushToDataLayer(FPI_EVENTS[event], eventData);\n\t\t\t});\n\t\t});\n\t}\n}\n\tlistener()\n\t\n\t",
38 "_id": "64dde81b619b84f27f4a896d",
39 "name": "google-tag-manager script",
40 "type": "js",
41 "sub_type": "inline",
42 "compatible_engines": [],
43 "position": "body-bottom",
44 "pages": [],
45 "__source": {
46 "type": "extension",
47 "id": "61384111bee79ce4ac848a57"
48 }
49 },
50 {
51 "url": "https://reviews.extensions.fynd.com/api/application/bindings/rating-review/rating-review.umd.min.js",
52 "_id": "660486ae8c301c79b83cafcb",
53 "name": "Reviews injection script",
54 "type": "js",
55 "sub_type": "external",
56 "compatible_engines": [],
57 "position": "body-bottom",
58 "pages": [],
59 "__source": {
60 "type": "extension",
61 "id": "6242ba839a6e7a3be7078885"
62 }
63 },
64 {
65 "url": "https://reviews.extensions.fynd.com/api/application/bindings/rating-review/rating-review.css",
66 "_id": "660486ae4f419feb069efde9",
67 "name": "Reviews injection style",
68 "type": "css",
69 "sub_type": "external",
70 "compatible_engines": [],
71 "position": "head",
72 "pages": [],
73 "__source": {
74 "type": "extension",
75 "id": "6242ba839a6e7a3be7078885"
76 }
77 }
78 ],
79 "application": "5eb2e60f5de52793c06ea942",
80 "company": "61",
81 "__v": 24
82 }
83 }
84}