Skip to content

Commit 198b910

Browse files
authored
Merge pull request #1260 from InnerSourceCommons/summit-2026-referral-campaign
Pass ?ref= through to Summit 2026 Pretix widget as campaign code
2 parents dba5e29 + 41d8e64 commit 198b910

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎layouts/partials/head.html‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,17 @@
7676
{{ if .Params.pretixWidget }}
7777
{{ "<!-- pretix ticket widget -->" | safeHTML }}
7878
<link rel="stylesheet" type="text/css" href="https://pretix.eu/InnerSource/Summit26/widget/v2.css" crossorigin>
79+
{{ "<!-- carry a member referral code (?ref=ISC26-xxxx) into the widget as a Pretix campaign -->" | safeHTML }}
80+
<script type="text/javascript">
81+
window.pretixWidgetCallback = function () {
82+
var ref = new URLSearchParams(window.location.search).get('ref');
83+
if (ref && /^ISC26-[A-Z0-9-]{1,40}$/.test(ref)) {
84+
var el = document.querySelector('pretix-widget');
85+
if (el) el.setAttribute('data-campaign', ref);
86+
}
87+
window.PretixWidget.buildWidgets();
88+
};
89+
</script>
7990
<script type="text/javascript" src="https://pretix.eu/widget/v2.en.js" async crossorigin></script>
8091
{{ end }}
8192

0 commit comments

Comments
 (0)