Eventbrite Widget promoCode support appears broken

217 views
Skip to first unread message

Kunal Gupta

unread,
Sep 29, 2021, 1:51:53 PM9/29/21
to Eventbrite Developers
We follow these instructions for including a promoCode in embedded checkout

We noticed this no longer applies the promocode.    Here's why we believe it is an error on your end.

Let %EID% event id, %REFERRER% = our website, %PROMOCODE% = the promo code

1- Should we enter %PROMOCODE% into the widget by hand in the UX, it applies the promocode.
2 - The URL from your widget loads the URL

Therefore I believe the suspect is a change in behavior at https://www.eventbrite.com/checkout-external which is no longer honoring promo codes.

Can you verify this bug and if you verify it, let us know the estimated fix time? It's definitely affecting a lot of customers who are cancelling their payments on our platform. 

Thanks, 

Kunal

Natalie Blikslager

unread,
Oct 6, 2021, 4:27:33 PM10/6/21
to Eventbrite Developers
Hi Kunal,

Thank you for bringing this to our attention and sorry to hear about this negative experience. 

Can you please share an example of an event experiencing this issue, as well as the embedded checkout code you are using with the promo code included?

I look forward to assisting!

Best,
Natalie

J Scott Smith

unread,
Oct 10, 2021, 4:56:28 PM10/10/21
to Eventbrite Developers
CodePen here: https://codepen.io/jscottsf/pen/MWvWqPw

Experiencing the SAME problem. Major usability issues with our site because of this.

J Scott Smith

unread,
Oct 10, 2021, 4:57:41 PM10/10/21
to Eventbrite Developers
FYI, the widget JavaScript generates the same URL above. And the promo code does NOT auto-apply. Also, if you REMOVE the parent arg, it seems to work.

K S

unread,
Oct 10, 2021, 6:55:39 PM10/10/21
to Eventbrite Developers
J Scott,

Thanks for posting your update, too.  Can you specify which part of your code you removed to get this to work?  We are having large issues with our customers, as well, because of this problem.  Thanks.

J Scott Smith

unread,
Oct 11, 2021, 1:50:08 PM10/11/21
to Eventbrite Developers
There was nothing I could do in the code. Other than modify the local EB widget code to not append the "parent" query parameter.

Basically, I grabbed the iframe URL that the widget code generated and hacked the URL.

Generated by the CodePen above using the EB widget JavaScript (does not work):
https://www.eventbrite.com/checkout-external?eid=168747296707&parent=https%3A%2F%2Fcdpn.io%2Fjscottsf%2Ffullpage%2FMWvWqPw&promo_code=I-Heart-Scrum

Remove the "parent" query parameter and it works!
https://www.eventbrite.com/checkout-external?eid=168747296707&promo_code=I-Heart-Scrum

Reposting the CodePen again for reference:

Kunal Gupta

unread,
Oct 11, 2021, 2:07:42 PM10/11/21
to Eventbrite Developers
lmao I just made this "fix" by just commenting out the "parent=" line from the URL.

But unfortunately it doesn't solve the problem for me - it will work if and only if you're not using modal.

Meanwhile, we've made a temporary workaround and informed our customers that the problem and solution lies with Eventbrite

K S

unread,
Oct 11, 2021, 4:41:03 PM10/11/21
to Eventbrite Developers

Thank you both for creative solutions.  However, when I generated the embed code via Eventbrite (embedded via page, not modal), I do not see any "parent=" line in the code:

<div id="eventbrite-widget-container-eventID"></div>


<script type="text/javascript">
    var exampleCallback = function() {
        console.log('Order complete!');
    };

    window.EBWidgets.createWidget({
        // Required
        widgetType: 'checkout',
        eventId: 'ID#',
        promoCode: 'promo',
        iframeContainerId: 'eventbrite-widget-container-ID#',

        // Optional
        iframeContainerHeight: 425,  // Widget height in pixels. Defaults to a minimum of 425px if not provided
        onOrderComplete: exampleCallback  // Method called when an order has successfully completed
    });
</script>


I assume I am missing something simple since I am relatively new at this.  Thanks for any help you can provide.

J Scott Smith

unread,
Oct 11, 2021, 5:32:56 PM10/11/21
to Eventbrite Developers
The parent is in the iframe URL generated by the code.

J Scott Smith

unread,
Oct 11, 2021, 5:35:34 PM10/11/21
to Eventbrite Developers
To clarify. The script sample above pulls in the EB library, which simply injects an iframe into a site via the DOM. The iframe URL has the parent.

The following code in the eb_widgets.js does this.

var parentUrl = _getParentUrl();

var url = _state.widgetHostname + '/checkout-external?eid=' + eventId + '&parent=' + parentUrl;



J Scott Smith

unread,
Oct 11, 2021, 5:41:01 PM10/11/21
to Eventbrite Developers
I actually think eb_widgets.js is doing the right thing. This is likely on the backend where the "promo_code" query parameter is not working in some edge cases. Or perhaps the "parent" query parameter is not getting encoded correctly and making the other parameters not work.

Kunal Gupta

unread,
Oct 11, 2021, 5:44:28 PM10/11/21
to Eventbrite Developers
Yes, that was my diagnosis as well, that the problem is in the app server side somewhere, not the eb_widgets.js file.  That's why there is no way for us to fix our apps until Eventbrite fixes their app.

That being said, a hack workaround for those who are not using the modal version seems to be to just comment out the "parent=" line on the eb_widgets.js!

J Scott Smith

unread,
Oct 27, 2021, 1:44:28 PM10/27/21
to Eventbrite Developers
Received an email today saying this was fixed.

Nope. Still doesn't work. Lol.

Updated my CodePen to demonstrate that the promo code does not get applied automatically.


The text “Enter promo code” should not appear since I passed a valid promo code into the method call.

I followed the instructions in the docs and it does not work:


Natalie Blikslager

unread,
Oct 27, 2021, 4:00:54 PM10/27/21
to Eventbrite Developers
Hi all!

I'm happy to report that this issue has been resolved. You should now see that if you follow the Embedding a Checkout Widget documentation here and pass a promo code to the checkout flow, it is automatically applied. If you find that is not the case, please let me know in this thread and include a link to your website. 

J Scott Smith, I apologize for the confusion. You were notified of the fix when it was implemented, but not yet released to production - now that the fix is live in production, I am seeing the promo code is automatically applied in your CodePen demonstration. Thank you for sharing details and an example via CodePen - this was so helpful to observe in testing! 

Thank you all very much for bringing attention to this issue and your patience as we worked to resolve it - we sincerely appreciate it!

Best,
Natalie

J Scott Smith

unread,
Oct 27, 2021, 4:04:58 PM10/27/21
to Eventbrite Developers
Confirmed. Thank you!!!
Reply all
Reply to author
Forward
0 new messages