{"id":9807,"date":"2025-04-16T23:22:40","date_gmt":"2025-04-16T21:22:40","guid":{"rendered":"https:\/\/vertigojazz.pl\/thank-you-for-purchasing-a-ticket\/"},"modified":"2025-07-16T14:09:21","modified_gmt":"2025-07-16T12:09:21","slug":"thank-you-for-purchasing-a-ticket","status":"publish","type":"page","link":"https:\/\/vertigojazz.pl\/en\/thank-you-for-purchasing-a-ticket\/","title":{"rendered":"Thank you for purchasing a ticket"},"content":{"rendered":"\n<h2 class=\"wp-block-heading mt-4\">Thank you for purchasing a ticket<\/h2>\n\n<p>Thank you for making your purchase! A confirmation of the transaction has been sent to your email along with the tickets. If the tickets are not in your email, please also check your SPAM folder or contact us. You can also download the tickets by clicking below.   <\/p>\n    <script>\r\n        function generateHTML(response) {\r\n            const {\r\n                event,\r\n                reservation\r\n            } = response;\r\n\r\n            const eventTitle = event.title;\r\n            const eventDateTime = event.displayPeriod.startsAt;\r\n            const eventLocation = event.location.name + \", \" + event.location.address + \", \" + event.location.city.name;\r\n            const eventMapLocation = `https:\/\/www.google.com\/maps\/search\/?api=1&query=${encodeURIComponent(event.location.name)}&query_place_id=${event.location.latitude},${event.location.longitude}`;\r\n            const reservationCode = reservation.reservationCode;\r\n            const ticketCompounds = reservation.grossPrices.ticketCompounds;\r\n\r\n            const ticketsHTML = ticketCompounds.map(ticket => `\r\n            <li>\r\n                <strong>Miejsce:<\/strong> ${ticket.description || 'Brak danych'} |\r\n                <strong>Ilo\u015b\u0107:<\/strong> ${ticket.quantity || '1'} |\r\n                <strong>Cena:<\/strong> ${ticket.totalPrice || '0.00'} z\u0142\r\n            <\/li>\r\n        `).join('');\r\n\r\n            const htmlContent = `\r\n            <h4>Podsumowanie zakup\u00f3w<\/h4>\r\n            <p><strong>Nazwa wydarzenia:<\/strong> ${eventTitle}<\/p>\r\n            <p><strong>Data i godzina:<\/strong> ${new Date(eventDateTime).toLocaleString()}<\/p>\r\n            <p><strong>Miejsce wydarzenia:<\/strong> ${eventLocation} (<a href=\"${eventMapLocation}\">sprawd\u017a jak dojecha\u0107<\/a>)<\/p>\r\n            <p><strong>Kod rezerwacji:<\/strong> ${reservationCode}<\/p>\r\n            <p><strong>Zakupione bilety:<\/strong><\/p>\r\n            <ul>\r\n                ${ticketsHTML}\r\n            <\/ul>\r\n        `;\r\n\r\n            const container = document.getElementById('response-container');\r\n            container.innerHTML = htmlContent;\r\n        }\r\n\r\n        \/\/ \u2500\u2500 GetResponse: fetch do endpointa z customer.email \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n        const params = new URLSearchParams(window.location.search);\r\n        const reservationId = params.get('reservationId');\r\n\r\n        if (!reservationId) {\r\n            console.warn('[GetResponse] Brak reservationId w URL \u2013 blok GetResponse pomini\u0119ty.');\r\n        } else {\r\n            fetch('https:\/\/api.kicket.com\/reservations\/initial-typ-summaries-v2\/' + reservationId)\r\n                .then(function(res) {\r\n                    if (!res.ok) throw new Error('HTTP ' + res.status);\r\n                    return res.json();\r\n                })\r\n                .then(function(json) {\r\n                    const grEmail = json.customer?.email;\r\n\r\n                    if (!grEmail) {\r\n                        console.error('[GetResponse] Brak emaila \u2013 zdarzenie nie zostanie wys\u0142ane.');\r\n                        return;\r\n                    }\r\n\r\n                    const grAttributes = {\r\n                        name: json.customer?.name ?? '',\r\n                        event_name: json.event?.title ?? '',\r\n                        event_datetime: json.event?.displayPeriod?.startsAt?.iso ??\r\n                            json.event?.displayPeriod?.description ?? '',\r\n                        total: json.reservation?.grossPrices?.totalValueForClient ?? ''\r\n                    };\r\n\r\n                    const missing = Object.entries(grAttributes)\r\n                        .filter(([, v]) => v === '')\r\n                        .map(([k]) => k);\r\n\r\n                    if (missing.length > 0) {\r\n                        console.warn('[GetResponse] Brakuj\u0105ce pola:', missing);\r\n                    }\r\n\r\n                    if (typeof GrTracking !== 'function') {\r\n                        console.error('[GetResponse] Brak snippetu Web Connect na stronie \u2013 GrTracking niedost\u0119pny.');\r\n                        return;\r\n                    }\r\n\r\n                    \/\/ 1. Identyfikacja u\u017cytkownika po emailu (wymagane przez Web Connect)\r\n                    GrTracking('setUserId', grEmail);\r\n\r\n                    \/\/ 2. Wys\u0142anie zdarzenia z atrybutami\r\n                    GrTracking('setEvent', 'thankyou_page', grAttributes);\r\n\r\n                    console.log('[GetResponse] GrTracking wys\u0142any:', grEmail, grAttributes);\r\n                })\r\n                .catch(function(err) {\r\n                    console.error('[GetResponse] B\u0142\u0105d pobierania danych z API:', err);\r\n                });\r\n        }\r\n\r\n        \/\/ \u2500\u2500 Kicket SDK: FB Pixel + GA4\/GTM \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n        kicket.getInitialTypSummaryV1()\r\n            .then((response) => {\r\n                console.log('Response:', response);\r\n                if (!response.status)\r\n                    generateHTML(response);\r\n\r\n                fbq('track', 'Purchase', {\r\n                    value: response.reservation.grossPrices.totalValueForClient,\r\n                    currency: 'PLN',\r\n                    event_title: response.event.title,\r\n                    event_date: new Date(response.event.displayPeriod.startsAt).toLocaleString(),\r\n                    num_items: response.reservation.grossPrices.placesCount,\r\n                    contents: response.reservation.grossPrices.ticketCompounds.map(ticket => ({\r\n                        id: ticket.tariffId,\r\n                        description: ticket.description,\r\n                        quantity: ticket.quantity || 1,\r\n                        unit_price: ticket.unitPrice,\r\n                        total_price: ticket.totalPrice\r\n                    })),\r\n                    content_type: 'event'\r\n                });\r\n\r\n                const eventTitle = response.event.title;\r\n                const eventDate = new Date(response.event.displayPeriod.startsAt).toISOString();\r\n                const reservation = response.reservation;\r\n                const ticketItems = reservation.grossPrices.ticketCompounds.map(ticket => ({\r\n                    item_id: ticket.tariffId,\r\n                    item_name: ticket.description,\r\n                    quantity: ticket.quantity || 1,\r\n                    price: ticket.unitPrice,\r\n                    total_price: ticket.totalPrice,\r\n                    item_category: 'Event Ticket',\r\n                    event_name: eventTitle,\r\n                    event_date: eventDate\r\n                }));\r\n\r\n                setTimeout(function() {\r\n                    window.dataLayer = window.dataLayer || [];\r\n                    window.dataLayer.push({\r\n                        event: 'purchase',\r\n                        ecommerce: {\r\n                            transaction_id: reservation.reservationNumber,\r\n                            affiliation: 'Kicket Ticket',\r\n                            value: reservation.grossPrices.totalValueForClient,\r\n                            tax: reservation.grossPrices.taxAmount || 0,\r\n                            shipping: 0,\r\n                            currency: 'PLN',\r\n                            coupon: reservation.discountCode || '',\r\n                            items: ticketItems\r\n                        },\r\n                        eventData: {\r\n                            event_title: eventTitle,\r\n                            event_date: eventDate,\r\n                            event_id: response.event.id\r\n                        },\r\n                        customer: {\r\n                            email: reservation.email || '',\r\n                            phone: reservation.phone || '',\r\n                            first_name: reservation.firstName || '',\r\n                            last_name: reservation.lastName || ''\r\n                        }\r\n                    });\r\n                }, 1000);\r\n            })\r\n            .catch((error) => {\r\n                console.error('Wyst\u0105pi\u0142 b\u0142\u0105d podczas pobierania danych:', error);\r\n            });\r\n    <\/script>\r\n    <div class=\"kicket-typ-container\">\r\n        <div id=\"response-container\"><\/div>\r\n        <a href=\"\" id=\"ticket-url\" class=\"btn btn-main\">Pobierz bilety<\/a>\r\n    <\/div>\r\n\n","protected":false},"excerpt":{"rendered":"<p>Thank you for purchasing a ticket Thank you for making your purchase! A confirmation of the transaction has been sent to your email along with the tickets. If the tickets are not in your email, please also check your SPAM folder or contact us. You can also download the tickets by clicking below.<\/p>\n","protected":false},"author":14,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-9807","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Thank you for purchasing a ticket - Vertigo Jazz Club &amp; Restaurant<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Thank you for purchasing a ticket - Vertigo Jazz Club &amp; Restaurant\" \/>\n<meta property=\"og:description\" content=\"Thank you for purchasing a ticket Thank you for making your purchase! A confirmation of the transaction has been sent to your email along with the tickets. If the tickets are not in your email, please also check your SPAM folder or contact us. You can also download the tickets by clicking below.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/\" \/>\n<meta property=\"og:site_name\" content=\"Vertigo Jazz Club &amp; Restaurant\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vertigojazzclub\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-16T12:09:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vertigojazz.pl\/wp-content\/uploads\/2025\/08\/VertigoJazz-Logo_1080_1080.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"768\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/\",\"url\":\"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/\",\"name\":\"Thank you for purchasing a ticket - Vertigo Jazz Club &amp; Restaurant\",\"isPartOf\":{\"@id\":\"https:\/\/vertigojazz.pl\/#website\"},\"datePublished\":\"2025-04-16T21:22:40+00:00\",\"dateModified\":\"2025-07-16T12:09:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Strona g\u0142\u00f3wna\",\"item\":\"https:\/\/vertigojazz.pl\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Thank you for purchasing a&nbsp;ticket\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vertigojazz.pl\/#website\",\"url\":\"https:\/\/vertigojazz.pl\/\",\"name\":\"Vertigo Jazz Club & Restaurant\",\"description\":\"klub muzyczny we Wroc\u0142awiu\",\"publisher\":{\"@id\":\"https:\/\/vertigojazz.pl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vertigojazz.pl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/vertigojazz.pl\/#organization\",\"name\":\"Vertigo Jazz Club & Restaurant\",\"alternateName\":\"Klub muzyczny we Wroc\u0142awiu\",\"url\":\"https:\/\/vertigojazz.pl\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vertigojazz.pl\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/vertigojazz.pl\/wp-content\/uploads\/2025\/04\/cropped-vertigo_logo_biale-180x180-1.jpg\",\"contentUrl\":\"https:\/\/vertigojazz.pl\/wp-content\/uploads\/2025\/04\/cropped-vertigo_logo_biale-180x180-1.jpg\",\"width\":180,\"height\":180,\"caption\":\"Vertigo Jazz Club & Restaurant\"},\"image\":{\"@id\":\"https:\/\/vertigojazz.pl\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vertigojazzclub\",\"https:\/\/www.instagram.com\/vertigo_jazz_club\/\",\"https:\/\/www.youtube.com\/channel\/UC8sPrX3Xuv7bfuhfr3XbqXg\",\"https:\/\/www.tiktok.com\/@vertigojazzclub\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Thank you for purchasing a ticket - Vertigo Jazz Club &amp; Restaurant","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/","og_locale":"en_US","og_type":"article","og_title":"Thank you for purchasing a ticket - Vertigo Jazz Club &amp; Restaurant","og_description":"Thank you for purchasing a ticket Thank you for making your purchase! A confirmation of the transaction has been sent to your email along with the tickets. If the tickets are not in your email, please also check your SPAM folder or contact us. You can also download the tickets by clicking below.","og_url":"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/","og_site_name":"Vertigo Jazz Club &amp; Restaurant","article_publisher":"https:\/\/www.facebook.com\/vertigojazzclub","article_modified_time":"2025-07-16T12:09:21+00:00","og_image":[{"width":768,"height":768,"url":"https:\/\/vertigojazz.pl\/wp-content\/uploads\/2025\/08\/VertigoJazz-Logo_1080_1080.jpeg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/","url":"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/","name":"Thank you for purchasing a ticket - Vertigo Jazz Club &amp; Restaurant","isPartOf":{"@id":"https:\/\/vertigojazz.pl\/#website"},"datePublished":"2025-04-16T21:22:40+00:00","dateModified":"2025-07-16T12:09:21+00:00","breadcrumb":{"@id":"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vertigojazz.pl\/dziekujemy-za-zakup-biletu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Strona g\u0142\u00f3wna","item":"https:\/\/vertigojazz.pl\/en\/"},{"@type":"ListItem","position":2,"name":"Thank you for purchasing a&nbsp;ticket"}]},{"@type":"WebSite","@id":"https:\/\/vertigojazz.pl\/#website","url":"https:\/\/vertigojazz.pl\/","name":"Vertigo Jazz Club & Restaurant","description":"klub muzyczny we Wroc\u0142awiu","publisher":{"@id":"https:\/\/vertigojazz.pl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vertigojazz.pl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/vertigojazz.pl\/#organization","name":"Vertigo Jazz Club & Restaurant","alternateName":"Klub muzyczny we Wroc\u0142awiu","url":"https:\/\/vertigojazz.pl\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vertigojazz.pl\/#\/schema\/logo\/image\/","url":"https:\/\/vertigojazz.pl\/wp-content\/uploads\/2025\/04\/cropped-vertigo_logo_biale-180x180-1.jpg","contentUrl":"https:\/\/vertigojazz.pl\/wp-content\/uploads\/2025\/04\/cropped-vertigo_logo_biale-180x180-1.jpg","width":180,"height":180,"caption":"Vertigo Jazz Club & Restaurant"},"image":{"@id":"https:\/\/vertigojazz.pl\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vertigojazzclub","https:\/\/www.instagram.com\/vertigo_jazz_club\/","https:\/\/www.youtube.com\/channel\/UC8sPrX3Xuv7bfuhfr3XbqXg","https:\/\/www.tiktok.com\/@vertigojazzclub"]}]}},"_links":{"self":[{"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/pages\/9807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/comments?post=9807"}],"version-history":[{"count":2,"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/pages\/9807\/revisions"}],"predecessor-version":[{"id":9811,"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/pages\/9807\/revisions\/9811"}],"wp:attachment":[{"href":"https:\/\/vertigojazz.pl\/en\/wp-json\/wp\/v2\/media?parent=9807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}