Skip to content

Instantly share code, notes, and snippets.

View dorian-davis's full-sized avatar

Dorian dorian-davis

  • Atlassian
View GitHub Profile
@christmmurphy
christmmurphy / Intercom_WordPress_Event.markdown
Last active February 8, 2017 16:09
WordPress Events with Intercom

Using Intercom Events in WordPress

If you don't have direct access to your WP app but want to trigger events you can paste Javascript into the WordPress UI and have it run.

WordPress automatically wraps all your code in <p> tags which prevents anything from executing properly- we'll need to stop this. There's a useful extension for WordPress called wpautop which will allow you to pick what pages you don't want this behaviour on and allow you to execute events correctly.

###Steps

  • Install the wpautop plugin for your site
@beastawakens
beastawakens / gtm-intercom.js
Created January 22, 2016 14:33
Adding Google Tag Manager variables to intercomSettings
<script>
// app ID
var intercomSettings = {
app_id: "{{IC - Dynamic app ID}}"
};
// Verifies and cleans all GTM variables
function pushGTMVariablesToIntercom(gtmKey, gtmValue) {
if("{{User - Account - Type}}" != "Guest"){
if(gtmValue != null && gtmValue != "" && gtmValue != "undefined") {
@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');