This setting can be found at SETTINGS -> BOOKING PAGE -> ADVANCED -> SETTINGS.
It is also possible to include scripts directly in the screen confirmation messages at SETTINGS > PROPERTIES > CONFIRMATION MESSAGES > PERIOD MESSAGES.
The script will not be visible on screen and will run only when a booking is completed.