1"use strict";(globalThis.webpackChunkbambuser_docs||=[]).push([[1740],{47740(e,n,r){r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"conversionTracking","title":"Conversion tracking","description":"Deprecated legacy Conversion Tracker reference: _bamls_* cookies, window._bambuser.track(\'purchase\'), GTM template, subdomain checkout, /metric verification.","source":"@site/shoppable-video/conversionTracker.mdx","sourceDirName":".","slug":"/conversion-tracking","permalink":"/docs/shoppable-video/conversion-tracking","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"conversionTracking","title":"Conversion tracking","description":"Deprecated legacy Conversion Tracker reference: _bamls_* cookies, window._bambuser.track(\'purchase\'), GTM template, subdomain checkout, /metric verification.","sidebar_label":"Conversion tracking","slug":"conversion-tracking"}}');var i=r(74848),t=r(28453),a=(r(86025),r(4865)),o=r(19365);const c={id:"conversionTracking",title:"Conversion tracking",description:"Deprecated legacy Conversion Tracker reference: _bamls_* cookies, window._bambuser.track('purchase'), GTM template, subdomain checkout, /metric verification.",sidebar_label:"Conversion tracking",slug:"conversion-tracking"},l=void 0,d={},h=[{value:"Legacy Conversion Tracker",id:"legacy-conversion-tracker",level:2},{value:"How it works",id:"how-it-works",level:2},{value:"Cookies",id:"cookies",level:2},{value:"Option 1 Integration",id:"option-1-integration",level:2},{value:"Option 2: Integration through GTM template",id:"option-2-integration-through-gtm-template",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Installing the Bambuser Live Shopping tag",id:"installing-the-bambuser-live-shopping-tag",level:3},{value:"Set up a tag",id:"set-up-a-tag",level:3},{value:"Checkout on a subdomain",id:"checkout-on-a-subdomain",level:2},{value:"Configure cookie expiry time",id:"configure-cookie-expiry-time",level:2},{value:"Verification",id:"verification",level:2},{value:"Troubleshoot",id:"troubleshoot",level:2},{value:"Conversion tracking FAQ",id:"conversion-tracking-faq",level:2}];function u(e){const n={a:"a",admonition:"admonition",br:"br",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{title:"Note:",type:"danger",children:(0,i.jsxs)(n.p,{children:["Deprecated documentation. Please refer to the new ",(0,i.jsx)(n.a,{href:"/live/shopper-events-tracking",children:"Shopper Events Tracking"})," documentation."]})}),"\n",(0,i.jsx)(n.h2,{id:"legacy-conversion-tracker",children:"Legacy Conversion Tracker"}),"\n",(0,i.jsxs)(n.p,{children:["This documentation has been deprecated and replaced by the new ",(0,i.jsx)(n.a,{href:"/live/shopper-events-tracking",children:"Shopper Events Tracking"})," documentation."]}),"\n",(0,i.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"A viewer watches a Shoppable Video on your website"}),"\n",(0,i.jsx)(n.li,{children:"Cookies get set in the viewer's browser"}),"\n",(0,i.jsx)(n.li,{children:"The viewer completes a purchase and lands on the order confirmation page"}),"\n",(0,i.jsx)(n.li,{children:"The Bambuser conversion tracker runs and checks the cookies"}),"\n",(0,i.jsx)(n.li,{children:"If cookies are valid, order data will be sent to Bambuser"}),"\n",(0,i.jsx)(n.li,{children:"Conversion data will be reflected in the Bambuser dashboard"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"cookies",children:"Cookies"}),"\n",(0,i.jsx)(n.p,{children:"The Bambuser player automatically sets the cookies below. These cookies are used by the Bambuser Conversion Tracker to find out whether a purchase should be tracked for the user. If the below cookies exist and are valid, the purchase is considered as a conversion and is tracked to the Bambuser conversion statistics.\nIf cookies are restricted, removed, or expired, Bambuser Conversion Tracker does not track the purchase."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Expiration date"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"_bamls_cuid"}),(0,i.jsx)(n.td,{children:"1 year"}),(0,i.jsx)(n.td,{children:"Unique identifier for the merchant. Used as a common denominator for all tracking performed by Bambuser to easily enable reporting and workspaces per merchant."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"_bamls_usid"}),(0,i.jsx)(n.td,{children:"1 year"}),(0,i.jsx)(n.td,{children:"Unique identifier for a user. Used to attribute Bambuser statistics to a single site user."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"_bamls_seid"}),(0,i.jsx)(n.td,{children:"30 min"}),(0,i.jsx)(n.td,{children:"Unique identifier for a session in which a Bambuser show or video was watched. Used in tracking to attribute statistics to a single session."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"_bamls_lcte"}),(0,i.jsxs)(n.td,{children:["30 days ",(0,i.jsx)(n.a,{href:"/shoppable-video/bam-playlist-integration#3-configuring-playlist-layout-and-behavior",children:"(Configurable)"})]}),(0,i.jsx)(n.td,{children:"Structured data containing expiry timestamps for relevant server locations after which purchases will no longer be applicable for conversion tracking."})]})]})]}),"\n",(0,i.jsx)("br",{}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"Cookies are automatically set by the Bambuser Player and Calls Widget. Refer to the relevant product documentation to see the cookies that they set."})}),"\n",(0,i.jsxs)(n.h2,{id:"option-1-integration",children:["Option 1",":Direct"," Integration"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.img,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA/wD/AP+gvaeTAAADe0lEQVRoge2aS0wTQRjH/7udLbQ8Q7woUqJwMJpwlAQtLelJo0FNuJPoxQt6EY/AzchJvXrwjlGjEU9ano0SSY0JJyQEjXgq8pBHu7sdD/phgT52Z2bBA7/Tbrv7zf+X2e3O7BQ45GDRvCjalVipS9v++xpwEQA4MFzmy/QOtdUsqW5LucC1yc1GO4s4gBO7vpr36eh4di6woLI9pQKXJzZDGkdcA04WOORrNovoq0hgXlWbygQchCeUSigRcBGeUCYhLSAQnlAiISUgEZ6QltBFT1QQHgBCuo6R8NN0i2gBIQFF4QEAqVkWWp7xT7c9NttFznd9CSkOj9QsAwCwclhV9VYsccMYc1PDlYBX4QkRCccCXocn3Eo4Etiv8IQbiZIC+x2ecCpRVOCgwhNOJAoKHHR4opREXoH/JTxRTGLPg0xleA70m+vaG9k61hbY2nf2Nt/DbkcPqA7/MhwYAIDWR9bw6qLvgmzNfD2xLdCVWKnL2P6P2DuTco0GDLwIB/pzPzv70BpZ++GLyNY2yrl1pDFz6l13+RyQcwmZtn8QHoUHgKkeFq06ao/K1je3NLb603hN+9sC/O8EXAYO9OcLT0z1sGj1MVv6nkiv6s20nXsTc9nCGrRAqWM4R1C6Hf4vam4PDMsWBvjdK+ObBXtA1X3gr+aztL0tUObL9AKQnqNyoC+fhMqbuLrOvET72wJDbTVLyPIIgDnZRjjQ1zm+dY/2VYVn5bAq6+0Y/QIBeZ7ERV5MuUYDBhaTRlRNeG7VHLc7Jq4bE7va2Evn6EYDdC0OoEmm0VSSYSOlYzMjPPUGUHwoUXAwJyuRSjKkPv0ZAwUassISQoM5QlQiNzwhIiE1nCbcSuQLT7iRUDKhIZxKFAtPOJFQOqUkSkk4CU8Uk/BkUk8UknATnsgn4elrFWK3hEh4IldiX15sESSRSrIm0fBEoCELU9eFwgMSb6c7nqTPpKb9SXMdhmgNADAquBU8bUff3zQmRc4XfkTGu8tmqkNmmFVyU7QGC8KqbLJjouEBBQsc5wczrSvf2Lj1S3PVEywIq6rZiiVuu79sclGyxORWQlV4QOEin1MJleEBxcuspSRUhwc8WOhuf2C2LX/xjZrr2o7fV6OCW7XNdmTslpFQ2Z4nfzVoHUy3WMvseWZZbwQAf212gdVaVz/cKfvsRXuHHCS/AfZ9DbHn44mSAAAAAElFTkSuQmCC",alt:"GTM"})," If you are using Google Tag Manager, see ",(0,i.jsx)(n.a,{href:"#option-2-integration-through-gtm-template",children:"Bambuser LiveShopping GTM template"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"The implementation is as simple as adding the below JavaScript code to your 'order confirmation' page. Additionally, you only need to populate the order information to the code."}),"\n",(0,i.jsxs)(a.A,{defaultValue:"global-servers",values:[{label:"Global Servers",value:"global-servers"},{label:"EU Specific Servers",value:"eu-servers"}],children:[(0,i.jsxs)(o.A,{value:"global-servers",children:[(0,i.jsx)(n.admonition,{title:"Global Servers",type:"note",children:(0,i.jsxs)(n.p,{children:["Tracking library URL is different depending on location of servers that your workspace is set up on. Use Global servers URL ",(0,i.jsx)(n.code,{children:"https://cdn.liveshopping.bambuser.com/metrics/bambuser.min.js"})," if the login to your Bambuser workspace is on following link: ",(0,i.jsx)(n.a,{href:"https://lcx.bambuser.com/",children:"https://lcx.bambuser.com/"}),"."]})}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:" <script>\n // Your existing purchase handling function\n function onPurchase() {\n\n const data = {\n eventType: 'purchase',\n transaction: {\n id: 'abcd',\n subtotal: 70.99,\n currency: 'USD',\n total: 74.98,\n tax: 14.2,\n shippingCost: 3.99,\n shippingMethod: 'Store pickup',\n coupon: 'SUMMER_SALE',\n },\n products: [\n {\n id: '314-7216-102',\n name: 'Tennis Shoe Classic - Size 10',\n image: 'https://example.com/images/314-7216-102.jpg',\n price: 70.99,\n currency: 'USD',\n quantity: 1,\n brand: 'Plausible Co.',\n category: 'Footwear > Sports > Tennis',\n location: 'https://example.com/products/314-7216',\n },\n ],\n };\n\n // Send the data to Bambuser\n window._bambuser.track('purchase', data); \n }\n\n // Load the tracking library and sec invoke onPurchase() method\n (function(){\n const bamSrcElm = document.createElement('script'); \n bamSrcElm.src = 'https://cdn.liveshopping.bambuser.com/metrics/bambuser.min.js';\n bamSrcElm.onload = onPurchase;\n document.head.appendChild(bamSrcElm);\n })();\n <\/script>\n"})})]}),(0,i.jsxs)(o.A,{value:"eu-servers",children:[(0,i.jsx)(n.admonition,{title:"European Servers",type:"note",children:(0,i.jsxs)(n.p,{children:["Tracking library URL is different depending on location of servers that your workspace is set up on. Use European servers URL ",(0,i.jsx)(n.code,{children:"https://cdn.liveshopping.bambuser.com/metrics/bambuser-eu.min.js"})," if the login to your Bambuser workspace is on following link: ",(0,i.jsx)(n.a,{href:"https://lcx-eu.bambuser.com/",children:"https://lcx-eu.bambuser.com/"}),"."]})}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:" <script>\n // Your existing purchase handling function\n function onPurchase() {\n\n const data = {\n eventType: 'purchase',\n transaction: {\n id: 'abcd',\n subtotal: 70.99,\n currency: 'USD',\n total: 74.98,\n tax: 14.2,\n shippingCost: 3.99,\n shippingMethod: 'Store pickup',\n coupon: 'SUMMER_SALE',\n },\n products: [\n {\n id: '314-7216-102',\n name: 'Tennis Shoe Classic - Size 10',\n image: 'https://example.com/images/314-7216-102.jpg',\n price: 70.99,\n currency: 'USD',\n quantity: 1,\n brand: 'Plausible Co.',\n category: 'Footwear > Sports > Tennis',\n location: 'https://example.com/products/314-7216',\n },\n ],\n };\n\n // Send the data to Bambuser\n window._bambuser.track('purchase', data); \n }\n\n // Load the tracking library and sec invoke onPurchase() method\n (function(){\n const bamSrcElm = document.createElement('script'); \n bamSrcElm.src = 'https://cdn.liveshopping.bambuser.com/metrics/bambuser-eu.min.js';\n bamSrcElm.onload = onPurchase;\n document.head.appendChild(bamSrcElm);\n })();\n <\/script>\n"})})]})]}),"\n",(0,i.jsx)(n.p,{children:"You can add the script above to your 'Purchase Confirmation' in different ways:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Add it directly to your application code"}),"\n",(0,i.jsx)(n.li,{children:"Inject it through a tag manager such as GTM, Tealium, and Adobe Analytics"}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Make sure you initialize the fields with valid data from the order."}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"Bambuser Conversion Tracker is a separate integration from the Shoppable Video integration. You will need to separately install the Conversion Tracker on your purchase confirmation page."})}),"\n",(0,i.jsx)(n.h2,{id:"option-2-integration-through-gtm-template",children:"Option 2: Integration through GTM template"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"If you are using Google Tag Manager"}),", you can implement Bambuser Conversion Tracker using a GTM template tag."]}),"\n",(0,i.jsx)(n.h3,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"GTM container installed on the purchase confirmation page"}),"\n",(0,i.jsx)(n.li,{children:"A Trigger for when an order is completed (purchase confirmation page)"}),"\n",(0,i.jsxs)(n.li,{children:["Variables to retrieve the order details below:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Order ID ",(0,i.jsx)(n.code,{children:"String"})]}),"\n",(0,i.jsxs)(n.li,{children:["Order value (total price of the order) ",(0,i.jsx)(n.code,{children:"Number"})]}),"\n",(0,i.jsxs)(n.li,{children:["Order currency ",(0,i.jsx)(n.code,{children:"String"})]}),"\n",(0,i.jsxs)(n.li,{children:["IDs of products in the order ",(0,i.jsx)(n.code,{children:"String"}),"/",(0,i.jsx)(n.code,{children:"Array"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"installing-the-bambuser-live-shopping-tag",children:"Installing the Bambuser Live Shopping tag"}),"\n",(0,i.jsx)(n.p,{children:"Our tag is available on Google Tag Manager Community Template Gallery. To find it, you simply:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:'Go to "Templates" in the left hand side menu'}),"\n",(0,i.jsxs)(n.li,{children:['Under "Tag Templates", press the ',(0,i.jsx)(n.strong,{children:"Search Gallery"})," button"]}),"\n",(0,i.jsx)(n.li,{children:'You should now see the "Import Tag Template" view. Either search for (search icon in the top right) "Bambuser Live Shopping" or simply scroll down until you find it and click on it.'}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:'You should now see the view below. Click "Add to workspace" and confirm the required permissions by pressing "Add" in the popup that appears. That\'s it!'}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"img",src:r(52213).A+"",width:"1920",height:"1108"})}),"\n",(0,i.jsxs)(n.admonition,{type:"note",children:[(0,i.jsx)(n.mdxAdmonitionTitle,{}),(0,i.jsx)(n.p,{children:"We may update the tag. When we do, you will be notified in Google Tag Manager that an update is available."})]}),"\n",(0,i.jsx)(n.h3,{id:"set-up-a-tag",children:"Set up a tag"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Create a new tag"}),(0,i.jsx)(n.br,{}),"\n","On the ",(0,i.jsx)(n.strong,{children:"Tags"})," page, click on ",(0,i.jsx)(n.code,{children:"New"})," to create a new tag. Choose ",(0,i.jsx)(n.strong,{children:'"Bambuser Live Shopping"'}),' as the tag type (found under "Custom" when creating a new tag).']}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Populating the tag"}),(0,i.jsx)(n.br,{}),"\n",(0,i.jsx)(n.img,{alt:"img",src:r(62045).A+"",width:"1890",height:"1606"}),"\nThe tag requires four data points (likely from GTM variables) in order to send purchase data:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Order ID"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The ID of an order/transaction e.g. ",(0,i.jsx)(n.code,{children:"'BM-GR-00123'"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Order Value"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Total value of the order, e.g. ",(0,i.jsx)(n.code,{children:"1000"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{ch
1ildren:"Currency"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The currency in which the Order Value was purchased",(0,i.jsx)(n.br,{}),"\n","See a list of ",(0,i.jsx)(n.a,{href:"https://fixer.io/symbols",children:"supported currency codes"}),(0,i.jsx)(n.br,{}),"\n","E.g. ",(0,i.jsx)(n.code,{children:"'GBP'"}),", ",(0,i.jsx)(n.code,{children:"'USD'"}),", etc."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Product IDs"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["A comma-separated string or an array of product IDs that were part of the Order.",(0,i.jsx)(n.br,{}),"\n","E.g. ",(0,i.jsx)(n.code,{children:"'123,456,789'"})," or ",(0,i.jsx)(n.code,{children:"['123', '456', '789']"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Settings"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Enable debug mode"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"When the tag is fired, it logs all the steps and errors in the browser console."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Custom Tracking Library URL"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["By default Tracking library is set to ",(0,i.jsx)(n.code,{children:"https://cdn.liveshopping.bambuser.com/metrics/bambuser.min.js"}),". This is the URL used if your workspace is set up on Global Servers (Your login to Bambuser workspace is on ",(0,i.jsx)(n.a,{href:"https://lcx.bambuser.com/",children:"https://lcx.bambuser.com/"}),"). ",(0,i.jsx)(n.strong,{children:"In this case you do not need to populate this field."})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["However, if your workspace is set up on EU Servers (Your login to Bambuser workspace is on ",(0,i.jsx)(n.a,{href:"https://lcx-eu.bambuser.com/",children:"https://lcx-eu.bambuser.com/"}),"), ",(0,i.jsx)(n.strong,{children:"you should instead override the URL"})," by using Custom Tracking Library EU. In that case, you need to set it to ",(0,i.jsx)(n.code,{children:"https://cdn.liveshopping.bambuser.com/metrics/bambuser-eu.min.js"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Set a trigger for the tag"}),(0,i.jsx)(n.br,{}),"\n","Bambuser Conversion Tracker script should be run when a purchase is completed. Therefore, you need to have a trigger to fire the tag whenever a purchase is confirmed and the order data is available.\n",(0,i.jsx)(n.img,{alt:"img",src:r(42120).A+"",width:"1518",height:"502"})]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Save the tag"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"checkout-on-a-subdomain",children:"Checkout on a subdomain"}),"\n",(0,i.jsxs)(n.p,{children:["You will need an extra configuration if your checkout page is served under a subdomain of your main domain.",(0,i.jsx)(n.br,{}),"\n","For example:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The Shoppable Video web component is embedded on ",(0,i.jsx)(n.code,{children:"https://example.com"})," or ",(0,i.jsx)(n.code,{children:"https://www.example.com"})]}),"\n",(0,i.jsxs)(n.li,{children:["But the checkout page is served under ",(0,i.jsx)(n.code,{children:"https://checkout.example.com"})]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["By default, the cookies created by the web component will not be accessible from the pages served under subdomains. You can make the cookies accessible on both the main domain and its subdomains (",(0,i.jsx)(n.code,{children:"*.example.com"}),") by configuring ",(0,i.jsx)(n.code,{children:"cookie-domain"})," attribute on the web component. Set the domain name ",(0,i.jsx)(n.em,{children:"without"})," the protocol (",(0,i.jsx)(n.code,{children:"https://"})," part) and prefixing it by a dot (",(0,i.jsx)(n.code,{children:".example.com"}),")."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-html",children:'<bam-playlist cookie-domain=".example.com"></bam-playlist>\n'})}),"\n",(0,i.jsx)(n.h2,{id:"configure-cookie-expiry-time",children:"Configure cookie expiry time"}),"\n",(0,i.jsxs)(n.p,{children:["Cookie expiry time can be configured by setting the ",(0,i.jsx)(n.code,{children:"cookie-ttl-days"})," attribute on the web component."]}),"\n",(0,i.jsx)(n.p,{children:"Example:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-html",children:'<bam-playlist cookie-ttl-days="20"></bam-playlist>\n'})}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"verification",children:"Verification"}),"\n",(0,i.jsx)(n.p,{children:"It is a good practice to verify the implementation by placing a test order."}),"\n",(0,i.jsx)(n.p,{children:"Here are the steps:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Watch a Bambuser Shoppable Video"}),"\n",(0,i.jsx)(n.li,{children:"Add a few products to the cart"}),"\n",(0,i.jsx)(n.li,{children:"Open the browser DevTools (inspect), head to the Network tab, and leave it open"}),"\n",(0,i.jsx)(n.li,{children:"Complete the checkout and proceed to the order
1confirmation page"}),"\n",(0,i.jsx)(n.li,{children:"Check the Network tab in the DevTools and filter by 'metric'"}),"\n",(0,i.jsxs)(n.li,{children:["Find the request to Bambuser ",(0,i.jsx)(n.code,{children:"/metric"})," endpoint that includes the purchase data in the request payload, as below:\n",(0,i.jsx)(n.img,{alt:"img",src:r(14147).A+"",width:"1073",height:"584"})]}),"\n",(0,i.jsxs)(n.li,{children:["Make sure all the sent data is correct and has the expected data types according to the ",(0,i.jsx)(n.a,{href:"#requirements",children:"requirements"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["If you are unable to verify the order being tracked, head over to the ",(0,i.jsx)(n.a,{href:"#troubleshoot",children:"troubleshooting checklist"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h2,{id:"troubleshoot",children:"Troubleshoot"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/shoppable-video/troubleshooting/conversion-tracker-no-data",children:"We integrated Conversion Tracker and placed a test order, but cannot see the data"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"conversion-tracking-faq",children:"Conversion tracking FAQ"}),"\n",(0,i.jsx)("div",{className:"faq-container",children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)("div",{className:"faq-accordions",children:(0,i.jsxs)("div",{className:"faq-accordion",children:[(0,i.jsxs)("div",{className:"faq-accordion",children:[(0,i.jsx)("input",{type:"checkbox",id:"purchaseTrackingFAQ3"}),(0,i.jsx)("label",{className:"faq-accordion-label",htmlFor:"purchaseTrackingFAQ3",children:(0,i.jsx)(n.p,{children:"Will conversion tracking work if the viewer has disabled cookies?"})}),(0,i.jsx)("div",{className:"faq-accordion-content",children:(0,i.jsx)(n.p,{children:"If a user has disabled/remove cookies, the conversion tracking will not work for that particular user. However, the user experience on the Bambuser Player will be the same."})})]}),(0,i.jsxs)("div",{className:"faq-accordion",children:[(0,i.jsx)("input",{type:"checkbox",id:"purchaseTrackingFAQ4"}),(0,i.jsx)("label",{className:"faq-accordion-label",htmlFor:"purchaseTrackingFAQ4",children:(0,i.jsx)(n.p,{children:"Does the order need to include products from the Shoppable Video in order to be tracked?"})}),(0,i.jsxs)("div",{className:"faq-accordion-content",children:[(0,i.jsx)(n.p,{children:"No. When a customer watches a Shoppable Video, the Bambuser cookies are set on the user browser session."}),(0,i.jsxs)(n.p,{children:["All purchases from the same user will be tracked until the timestamp set in the ",(0,i.jsx)(n.code,{children:"_bamls_lcte"})," cookie has passed."]})]})]}),(0,i.jsxs)("div",{className:"faq-accordion",children:[(0,i.jsx)("input",{type:"checkbox",id:"purchaseTrackingFAQ5"}),(0,i.jsx)("label",{className:"faq-accordion-label",htmlFor:"purchaseTrackingFAQ5",children:(0,i.jsx)(n.p,{children:"What are orderIds used for?"})}),(0,i.jsx)("div",{className:"faq-accordion-content",children:(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)("code",{children:"orderID"}),' is currently used for identifying "duplicate rows" as we may receive duplicate purchase data.']}),"\n"]})})]})]})})})})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},19365(e,n,r){r.d(n,{A:()=>c});r(96540);var s=r(18215),i=r(47751);const t="tabItem_Ymn6";var a=r(74848);function o({children:e,className:n,hidden:r}){return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(t,n),hidden:r,children:e})}function c({children:e,className:n,value:r}){const{selectedValue:s,lazy:t}=(0,i.uc)(),c=r===s;return!c&&t?null:(0,a.jsx)(o,{className:n,hidden:!c,children:e})}},4865(e,n,r){r.d(n,{A:()=>m});r(96540);var s=r(18215),i=r(17559),t=r(47751),a=r(23104),o=r(92303);const c="tabList__CuJ",l="tabItem_LNqP";var d=r(74848);function h({className:e}){const{selectedValue:n,selectValue:r,tabValues:i,block:o}=(0,t.uc)(),c=[],{blockElementScrollPositionUntilNextRender:h}=(0,a.a_)(),u=e=>{const s=e.currentTarget,t=c.indexOf(s),a=i[t].value;
1a!==n&&(h(s),r(a))},p=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;n=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;n=c[r]??c[c.length-1];break}}n?.focus()};return(0,d.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":o},e),children:i.map(({value:e,label:r,attributes:i})=>(0,d.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{c.push(e)},onKeyDown:p,onClick:u,...i,className:(0,s.A)("tabs__item",l,i?.className,{"tabs__item--active":n===e}),children:r??e},e))})}function u({children:e}){return(0,d.jsx)("div",{className:"margin-top--md",children:e})}function p({className:e,children:n}){return(0,d.jsxs)("div",{className:(0,s.A)(i.G.tabs.container,"tabs-container",c),children:[(0,d.jsx)(h,{className:e}),(0,d.jsx)(u,{children:n})]})}function m(e){const n=(0,o.A)(),r=(0,t.OC)(e);return(0,d.jsx)(t.O_,{value:r,children:(0,d.jsx)(p,{className:e.className,children:(0,t.vT)(e.children)})},String(n))}},47751(e,n,r){r.d(n,{OC:()=>m,O_:()=>g,uc:()=>x,vT:()=>d});var s=r(96540),i=r(90612),t=r(205),a=r(57485),o=r(70679),c=r(31682),l=r(74848);function d(e){return s.Children.toArray(e).filter(e=>"\n"!==e)}function h(e){const{values:n,children:r}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return s.Children.toArray(e).flatMap(e=>{if(!e)return[];if((0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return[e];const n="string"==typeof e.type?e.type:e.type.name;throw new Error(`Docusaurus error: Bad <Tabs> child <${n}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of <Tabs>, you can also pass an explicit <Tabs values={...}> prop.`)}).map(({props:{value:e,label:n,attributes:r,default:s}})=>({value:e,label:n,attributes:r,default:s}))}(r);return function(e){const n=(0,c.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map(e=>`'${e.value}'`).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e},[n,r])}function u({value:e,tabValues:n}){return n.some(n=>n.value===e)}function p({queryString:e=!1,groupId:n}){const r=(0,i.W6)(),t=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:e,groupId:n});return[(0,a.aZ)(t),(0,s.useCallback)(e=>{if(!t)return;const n=new URLSearchParams(r.location.search);n.set(t,e),r.replace({...r.location,search:n.toString()})},[t,r])]}function m(e){const{defaultValue:n,queryString:r=!1,groupId:i}=e,a=h(e),[c,l]=(0,s.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!u({value:e,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const r=n.find(e=>e.default)??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a})),[d,m]=p({queryString:r,groupId:i}),[b,x]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,i]=(0,o.Dv)(n);return[r,(0,s.useCallback)(e=>{n&&i.set(e)},[n,i])]}({groupId:i}),g=(()=>{const e=d??b;return u({value:e,tabValues:a})?e:null})();(0,t.A)(()=>{g&&l(g)},[g]);return{selectedValue:c,selectValue:(0,s.useCallback)(e=>{if(!u({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);l(e),m(e),x(e)},[m,x,a]),tabValues:a,lazy:e.lazy??!1,block:e.block??!1}}const b=(0,s.createContext)(null);function x(){const e=s.useContext(b);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function g(e){return(0,l.jsx)(b.Provider,{value:e.value,children:e.children})}},52213(e,n,r){const s=r.p+"assets/images/addToWorkspace-efb9b8c08e485de1b9df953360373334.png";r.d(n,["A",0,s])},62045(e,n,r){const s=r.p+"assets/images/bambuser-gtm-tag-configurations-442742de5e0e9d86eab8da89277dc5e6.png";r.d(n,["A",0,s])},42120(e,n,r){const s=r.p+"assets/images/gtm-tag-trigger-8a7d34f88ab3d81c1f04f731bd8801e9.png";r.d(n,["A",0,s])},14147(e,n,r){const s=r.p+"assets/images/purchase-metric-call-68b15a53167f10e172edc2a0f036bde8.jpg";r.d(n,["A",0,s])},28453(e,n,r){r.d(n,{R:()=>a,x:()=>o});var s=r(96540);const i={},t=s.createContext(i);function a(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.