BobbyGeorgiev Posted March 6, 2023 Share Posted March 6, 2023 (edited) Hello, I was hoping if I could get some help with the following case: I was wondering whether it is possible to use the Source URL section in a Events page to drive the link that goes into the Code Embed button for an Eventbrite sign-up. Currently when creating a new event and updating the embedded Tickets button from Eventbrite me and my team would have to also change the code inside the embed block. Which currently is as follows: Website URL - https://london.siggraph.org/events/drink-draw-march-2023 <!-- Noscript content for added SEO --> <noscript><a href="https://www.eventbrite.co.uk/e/drink-draw-march-2023-tickets-559358595617" rel="noopener noreferrer" target="_blank">Buy Tickets on Eventbrite</a></noscript> <!-- You can customise this button any way you like --> <button id="eventbrite-widget-modal-trigger" type="button">Get Tickets</button> <script src="https://www.eventbrite.co.uk/static/widgets/eb_widgets.js"></script> <script type="text/javascript"> var exampleCallback = function() { console.log('Order complete!'); }; window.EBWidgets.createWidget({ widgetType: 'checkout', eventId: '559358595617', modal: true, modalTriggerElementId: 'eventbrite-widget-modal-trigger', onOrderComplete: exampleCallback }); </script> I was wondering if on the second line instead of having to edit the embed block if it could somehow read the Source URL given in the settings for the specific Event. If you have a better idea on how to do this I would also appreciate that. Hope I have been clear and thanks in advance for any help provided! Best, Bobby Edited March 6, 2023 by BobbyGeorgiev added site link Photographer and 3D Animation Artist - https://boyangeorgiev.com/ Link to comment
BobbyGeorgiev Posted March 7, 2023 Author Share Posted March 7, 2023 So I did a little nosing around and have found where the event Id lives. The way I see it working is maybe by somehow passing a parameter from our event page to the checkout embed code. As it stands the Eventbrite Embed checkout code goes like this: <!-- Noscript content for added SEO --> <noscript><a href="https://www.eventbrite.co.uk/e/bring-your-own-animation-march-2023-tickets-567045748097" rel="noopener noreferrer" target="_blank">Buy Tickets on Eventbrite</a></noscript> <!-- You can customise this button any way you like --> <button id="eventbrite-widget-modal-trigger-567045748097" type="button">Buy Tickets</button> <script src="https://www.eventbrite.co.uk/static/widgets/eb_widgets.js"></script> <script type="text/javascript"> var exampleCallback = function() { console.log('Order complete!'); }; window.EBWidgets.createWidget({ widgetType: 'checkout', eventId: '567045748097', modal: true, modalTriggerElementId: 'eventbrite-widget-modal-trigger-567045748097', onOrderComplete: exampleCallback }); </script> As I see the only info that relates to which event the button would lead to I have made bold. So I was wondering if that can take a parameter that is on the website instead so that when we create new events I can pass the event Id info in the source url, rather than having to edit the embedded button code. Thanks in advance for any help. Best, Bobby tuanphan 1 Photographer and 3D Animation Artist - https://boyangeorgiev.com/ Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment