Skip to content

Instantly share code, notes, and snippets.

View jonathanheron's full-sized avatar

Jonathan Heron jonathanheron

View GitHub Profile
@jonathanheron
jonathanheron / gist:5232c5892ddc355780de26a503f04dc7
Created December 21, 2018 19:58
All current paying UFB users
with paid_orgs as (
SELECT
o.id
FROM organization_has_package ohp, package p, organization o, payment_plan pp
WHERE o.isdeleted='false'
AND o.istest='false'
AND ohp.organizationid=o.id
AND p.subscriptiontype = 'content'
AND ohp.id = (
<script>
var intercomSettings = {
app_id: 'YOUR_APP_ID'
};
</script>
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/YOUR_APP_ID';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
@jonathanheron
jonathanheron / gist:995c2bd91a4dca1f3a37
Last active August 29, 2015 14:19
Installation snippet for Intercom Messenger for the Acquire plan, for customers integrating via Segment's analytics.js
<!-- Add this just before you load analytics.js -->
<!-- Replace 'APP_ID' with your app ID -->
<script>
window.intercomSettings = { app_id: 'APP_ID' };
</script>
@jonathanheron
jonathanheron / gist:5910535ce7d393193311
Last active October 1, 2015 13:43
Installation snippet for Intercom Messenger for the Acquire plan
<!-- Add this just before your closing </body> tag -->
<!-- Replace 'APP_ID' with your app ID -->
<script>
window.intercomSettings = { app_id: 'APP_ID' };
</script>
<!-- Replace 'APP_ID' with your app ID -->
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/APP_ID';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
<script>
window.intercomSettings = {
app_id: "vegqi3o2",
anonymous: true
};
</script>
@jonathanheron
jonathanheron / gist:704c1fddfd7863ae3744
Created March 27, 2015 12:16
Basic Acquire snippet for Segment
<!-- Put this before the tag which loads Segment -->
<!-- Replace APP_ID in the tag below -->
<script>
window.intercomSettings = {
app_id: "APP_ID",
anonymous: true
};
</script>
@jonathanheron
jonathanheron / gist:cd4e9fbef4a490ff743c
Created March 27, 2015 12:14
Basic Acquire snippet
<!-- Replace APP_ID in the tag below -->
<script>
window.intercomSettings = {
app_id: "APP_ID",
anonymous: true
};
</script>
<!-- Replace APP_ID in the tag below -->
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/APP_ID';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
@jonathanheron
jonathanheron / gist:2d2b08507e6f752589a9
Created March 26, 2015 21:15
Acquire for BusyBusy.com
<script>
window.intercomSettings = {
app_id: "g7z2j2lo",
anonymous: true
};
</script>
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/g7z2j2lo';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>
@jonathanheron
jonathanheron / gist:95cb34b9f5886bdf1889
Created March 26, 2015 21:01
GoGuardian minimal snippet
<script>
window.intercomSettings = { app_id: '2hqufgsj', anonymous: true };
</script>
<!-- Insert Segment snippet here -->
<script>
window.intercomSettings = {
app_id: "p80h5tj0",
anonymous: true
};
</script>
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/p80h5tj0';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()</script>