Skip to content

Commit

Permalink
Merge branch 'main' into EDU-5661-new-documentation-best-practices
Browse files Browse the repository at this point in the history
  • Loading branch information
mariana-caetano authored Jan 15, 2024
2 parents 53c6b55 + 34b5d5c commit c800fde
Show file tree
Hide file tree
Showing 27 changed files with 642 additions and 182 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.11.5](https://github.com/vtexdocs/devportal/compare/v1.11.4...v1.11.5) (2024-01-12)


### Features

* **faststore/[slug].tsx:** enable seeAlso functionality ([c6f105c](https://github.com/vtexdocs/devportal/commit/c6f105c0da8640340111afb4f7cea20b9292e448))

### [1.11.4](https://github.com/vtexdocs/devportal/compare/v1.11.3...v1.11.4) (2024-01-12)


### Bug Fixes

* **apps:** edit specifiedVersion checks ([8235f61](https://github.com/vtexdocs/devportal/commit/8235f61e247caf94314b347576863ee876022d04))
* **package:** fix path ([665601d](https://github.com/vtexdocs/devportal/commit/665601d618a81d237ae4c5233866aa4b4a80d4a7))
* **sectionitem:** icon usage ([e0862c2](https://github.com/vtexdocs/devportal/commit/e0862c2e1cc6b2738d9427bc55576cb3fc7eb027))


### Docs

* create redirect master data api v2 ([e1a54ad](https://github.com/vtexdocs/devportal/commit/e1a54ad2e06af9eaa35eede2daa48b70abcc7d95))


### Style

* **faststore-components:** improve faststore content rendering styles ([ffd6bc8](https://github.com/vtexdocs/devportal/commit/ffd6bc835a30775f95d7ea430bb0ec7e364dd307))
* **section-item:** update section item styles ([3d0e148](https://github.com/vtexdocs/devportal/commit/3d0e14843b3fdefb64b3ab3b67d81c94367c032e))


### Chore

* **faststore-componentes:** update faststore components and constants ([d57880f](https://github.com/vtexdocs/devportal/commit/d57880fd3d74dc70e87d68e3dd5270d6a374352f))
* **package.json:** update components lib version ([e84365e](https://github.com/vtexdocs/devportal/commit/e84365e903c83f1bc85762fca98b8b23b65251c8))
* **package:** @vtexdocs/components version ([65784fc](https://github.com/vtexdocs/devportal/commit/65784fc61a17f8d5a8998c5a96f6ecf2631877ac))
* **package:** update dependencies ([db61da1](https://github.com/vtexdocs/devportal/commit/db61da110308a1c60f9293065bbf7ea67a33861f))

### [1.11.3](https://github.com/vtexdocs/devportal/compare/v1.11.2...v1.11.3) (2024-01-08)


### Bug Fixes

* **faststore/[slug].tsx:** allows listing faststore docs ([dbac5f8](https://github.com/vtexdocs/devportal/commit/dbac5f8c797bd65cd0425960f52cca565f1a9382))

### [1.11.2](https://github.com/vtexdocs/devportal/compare/v1.11.1...v1.11.2) (2024-01-04)


Expand Down
23 changes: 23 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
external_node_modules = ["sharp"]
included_files = ["node_modules/sharp/**/*", "./github.pem"]

[[redirects]]
force = true
from = "/404/docs/recipes/style/using-css-handles-for-store-customization"
status = 308
to = "/docs/guides/vtex-io-documentation-using-css-handles-for-store-customization"
[[redirects]]
force = true
from = "/docs/guides/vtexbr-buybox-context"
status = 308
to = "/docs/apps/vtexbr.buybox-context"

[[redirects]]
force = true
from = "/docs/apps/vtex.store-icons/iconpack"
Expand Down Expand Up @@ -902,6 +913,12 @@ from = "/api-reference/session-manager-api#overview"
status = 308
to = "/docs/api-reference/session-manager-api"

[[redirects]]
force = true
from = "/reference/session-manager-api-overview"
status = 308
to = "/docs/api-reference/session-manager-api"

[[redirects]]
force = true
from = "/docs/api-reference/using-postman"
Expand All @@ -919,3 +936,9 @@ force = true
from = "/docs/guides/2023-06-06-new-integration-guide-headless-commerce"
status = 308
to = "/updates/release-notes/2023-06-06-new-integration-guide-headless-commerce"

[[redirects]]
force = true
from = "/reference/master-data-api-v2-overview"
status = 308
to = "/docs/api-reference/master-data-api-v2"
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "devportal",
"version": "1.11.2",
"version": "1.11.5",
"private": true,
"engines": {
"npm": "please-use-yarn",
Expand Down Expand Up @@ -35,7 +35,7 @@
"@types/react-svg-pan-zoom": "^3.3.5",
"@types/uuid": "^9.0.0",
"@vtex/brand-ui": "^0.46.1",
"@vtexdocs/components": "https://github.com/vtexdocs/components.git#v1.1.15",
"@vtexdocs/components": "https://github.com/vtexdocs/components.git#v1.4.0",
"algoliasearch": "^4.14.2",
"chalk": "^5.2.0",
"copy-text-to-clipboard": "^3.0.1",
Expand Down
24 changes: 11 additions & 13 deletions public/container-template.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
{
"exportFormatVersion": 2,
"exportTime": "2023-09-18 14:07:56",
"exportTime": "2024-01-09 19:56:30",
"containerVersion": {
"path": "accounts/6003163501/containers/164701425/versions/4",
"path": "accounts/6003163501/containers/164701425/versions/0",
"accountId": "6003163501",
"containerId": "164701425",
"containerVersionId": "4",
"name": "GA4 installation with enriched items data - VTEX v2",
"description": "We added a custom HTML to enrich the items object. \nThis improvement aims to complete the attribution data with information about the promotion banners and/or the list's name.",
"containerVersionId": "0",
"container": {
"path": "accounts/6003163501/containers/164701425",
"accountId": "6003163501",
"containerId": "164701425",
"name": "Google Analytics 4",
"name": "Google Analytics 4 - official container",
"publicId": "GTM-USEYOUROWN",
"usageContext": [
"WEB"
],
"fingerprint": "1693668351144",
"fingerprint": "1695046170433",
"tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/6003163501/containers/164701425/workspaces?apiLink=container",
"features": {
"supportUserPermissions": true,
Expand Down Expand Up @@ -1748,15 +1746,15 @@
{
"type": "TEMPLATE",
"key": "html",
"value": "// The outer self-invoking function serves to encapsulate the logic \n// and avoid polluting the global namespace with the intermediate variables used in the script.\n\n<script> \n (function() {\n function handleDataLayerUpdate(dataLayer) {\n // Get the latest event from the data layer (the last element in the array).\n var latestEvent = dataLayer[dataLayer.length - 1];\n\n // If the event is \"gtm.load\", \"gtm.dom\", or \"gtm.scroll\", use the second latest event instead.\n if (['gtm.load', 'gtm.dom', 'gtm.scroll'].includes(latestEvent.event) && dataLayer.length > 1) {\n latestEvent = dataLayer[dataLayer.length - 2];\n }\n // Get previously stored values from the session storage or set to an empty string if undefined.\n var creativeName = sessionStorage.getItem('creative_name') || \"\";\n var creativeSlot = sessionStorage.getItem('creative_slot') || \"\";\n var itemListName = sessionStorage.getItem('item_list_name') || \"\";\n var promotionName = sessionStorage.getItem('promotion_name') || \"\";\n var promotionId = sessionStorage.getItem('promotion_id') || \"\";\n\n // If the latest event is a 'select_promotion' event, update the session storage \n // with the promotion name and creative slot if they are present in the event data.\n if (latestEvent.event === 'select_promotion') {\n if (latestEvent.ecommerce && latestEvent.ecommerce.promotion_name !== undefined) {\n sessionStorage.setItem('promotion_name', latestEvent.ecommerce.promotion_name);\n }\n if (latestEvent.ecommerce && latestEvent.ecommerce.creative_slot !== undefined) {\n sessionStorage.setItem('creative_slot', latestEvent.ecommerce.creative_slot);\n }\n if (latestEvent.ecommerce && latestEvent.ecommerce.promotion_id !== undefined) {\n sessionStorage.setItem('promotion_id', latestEvent.ecommerce.promotion_id);\n }\n if (latestEvent.ecommerce && latestEvent.ecommerce.creative_name !== undefined) {\n sessionStorage.setItem('creative_name', latestEvent.ecommerce.creative_name);\n }\n }\n \n // If the latest event is a 'select_item' event, update the session storage \n // with the item list name if it is present in the event data.\n if (latestEvent.event === 'select_item') {\n if (latestEvent.ecommerce && latestEvent.ecommerce.item_list_name !== undefined) {\n sessionStorage.setItem('item_list_name', latestEvent.ecommerce.item_list_name);\n }\n }\n \n // If the latest event is one of the listed e-commerce events, \n // enrich the event data with the stored session data.\n if (['add_to_cart', 'remove_from_cart', 'add_to_wishlist', 'view_cart', 'begin_checkout', 'add_shipping_info', 'add_payment_info', 'purchase'].indexOf(latestEvent.event) !== -1) {\n // Create a new object to hold the enriched e-commerce data, starting with the existing data.\n var ecommerce = latestEvent.ecommerce || {};\n var items = ecommerce.items || [];\n // Map over the items array, creating a new array with the enriched data.\n items = items.map(function(item) {\n // Create a new item object, using Object.assign to copy the existing item data.\n var newItem = Object.assign({}, item);\n // If the session storage contains values for promotion name, creative slot, and item list name, \n // add them to the new item object.\n if (creativeName) newItem.promotion_name = promotionName;\n if (creativeName) newItem.creative_name = creativeName;\n if (creativeSlot) newItem.creative_slot = creativeSlot;\n if (creativeSlot) newItem.promotion_slot = promotionId;\n if (itemListName) newItem.item_list_name = itemListName;\n // Return the new item object to be included in the new items array.\n return newItem;\n });\n // Create a new object to hold the enriched e-commerce data.\n var enrichedEcommerceData = {\n coupon: ecommerce.coupon,\n currency: ecommerce.currency,\n payment_type: ecommerce.payment_type,\n shipping: ecommerce.shipping,\n shipping_tier: ecommerce.shipping_tier,\n tax: ecommerce.tax,\n transaction_id: ecommerce.transaction_id,\n value: ecommerce.value,\n items: items,\n };\n // Push a new event to the data layer with the '_enriched' suffix \n // and the enriched e-commerce data.\n dataLayer.push({\n 'event': latestEvent.event + '_enriched',\n 'ecommerce': enrichedEcommerceData\n });\n }\n\n // Clear all data from the session storage after a purchase event\n if (latestEvent.event === 'purchase') {\n sessionStorage.clear();\n }\n }\n\n // Ensure that the data layer array exists on the window object, creating it if necessary.\n window.dataLayer = window.dataLayer || [];\n // Override the push method of the data layer array to include a call to the handleDataLayerUpdate function \n // each time an item is pushed to the data layer.\n window.dataLayer.push = (function(pushOriginal) {\n return function() {\n pushOriginal.apply(window.dataLayer, arguments);\n handleDataLayerUpdate(window.dataLayer);\n };\n })(window.dataLayer.push);\n })();\n</script>"
"value": "<script> \n (function() {\n function handleDataLayerUpdate(dataLayer) {\n // Get the latest event from the data layer (the last element in the array).\n var latestEvent = dataLayer[dataLayer.length - 1];\n\n // If the event is \"gtm.load\", \"gtm.dom\", or \"gtm.scroll\", use the second latest event instead.\n if (['gtm.load', 'gtm.dom', 'gtm.scroll'].includes(latestEvent.event) && dataLayer.length > 1) {\n latestEvent = dataLayer[dataLayer.length - 2];\n }\n // Get previously stored values from the session storage or set to an empty string if undefined.\n var creativeName = sessionStorage.getItem('creative_name') || \"\";\n var creativeSlot = sessionStorage.getItem('creative_slot') || \"\";\n var itemListName = sessionStorage.getItem('item_list_name') || \"\";\n var promotionName = sessionStorage.getItem('promotion_name') || \"\";\n var promotionId = sessionStorage.getItem('promotion_id') || \"\";\n\n // If the latest event is a 'select_promotion' event, update the session storage \n // with the promotion name and creative slot if they are present in the event data.\n if (latestEvent.event === 'select_promotion') {\n if (latestEvent.ecommerce && latestEvent.ecommerce.promotion_name !== undefined) {\n sessionStorage.setItem('promotion_name', latestEvent.ecommerce.promotion_name);\n }\n if (latestEvent.ecommerce && latestEvent.ecommerce.creative_slot !== undefined) {\n sessionStorage.setItem('creative_slot', latestEvent.ecommerce.creative_slot);\n }\n if (latestEvent.ecommerce && latestEvent.ecommerce.promotion_id !== undefined) {\n sessionStorage.setItem('promotion_id', latestEvent.ecommerce.promotion_id);\n }\n if (latestEvent.ecommerce && latestEvent.ecommerce.creative_name !== undefined) {\n sessionStorage.setItem('creative_name', latestEvent.ecommerce.creative_name);\n }\n }\n \n // If the latest event is a 'select_item' event, update the session storage \n // with the item list name if it is present in the event data.\n if (latestEvent.event === 'select_item') {\n if (latestEvent.ecommerce && latestEvent.ecommerce.item_list_name !== undefined) {\n sessionStorage.setItem('item_list_name', latestEvent.ecommerce.item_list_name);\n }\n }\n \n // If the latest event is one of the listed e-commerce events, \n // enrich the event data with the stored session data.\n if (['add_to_cart', 'remove_from_cart', 'add_to_wishlist', 'view_cart', 'begin_checkout', 'add_shipping_info', 'add_payment_info', 'purchase'].indexOf(latestEvent.event) !== -1) {\n // Create a new object to hold the enriched e-commerce data, starting with the existing data.\n var ecommerce = latestEvent.ecommerce || {};\n var items = ecommerce.items || [];\n // Map over the items array, creating a new array with the enriched data.\n items = items.map(function(item) {\n // Create a new item object, using Object.assign to copy the existing item data.\n var newItem = Object.assign({}, item);\n // If the session storage contains values for promotion name, creative slot, and item list name, \n // add them to the new item object.\n if (creativeName) newItem.promotion_name = promotionName;\n if (creativeName) newItem.creative_name = creativeName;\n if (creativeSlot) newItem.creative_slot = creativeSlot;\n if (creativeSlot) newItem.promotion_slot = promotionId;\n if (itemListName) newItem.item_list_name = itemListName;\n // Return the new item object to be included in the new items array.\n return newItem;\n });\n // Create a new object to hold the enriched e-commerce data.\n var enrichedEcommerceData = {\n coupon: ecommerce.coupon,\n currency: ecommerce.currency,\n payment_type: ecommerce.payment_type,\n shipping: ecommerce.shipping,\n shipping_tier: ecommerce.shipping_tier,\n tax: ecommerce.tax,\n transaction_id: ecommerce.transaction_id,\n value: ecommerce.value,\n items: items,\n };\n // Push a new event to the data layer with the '_enriched' suffix \n // and the enriched e-commerce data.\n dataLayer.push({\n 'event': latestEvent.event + '_enriched',\n 'ecommerce': enrichedEcommerceData\n });\n }\n\n // Clear all data from the session storage after a purchase event\n if (latestEvent.event === 'purchase') {\n sessionStorage.clear();\n }\n }\n\n // Ensure that the data layer array exists on the window object, creating it if necessary.\n window.dataLayer = window.dataLayer || [];\n // Override the push method of the data layer array to include a call to the handleDataLayerUpdate function \n // each time an item is pushed to the data layer.\n window.dataLayer.push = (function(pushOriginal) {\n return function() {\n pushOriginal.apply(window.dataLayer, arguments);\n handleDataLayerUpdate(window.dataLayer);\n };\n })(window.dataLayer.push);\n })();\n</script>"
},
{
"type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
],
"fingerprint": "1695045596500",
"fingerprint": "1699982737706",
"firingTriggerId": [
"10",
"28",
Expand Down Expand Up @@ -3111,7 +3109,7 @@
"value": "!!! add your measurement ID !!!"
}
],
"fingerprint": "1694806129431",
"fingerprint": "1695046749888",
"parentFolderId": "3",
"formatValue": {}
}
Expand Down Expand Up @@ -3169,7 +3167,7 @@
"name": "Click ID"
}
],
"fingerprint": "1695045979175",
"tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/6003163501/containers/164701425/versions/4?apiLink=version"
"fingerprint": "1704830190507",
"tagManagerUrl": "https://tagmanager.google.com/#/versions/accounts/6003163501/containers/164701425/versions/0?apiLink=version"
}
}
}
Loading

0 comments on commit c800fde

Please sign in to comment.