Skip to content

Instantly share code, notes, and snippets.

View BrunoBoehm's full-sized avatar

Bruno Boehm BrunoBoehm

View GitHub Profile
@wpflippercode
wpflippercode / gist:c920b59f4eee6c8edead58a2c96dd5c5
Created September 9, 2017 07:11
Show Markers on the Google Maps Using Remote JSON File
add_filter('wpgmp_marker_source','wpgmp_marker_source',1,2);
function wpgmp_marker_source($markers,$map_id) {
/* You can create array of the markers to add on the google maps dynamically. It's very useful hook if you want to fetch
locations from an external database, API, JSON or XML.
*/
$markers = array();
@litch
litch / shopify.md
Last active March 20, 2019 07:50 — forked from lambtron/shopify.md
segment event tracking for shopify
title sidebar
Segment Event Tracking for Shopify
Shopify

Segment makes it simple for Shopify merchants to integrate analytics, email marketing, advertising and optimization tools. Rather than installing all your tools individually, you just install Segment once. We collect your data, translate it, and route it to any tool you want to use with the flick of a switch. Using Segment as the single platform to manage and install your third-party services will save you time and money.

The guide below explains how to install Segment in your Shopify store. All you need to get up and running is copy and paste a few snippets of code into your theme editor. (You don't have to edit the code or be versed in JavaScript.) The following guide will show you how, step by step.


@nickboyce
nickboyce / instagram_count_to_googe_sheet.js
Last active February 14, 2024 05:15
Track your Instagram followers over time with Google Sheets Scripts
// Thank you to @juliendev for his script (updated here with minor cosmetic changes)
// https://gist.github.com/JulienDev/df5a3b66e899c224fa1b2dc90acfa2ae
// Your sheet name in the document
var sheetName = "Sheet1";
// Your instagram user id
var user_id = ""; //find your id here : https://codeofaninja.com/tools/find-instagram-user-id
var instagram_base_url = "https://www.instagram.com/graphql/query/";
var following = "?query_hash=58712303d941c6855d4e888c5f0cd22f&variables=%7B%22id%22%3A%22" + user_id + "%22%2C%22first%22%3A24%7D"
@WesleyDRobinson
WesleyDRobinson / Shopify Checkout Script
Last active October 25, 2019 23:58
Please see comments for more up to date implementations!!
<script type="text/javascript">
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1";
window.analytics.load("
@scottmagdalein
scottmagdalein / clickable-element.html
Last active March 15, 2023 18:01
Make the Mailchimp Subscriber popup appear on click
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>
@danielmcclure
danielmcclure / facebook-wca-standard-events.html
Last active January 14, 2024 14:54
Sample Facebook Standard Events for New Facebook WCA (Website Custom Audience) Pixel
<!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '{{facebook pixel}}');
fbq('track', 'PageView');
</script>
@lambtron
lambtron / shopify.md
Last active October 23, 2023 17:48
segment event tracking for shopify
title sidebar
Segment Event Tracking for Shopify
Shopify

Segment makes it simple for Shopify merchants to integrate analytics, email marketing, advertising and optimization tools. Rather than installing all your tools individually, you just install Segment once. We collect your data, translate it, and route it to any tool you want to use with the flick of a switch. Using Segment as the single platform to manage and install your third-party services will save you time and money.

The guide below explains how to install Segment in your Shopify store. All you need to get up and running is copy and paste a few snippets of code into your theme editor. (You don't have to edit the code or be versed in JavaScript.) The following guide will show you how, step by step.


@ciaranmahoney
ciaranmahoney / mixpanel-page-linktracking-wordpress.php
Last active March 24, 2017 15:12
This gist inserts MixPanel link click and pageview tracking scripts into a WordPress blog. It is intended to be included in footer.php so it can track pageview and clicks for all pages. In order for this to work, you must have a Mixpanel account and have Mixpanel tags setup on your website.
<!-- MixPanel Link click tracking - track clicks for all links -->
<script type="text/javascript">// <![CDATA[
mixpanel.track_links("a", "Link Click", {
"referrer": document.referrer
});
// ]]>
</script>
<!-- MixPanel Pageview tracking -->
<?php if( is_page()) { // Sets page type to Page for all pages ?>
@studiopress
studiopress / columns.css
Last active August 10, 2023 13:50
Genesis column classes.
/* Column Classes
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.one-fourth,
.one-half,
.one-sixth,
.one-third,