Campaign JavaScript Callbacks
JavaScript callbacks can be used to perform additional programmable actions based on the campaign’s state.
On Impression
Section titled “On Impression”The code will execute when the campaign is visible on the website.
On Event
Section titled “On Event”The code will execute when the campaign is engaged in some way, such as clicking the submit button.
On Close
Section titled “On Close”The code will execute when the campaign is closed by user action.
Reporting to Google Analytics
Section titled “Reporting to Google Analytics”You can add a custom code to apply additional logic for tracking the campaign’s performance and pushing it to the Google Analytics report.
On Impression
Section titled “On Impression”dataLayer.push({ event: 'interaction', category: 'FLuentos Campaign', action: 'Impression', label: 'campaign-identifier',})
On Event
Section titled “On Event”dataLayer.push({ event: 'interaction', category: 'FLuentos Campaign', action: 'Click', label: 'campaign-identifier',})
On Close
Section titled “On Close”dataLayer.push({ event: 'interaction', category: 'FLuentos Campaign', action: 'Close', label: 'campaign-identifier',})