Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!carrotJsEvent) {
- var carrotJsEvent = function () {
- window.addEventListener('message', function(e) {
- if (e.data.comand == 'carrotquest.track') {
- carrotquest.track(e.data.name,e.data.parametr)
- }
- if (e.data.comand == 'carrotquest.identify') {
- carrotquest.identify(e.data.props)
- }
- if (e.data.comand == 'carrotquest.trackMessageInteraction') {
- carrotquest.trackMessageInteraction(e.data.id, e.data.type)
- }
- if (e.data.comand == 'carrotquest.close_popup') {
- document.getElementById('carrot_frame').remove();
- document.getElementById('cq-popup-js-bg').remove();
- }
- })
- }
- carrotJsEvent();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement