Skip to content

Campaign JavaScript Callbacks

JavaScript callbacks can be used to perform additional programmable actions based on the campaign’s state.

The code will execute when the campaign is visible on the website.

The code will execute when the campaign is engaged in some way, such as clicking the submit button.

The code will execute when the campaign is closed by user action.

JavaScript Callbacks

You can add a custom code to apply additional logic for tracking the campaign’s performance and pushing it to the Google Analytics report.

dataLayer.push({
event: 'interaction',
category: 'FLuentos Campaign',
action: 'Impression',
label: 'campaign-identifier',
})
dataLayer.push({
event: 'interaction',
category: 'FLuentos Campaign',
action: 'Click',
label: 'campaign-identifier',
})
dataLayer.push({
event: 'interaction',
category: 'FLuentos Campaign',
action: 'Close',
label: 'campaign-identifier',
})