What is the event picker?
If you're using your automated Gig Guide template in Braze, your events will auto-fill in your newsletter in date order. If you want to specify events to feature at the top of your email, you need to do this with your event IDs.
To make it easy for you to find and select your event IDs for your gig guide, follow the instructions below.
Please note: you need to be using Google Chrome to access the event picker tool.
Link to Event Picker txt file
Copy all of the below code, and then follow the steps below.
javascript:(function(){var e=document.createElement('script');e.src='https://code.jquery.com/jquery-3.6.0.min.js';document.head.appendChild(e);e.onload=function(){var result=[],checkboxes=[];$(".main-event-header a").each(function(){var urlString=$(this).attr('href'),linkTitle=$(this).text().trim(),last6Digits=urlString.match(/(\d{6})$/),imageUrl=$(this).closest('div').prev('.searchresult_image').find('img').attr('src');if(imageUrl&&!imageUrl.startsWith('http')){imageUrl='https:'+imageUrl;}if(last6Digits){var checkboxId='checkbox_'+last6Digits[0];checkboxes.push('<tr><td><input type="checkbox" id="'+checkboxId+'" value="'+last6Digits[0]+'"></td><td><img src="'+imageUrl+'" alt="'+linkTitle+'" style="width: 60px; height: 60px;"></td><td><label for="'+checkboxId+'">'+linkTitle+'</label></td><td>'+last6Digits[0]+'</td></tr>');}});var checkboxesHTML='<table style="width: 100%; border-collapse: collapse;"><thead><tr><th>Select</th><th>Image</th><th>Event Title</th><th>Event ID</th></tr></thead><tbody>'+checkboxes.join('')+'</tbody></table>';var newWindow=window.open('','Results','width=600,height=400');newWindow.document.write('<html><head><title>Events</title><style>body { font-family: Arial, sans-serif; }table { width: 100%; border-collapse: collapse; }td, th { padding: 8px; text-align: left; border: 1px solid #ddd;%20}tr:nth-child(even)%20{%20background-color:%20#f2f2f2;%20}tr:hover%20{%20background-color:%20#ddd;%20}%3C/style%3E%3C/head%3E%3Cbody%3E%3Ch1%3ESelect%20your%20events%3C/h1%3E'+checkboxesHTML+'%3Cbr%3E%3Cbutton%20id=%22combineButton%22%3ECombine%20selected%3C/button%3E%3Ch2%3ESelected%20Event%20IDs%20for%20your%20email:%3C/h2%3E%3Cp%20id=%22resultText%22%3E%3C/p%3E%3Cbutton%20id=%22copyButton%22%3ECopy%20to%20Clipboard%3C/button%3E%3Cscript%3Evar%20selectedDigitsOrder=[];document.querySelectorAll(%22input[type=\'checkbox\']%22).forEach(function(checkbox){checkbox.addEventListener(%22change%22,function(){var%20checkboxValue=checkbox.value;if(checkbox.checked){selectedDigitsOrder.push(checkboxValue);}else{selectedDigitsOrder=selectedDigitsOrder.filter(function(val){return%20val!==checkboxValue});}});});document.getElementById(%22combineButton%22).addEventListener(%22click%22,function(){var%20resultString=selectedDigitsOrder.join(%22,%22);document.getElementById(%22resultText%22).textContent=resultString});document.getElementById(%22copyButton%22).addEventListener(%22click%22,function(){var%20resultText=document.getElementById(%22resultText%22).textContent;if(resultText){navigator.clipboard.writeText(resultText).then(function(){alert(%22Copied%20to%20clipboard!%22);}).catch(function(err){console.error(%22Failed%20to%20copy%20text:%20%22,err)});}else{alert(%22No%20text%20to%20copy!%22);}});%3C/script%3E%3C/body%3E%3C/html%3E');}})();
How it works:
- In Chrome, navigate to Bookmark Manager (or press Ctrl-Shift-O)
- Click the ⋮ menu on the top right and select Add New Bookmark
- Add a bookmark named “event picker” or similar, and paste all of the code you copied above into the URL box
- Navigate to your venue page on Moshtix (e.g. https://www.moshtix.com.au/v2/venues/170-russell-melbourne/780)
- Press the Event Picker bookmark (if you can’t see the bookmark, press CTRL-Shift-B to show the bookmark bar)
- A screen should pop up that lets you select events
- Tick the boxes in the order that you want events to appear in your email. Once complete, scroll down to the bottom of the window and press “Combine Selected” and then “Copy to Clipboard”
- You can then paste this list into the {% assign specific_event_ids = '' | split: ',' %} line in the gig guide email in Braze e.g. {% assign specific_event_ids = '178540,176992,175433,176602,178887' | split: ',' %}
You don’t need to select every event in an email – only the ones you want to feature first. If the line at the top of the email says {% assign autofill_events = true %}, it will fill the remaining slots in the email with your events in date order, and skip any of the featured events in the specific_event_ids so events don’t appear twice. At the moment, this is set to a maximum of 20 events.
Comments
0 comments
Please sign in to leave a comment.