Campaigns fire custom javascript events at certain points during fan interaction.
Use jQuery to listen in on these events.
// Trigger an alert when the entry form loads
$(document).on('tbits.formLoad', function () {
alert('Form has loaded');
});
Trigger Type |
Trigger Scenario |
Example Data Output |
tbits.load |
When the campaign has finished loading |
No additional data
|
Trigger Type |
Trigger Scenario |
Example Data Output |
tbits.formLoad |
The entry form has loaded |
No additional data
|
tbits.submit |
The fan has submitted their entry form |
No additional data
|
tbits.submitSuccess |
The ajax call to submit the form has succeeded |
No additional data
|
tbits.countdownDone |
Campaign time countdown has completed |
No additional data
|
tbits.pingServer |
Fires when campaign page loads |
No additional data
|
tbits.tinfoilDisplay |
The "cookies are required" message has been displayed to the fan because they have disabled cookies |
No additional data
|
tbits.tinfoilClick |
Fan has clicked Continue in the "cookies are required" message |
No additional data
|
tbits.populateFieldValues |
Entry form has been populated with fan values |
No additional data
|
Trigger Type |
Trigger Scenario |
Example Data Output |
tbits.handleCheckLogin |
Existing profile has been checked against email/phone |
No additional data
|
tbits.setupCrmFieldUpdate |
Additional info fields for registration/login have been loaded |
No additional data
|
tbits.handleLogin |
Fan has clicked login button and login has been processed |
No additional data
|
tbits.handleRegister |
Fan has registered |
No additional data
|
tbits.submitVerificationCode |
Fan has submitted verification code |
No additional data
|
tbits.handleVerify |
Verification code has been checked |
No additional data
|
tbits.handleCreatePassword |
Password has been created for fan |
No additional data
|