What are the some other events?
1. Event: UTMSimpleLoaded
The UTMSimpleLoaded
event is fired as soon as the UTM Simple script loads. You can utilize it as follows:
document.querySelector("body").addEventListener("UTMSimpleLoaded", (event) => {
// Trigger your script here...
});
2. Event: UTMSimpleFBInitCompleted
The UTMSimpleFBInitCompleted
event is fired as soon as the Facebook script is initialized:
document.querySelector("body").addEventListener("UTMSimpleFBInitCompleted", (event) => {
// Trigger your script here...
});
3. Event: UTMSimpleFBEventCompleted
The UTMSimpleFBEventCompleted
event is fired as soon as any Facebook event (e.g., Purchase, Lead) is triggered:
document.querySelector("body").addEventListener("UTMSimpleFBEventCompleted", (event) => {
// Trigger your script here...
});
4. Event: UTMSimpleFB${EventName}Completed
The UTMSimpleFB${EventName}Completed
event is fired as soon as a specific Facebook event is triggered. For example, to trigger a script right after a purchase event, use the following:
document.querySelector("body").addEventListener("UTMSimpleFBPurchaseCompleted", (event) => {
// Trigger your script here...
});