Skip to main content

Tags

Description

You can add custom CSS and JS scripts in your website created using Fynd Platform. This can be done using tags and you can choose to inject it to either the head or the body of your page source. Get notified on the creation, updation, and deletion of any tag.


Supported Type

  • Create
  • Update
  • Delete

Payload

{
"event":{
"id":"rOcs838XXrj5ef6LoJkfu9y3TTW25tDekAsleAA4Eck=",
"name":"tags",
"type":"create",
"version":"1",
"category":"application",
"trace_id":[
"convex.f4009557-4cb2-46c2-b8f8-769aaf8e8855"
],
"created_timestamp":1661319161914
},
"payload":{
"tags":{
"_id":"606d6b68ccb05f027a4d87ef",
"tags":[
{
"name":"tags event testers123",
"sub_type":"external",
"_id":"616fa41a9fa03d87105b08ca",
"type":"css",
"url":"http://testing.com",
"position":"head"
},
{
"name":"test15feb",
"sub_type":"external",
"_id":"620b5df1ecac59ec615889dd",
"type":"css",
"url":"https://docs.fynd.engineering/docs/Introduction/Setup/faq",
"position":"head"
},
{
"name":"Reviews injection script",
"sub_type":"external",
"_id":"62861ebf748addcb104332ab",
"type":"js",
"position":"body-bottom",
"url":"https://reviews.extensions.fynd.com/api/application/bindings/rating-review/rating-review.umd.min.js",
"__source":{
"type":"extension",
"id":"6242ba839a6e7a3be7078885"
}
},
{
"name":"Reviews injection style",
"sub_type":"external",
"_id":"62861ebf748add44464332af",
"type":"css",
"position":"head",
"url":"https://reviews.extensions.fynd.com/api/application/bindings/rating-review/rating-review.css",
"__source":{
"type":"extension",
"id":"6242ba839a6e7a3be7078885"
}
},
{
"name":"Recommendation style injection",
"sub_type":"external",
"_id":"628b1a7d748add0de043354e",
"type":"css",
"position":"head",
"url":"https://recommendation.extensions.fynd.com/ui/api/bindings/product-recommendation/product-recommendation.css",
"attributes":{
"media":"print",
"onload":"this.media='all'"
},
"__source":{
"type":"extension",
"id":"621ce569cb91ec40e4d6c019"
}
},
{
"name":"Recommendation fetch logic injection",
"sub_type":"external",
"_id":"628b1a7d748adda7d5433552",
"type":"js",
"position":"body-bottom",
"url":"https://recommendation.extensions.fynd.com/ui/api/bindings/product-recommendation/product-recommendation.umd.min.js",
"attributes":{
"async":true
},
"__source":{
"type":"extension",
"id":"621ce569cb91ec40e4d6c019"
}
},
{
"name":"Instagram Feed injection script",
"sub_type":"inline",
"_id":"62d6901343bd9f7f5fc0560a",
"type":"js",
"position":"body-bottom",
"content":"\nasync function initInstagramFeed(el) {\n try {\n var instagramRoot = el;\n var fragment = new DocumentFragment();\n instagramRoot.innerHTML = `\n \n <div class=\"insta-header\">\n Instafeed\n </div>\n\n <div class=\"insta-body\"></div>\n`\n\n var response = await fetch('/ext/instagram-feed/api/media/list');\n var output = await response.json();\n var data = output.data.slice(0, 8);\n var paging = output.paging;\n\n data.forEach(function (d) {\n var imageWrapper = document.createElement('div');\n imageWrapper.setAttribute(\"class\", \"grid-item\");\n \n var img = document.createElement('img');\n img.setAttribute(\"src\", d.media_url);\n imageWrapper.appendChild(img);\n\n \n \n fragment.appendChild(imageWrapper);\n });\n instagramRoot.classList.add(\"remove-shimmer\")\n var instaBody = instagramRoot.querySelector('.insta-body')\n instaBody.appendChild(fragment)\n\n } catch (err) {\n console.log(err)\n }\n\n}\n\n\nFPI.extension.register('#instagram-feed', {\n mounted(el, ...rest) {\n console.log('mounted', rest);\n initInstagramFeed(el);\n }\n});\n\n",
"__source":{
"type":"extension",
"id":"6177fe6d0c2f0dbc3a24e771"
}
},
{
"name":"Instagram Feed injection style",
"sub_type":"inline",
"_id":"62d6901443bd9f2e81c0560e",
"type":"css",
"position":"head",
"content":"\ndiv#instagram-feed {\n margin: 20px;\n height: 545px;\n background: #f6f7f8;\n background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);\n background-repeat: no-repeat;\n position: relative; \n \n -webkit-animation-duration: 1s;\n -webkit-animation-fill-mode: forwards; \n -webkit-animation-iteration-count: infinite;\n -webkit-animation-name: placeholderShimmer;\n -webkit-animation-timing-function: linear;\n}\n@-webkit-keyframes placeholderShimmer {\n 0% {\n background-position: -468px 0;\n }\n \n 100% {\n background-position: 468px 0; \n }\n}\ndiv#instagram-feed.remove-shimmer {\n background-image: inherit;\n}\ndiv#instagram-feed .insta-header {\n display: inline-flex;\n font-weight: 700;\n font-size: 18px;\n text-transform: uppercase;\n margin-bottom: 20px;\n margin-top: 5px;\n height: 20px;\n}\ndiv#instagram-feed .insta-body {\n display: grid;\n grid-template-columns: auto auto auto auto ;\n grid-gap: 0px;\n}\ndiv#instagram-feed .insta-body .grid-item {\n display: inline-grid;\n background: white;\n border: 1px solid #eaeaea;\n}\ndiv#instagram-feed .insta-body .grid-item img {\n display: inline-grid;\n height: 250px;\n width: 100%;\n -o-object-fit: cover;\n object-fit: cover;\n border-style: groove;\n border-color: grey;\n}\ndiv#instagram-feed .insta-body .grid-item .caption {\n font-size: 14px;\n font-weight: 400;\n line-height: 18px;\n height: 68px;\n padding: 5px;\n overflow: hidden;\n}\n",
"__source":{
"type":"extension",
"id":"6177fe6d0c2f0dbc3a24e771"
}
},
{
"name":"google-tag-manager script",
"sub_type":"inline",
"_id":"62dfdcb643bd9f4830c0623f",
"type":"js",
"position":"body-bottom",
"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-XXXXXY\");\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//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}\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 } = 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}\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.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\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}\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\tif (FPI) {\n\t\tObject.keys(FPI_EVENTS).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",
"__source":{
"type":"extension",
"id":"61384111bee79ce4ac848a57"
}
},
{
"_id":"62fb81ec9b42d60f36c3ebfc",
"name":"social script",
"sub_type":"inline",
"type":"js",
"position":"body-bottom",
"content":"\n let socialhtmldata = '<div class=\"social-icon-right-container social-width Down\" style=\"--iconColor:#000000; --bgColor:#ffffff; --gradfirst:#ffffff; --gradsecond:#000000; --hovergradfirst:#ffffff; --hovergradsecond:#000000; --hoverActive:true; --hovericonColor:#000000; --hoverbgColor:#f1f1f1; --bordersize:1px; --borderradius:5%; --borderColor:#000000; --iconSize:40px; --appwidth:300px; --offsetPosition:50%; --iconfontSize:26.6667px;\"><ul class=\"inline-block\"><li class=\"hover None\"><a href=\"https://www.msn.com/en-in/money/technology/google-to-layoff-employees-company-warns-workers-there-will-be-blood-on-streets/ar-AA10FYfJ?ocid=msedgdhp&amp;pc=U531&amp;cvid=5323a02b663f4eb3bf80bc411f8c6aa2\" target=\"_blank\"></a><!----><i class=\"fab fa-behance\"></i></li></ul></div>';\n let socialcssdata = '.social-container .social-icon-right-container.position{position:fixed;z-index: 9999;}.social-icon-right-container.position{position:absolute}.social-icon-right-container.position.Down{overflow:auto;max-height:100%;top:auto;bottom:0;transform:translateX(var(--offsetPosition));right:var(--offsetPosition)}.social-icon-right-container.position.Top{top:0;bottom:auto;transform:translateX(var(--offsetPosition));right:var(--offsetPosition)}.hardDarkShadow{box-shadow:0 3px 1px -2px rgb(0 0 0 / 20%),0 2px 2px 0 rgb(0 0 0 / 14%),0 1px 5px 0 rgb(0 0 0 / 12%);-webkit-box-shadow:0 3px 1px -2px rgb(0 0 0 / 20%),0 2px 2px 0 rgb(0 0 0 / 14%),0 1px 5px 0 rgb(0 0 0 / 12%);-moz-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-ms-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-o-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.softDarkShadow{box-shadow:0 15px 25px rgb(37 51 91 / 10%),0 5px 15px rgb(0 0 0 / 7%);-webkit-box-shadow:0 15px 25px rgb(37 51 91 / 10%),0 5px 15px rgb(0 0 0 / 7%);-moz-box-shadow:0 15px 25px rgba(37,51,91,.1),0 5px 15px rgba(0,0,0,.07);-ms-box-shadow:0 15px 25px rgba(37,51,91,.1),0 5px 15px rgba(0,0,0,.07);-o-box-shadow:0 15px 25px rgba(37,51,91,.1),0 5px 15px rgba(0,0,0,.07)}.hardLightShadow{box-shadow:0 2px 1px -1px rgb(0 0 0 / 5%),0 2px 2px 0 rgb(0 0 0 / 5%),0 1px 5px 0 rgb(0 0 0 / 8%);-webkit-box-shadow:0 2px 1px -1px rgb(0 0 0 / 5%),0 2px 2px 0 rgb(0 0 0 / 5%),0 1px 5px 0 rgb(0 0 0 / 8%);-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.05),0 1px 5px 0 rgba(0,0,0,.08);-ms-box-shadow:0 2px 1px -1px rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.05),0 1px 5px 0 rgba(0,0,0,.08);-o-box-shadow:0 2px 1px -1px rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.05),0 1px 5px 0 rgba(0,0,0,.08)}.softLightShadow{box-shadow:0 3px 9px rgb(0 0 0 / 10%);-webkit-box-shadow:0 3px 9px rgb(0 0 0 / 10%);-moz-box-shadow:0 3px 9px rgba(0,0,0,.1);-ms-box-shadow:0 3px 9px rgba(0,0,0,.1);-o-box-shadow:0 3px 9px rgba(0,0,0,.1)}.socialMediaIcons.vertical .icon,.socialMediaIcons.vertical .powrForIcon{display:block}.social-icon-right-container.position.Left{right:auto;left:0;bottom:0;transform:translateY(var(--offsetPosition));bottom:var(--offsetPosition)}.social-icon-right-container.position.Right{max-height:100%;overflow:auto;left:auto;right:0;bottom:0;transform:translateY(var(--offsetPosition));bottom:var(--offsetPosition)}.social-icon-right-container.social-width{width:var(--appwidth)}.social-icon-right-container li{border-width:var(--bordersize);border-style:solid;border-radius:var(--borderradius);border-color:var(--borderColor);background-color:var(--bgColor);height:var(--iconSize);width:var(--iconSize)}.social-icon-right-container li.grad{background-image:-webkit-linear-gradient(var(--gradfirst),var(--gradsecond));background-image:-o-linear-gradient(var(--gradfirst),var(--gradsecond));background-image:-moz-linear-gradient(var(--gradfirst),var(--gradsecond));background-image:linear-gradient(var(--gradfirst),var(--gradsecond))}.social-icon-right-container li i{color:var(--iconColor);font-size:var(--iconfontSize)}.social-icon-right-container li.hover:hover{background-color:var(--hoverbgColor)}.social-icon-right-container li.hover:hover i{color:var(--hovericonColor)}.social-icon-right-container.bottom{bottom:0}.social-icon-right-container ul{margin:0;padding:0;list-style:none}.social-icon-right-container ul.table{margin:0 auto;display:table}.social-icon-right-container ul.flex{display:flex;align-items:center;justify-content:center}.social-icon-right-container ul li{position:relative;margin:5px}.social-icon-right-container ul li a{position:absolute;top:0;left:0;height:100%;width:100%;z-index:9999}.social-icon-right-container ul.inline-block{text-align:center;width:100%}.social-icon-right-container ul.inline-block li{display:inline-block}.social-icon-right-container.social-width{position:relative;max-height:100%;width:100%;overflow-y:auto;left:50%;transform:translate(-50%,0%)}.social-icon-right-container ul li i{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.social-icon-right-container li.grad.hover:hover{background-image: -webkit-linear-gradient(var(--hovergradfirst),var(--hovergradsecond));background-image: -o-linear-gradient(var(--hovergradfirst),var(--hovergradsecond));background-image: -moz-linear-gradient(var(--hovergradfirst),var(--hovergradsecond));background-image: linear-gradient(var(--hovergradfirst),var(--hovergradsecond));}';\n let social_icon = document.getElementsByTagName('body')[0];\n let social_script = document.createElement('div');\n social_script.setAttribute('class','social-container');\n if (social_icon) {\n social_icon.appendChild(social_script);\n }\n let socialhead = document.getElementsByTagName('head')[0];\n let socialiconlink = document.createElement('link');\n socialiconlink.rel = 'stylesheet';\n socialiconlink.type = 'text/css';\n socialiconlink.href = 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.css';\n socialhead.appendChild(socialiconlink);\n let divselecter = document.getElementsByClassName('social-container')[0];\n divselecter.innerHTML = socialhtmldata;\n let stylecreate = document.createElement('style');\n stylecreate.type = 'text/css';\n stylecreate.innerHTML = socialcssdata;\n divselecter.appendChild(stylecreate);\n ",
"__source":{
"type":"extension",
"id":"61559b2af86eb737f70abce1"
}
}
],
"application":"5d63686df2a4f7806b76bb32",
"__v":178,
"company":"61"
}
},
"contains":[
"tags"
],
"company_id":2,
"application_id":"000000000000000000000001"
}

Object Properties

KeyTypeDescription
applicationStringID of the application where the tags will be injected
tagsArrayList of tags (either CSS/JS) that will be injected
nameStringName given to the tag
sub_typeStringScript is External or Inline?
typeStringScript is CSS or JavaScript?
positionStringScript is injected to head/body-top/body-bottom?