Skip to content

Instantly share code, notes, and snippets.

@keithws
keithws / gtm-ipify.html
Created September 21, 2018 22:40
Get IP address and add it to the Google Tag Manager data layer. Uses the free ipify.org service and intelligent caching to minimize requests.
<script>
/*
* get ip address and add it to the GTM data layer
* uses the free ipify.org service
* and intelligent caching to minimize requests
*/
// mark the start of the script loading
window.dataLayer = window.dataLayer || [];
@keithws
keithws / json-beautify-bootstrap.js
Last active September 7, 2021 15:24
code to pretty-print JSON responses in the browser
/*
* load the JSON Beautify source
* and let client cache it for 24 hours
*/
(function () {
var now, script, today, url;
url = "https://gist.githubusercontent.com/keithws/6b5333dd09753c26d8cec19414fca2fc/raw/9ae2d49d89b523f1522280eb940456ac49d48f43/json-beautify.js";
now = Date.now();
@keithws
keithws / download-jive-users-with-points.js
Last active April 2, 2020 00:47
Download a CSV file of all users with points in the Jive Rewards system for your community.
/*
* get users with points from Jive Rewards
* this code is meant to be injected into the browser console at
* https://rewards.jivesoftware.com/
* start by logging into your Jive Community and then
* visit the Jive Rewards Console (in your profile menu)
*
* after injection, it will add a "Download CSV" link in the page
* click the link to download a CSV of all Jive Users with Points
*/