Forked from ejonasson/trustpulse-trigger-on-page-load.js
Created
May 29, 2020 14:05
-
-
Save DevinVinson/9ce8350bd667e0fdc78d43f130ef2b42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REPLACE THIS WITH THE CAMPAIGN'S ID | |
var campaignId = 'XXXXX'; | |
// DO NOT EDIT BELOW THIS LINE | |
document.addEventListener('tp.Main.EventListener.Ready', function () { | |
var event = new CustomEvent('tp.Custom.Submit', { | |
bubbles : true, | |
cancelable : true, | |
detail : { | |
widgetId: campaignId, | |
fields: [] | |
} | |
}); | |
document.dispatchEvent(event); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment