Monitor Which Attendees Changed Their Profile Names
Attendees usually enter their real names during registration, but once they log in to the event, they may update their profile name to something else like their nickname, or perhaps change the name that appears in their badge. When this happens, the name in the order also updates so the original value won't reflect in the order. As an event admin, you may want to keep track of their real names for future marketing emails. or for other purposes.
In this article you'll learn how to track these name changes by getting notified through email and see both the original and new names in a Google Sheet.
You will need the following:
The list of attendees in a Google Sheets
Access to use App Scripts in Google Sheets
Access to use Webhooks in Accelevents
Download The Ticket Holder Data
In your admin console, download the Ticket Holder Data. You will need the Order Number, Ticket Number, Email, First Name and Last Name, so you can copy that information to a Google Sheet, or delete the other data not needed if you already opened the report in Google Sheets.
Arrange the Data and Headers
In your Google Sheet, you will need columns A to H. Please arrange the data the same way below and copy all the same header labels to the correct columns in your sheet. (Order Number, Ticket Number, Email, Original First Name, Original Last Name, Updated First Name, Updated Last Name, Last Updated)
Note: The script you will add later will update specific columns in the sheet (columns E, F, G, H), so it's important that the placement of the original attendee data is also in the correct column.
Create a Zap to Update the Google Sheet For New Registrations
To ensure that new registrations are also added to the sheet, you can create a zap between Accelevents and Google Sheets and include the Order Number, Ticket Number, Email, First Name and Last Name in the mapping.
Create an App Script Web App
In your Google Sheet, click Extensions > App Script. This will open a new tab to add the script.
Add the script
In the new tab that opened, delete the first 3 lines of the script, and paste the script below. Then in the script, replace "
your_email@example.com
" with the email address you'd like the notifications sent to.function doPost(e) {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var payload = JSON.parse(e.postData.contents);
var data = payload.data;
var email = data.email;
var newFirstName = data.firstName;
var newLastName = data.lastName;
var timestamp = new Date();
var range = sheet.getDataRange();
var values = range.getValues();
var emailLower = String(email).toLowerCase();
var foundMatch = false;
var updatedRows = 0;
var originalNamesList = [];
for (var i = 1; i < values.length; i++) {
var sheetEmail = String(values[i][2]).toLowerCase(); // Column C (Email)
if (sheetEmail === emailLower) {
foundMatch = true;
updatedRows++;
var originalFirst = values[i][3] || ""; // Column D
var originalLast = values[i][4] || ""; // Column E
originalNamesList.push(`Row ${i + 1}: Original First = "${originalFirst}", Original Last = "${originalLast}"`);
if (!originalFirst) sheet.getRange(i + 1, 4).setValue(newFirstName);
if (!originalLast) sheet.getRange(i + 1, 5).setValue(newLastName);
sheet.getRange(i + 1, 6).setValue(newFirstName); // Updated First Name (Col F)
sheet.getRange(i + 1, 7).setValue(newLastName); // Updated Last Name (Col G)
sheet.getRange(i + 1, 8).setValue(timestamp); // Last Updated (Col H)
}
}
if (foundMatch) {
var subject = `β Attendee info updated: ${email}`;
var body =
`Updated ${updatedRows} row(s):\n\n` +
`Email: ${email}\n` +
`New First Name: ${newFirstName}\n` +
`New Last Name: ${newLastName}\n` +
`Time: ${timestamp}\n\n` +
`Original Names:\n${originalNamesList.join("\n")}`;
MailApp.sendEmail({
to: "your_email@example.com",
subject: subject,
body: body
});
}
return ContentService.createTextOutput(foundMatch ? "Updated matching row(s)." : "No match found. No changes made.");
}
Save
Click the Save button to save your script. You can also rename App Script.
Deploy as Web App
Click Deploy and select New Deployment
Click the Gear Icon beside Select Type and choose Web app
Add a description
Execute as: Me
Who has access: Anyone
Click Deploy
Copy the Web app URL
Set Up the Webhook
Go to Integrations > Webhooks In your Organizer Portal or White Label / Enterprise Dashboard
Paste the Web app url to the Tour request endpoint URL field
Click Save
Select "User profile updated" from Webhook Topics
Test it
Register for the event
Check the Google Sheet if it added your Order Number, Ticket Number, Email, First Name and Email
Log in to the event and change your profile name
Check the Google Sheet if it added the new name in the Updated First Name and Updated Last Name Columns
You should also receive an email notification
Notes:
If the attendee registered with the same address multiple times, all rows with that email address will be updated with the new name when the attendee updates their profile name.
If an attendee in this list updates their profile name in a different event, it will still update the sheet as their profile is the same for all events.
The script was generated by ChatGPT, so you can ask ChatGPT to tweak it depending on your requirements, like get a notification if someone changed their name but they're not on the list, or add a new row if they're not on the list.