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
<!-- place this script tag after the Gist tracking code --> | |
<script> | |
// open the Messenger widget when you receive a message | |
document.addEventListener('gistChatReady', function () { | |
document.addEventListener("onGistUnreadCountChange", function(e) { | |
if (window.gistUnreadCount > 0 || $('.gist-messenger-iframe').css('display') === 'block') { | |
gist.chat("showLauncher"); | |
} else { | |
gist.chat("hideLauncher"); | |
} |
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
<!-- place this script tag after the Gist & Segment tracking code --> | |
<script> | |
// sends logged-in user data to Gist when Segment's identify method is called | |
analytics.on('identify', function(event, properties, options) { | |
gist.identify(event ? event : '', properties); | |
}); | |
// sends events to Gist when Segment's track method is called | |
analytics.on('track', function(event, properties, options) { | |
gist.track(event, properties); |
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
{% if subscriber.country == "United States"%} | |
Subscribers from USA will see this | |
{% elsif subscriber.country == "Italy" %} | |
Subscribers from Italy will see this | |
{% else %} | |
Subscribers from other countries will see this | |
{% endif %} |
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
<<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
iframe { | |
width: 100%; | |
height: 100vh; | |
padding: 0; | |
margin: 0; |
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
<script> | |
/* Hide Gist Messenger Launcher on page load */ | |
gist.chat('hideLauncher'); | |
/* open the Messenger when you receive a message */ | |
document.addEventListener("onGistUnreadCountChange", function(e) { | |
if(window.gistUnreadCount > 0) { | |
gist.chat('open'); | |
} | |
}); |
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
<script> | |
jQuery(".elementor-button").click(function() { | |
var gist_email = jQuery(this).closest("form").find("input[type=email]").val(); | |
gist.identify(gist_email); | |
}); | |
</script> |
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
<style> | |
@media only screen and (max-width: 480px) { | |
.gist-messenger-bubble-iframe iframe, .gist-notification-iframe iframe, .gist-post-small-iframe iframe, .gist-prompt-iframe iframe { | |
bottom: 80px!important; // Change the 80px to move the Messenger vertically from bottom edge fo the screen | |
right: 40px!important; // Change the 40px to move the Messenger horizontally from right edge fo the screen | |
// left: 40px!important; // Change the 40px to move the Messenger horizontally from left edge fo the screen | |
} | |
} | |
</style> |