Skip to content

Instantly share code, notes, and snippets.

@IronistM
IronistM / magic_script_modified.js
Last active March 31, 2019 11:48
A mash-up of the Magic Script with Measument protocol hits to track usage of the Spreadsheet and log events. #analytics #drive
/**
* A script to automate requesting data from Google Analytics.
*
* @author [email protected] (Nick Mihailovski)
*/
/**
* The name of the configration sheet.
* And various parameters.
@laracasts
laracasts / MailTestCase.php
Created June 14, 2014 22:35
Use Mailcatcher to test email.
<?php
use GuzzleHttp\Message\Response;
class MailTestCase extends TestCase {
protected $mailcatcher;
function __construct()
{
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 4, 2025 21:20
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@johnnyopao
johnnyopao / GAclientidUnbounce.md
Last active December 15, 2022 11:43
GA Cross domain: Carry Analytics ClientID across domains

GA Cross domain tracking: Carry over Analytics ClientID across domains

Google Analytics

This code is used to track users in GA across two completely different root domains (A.com to B.com). Insert the code below into your Unbounce landing page.

<script>
  $('.lp-pom-button, .lp-pom-text a, .lp-pom-image a').click(function(event) {
 var parentClass = $(this).parent().attr('class');
@siliconvallaeys
siliconvallaeys / Analyze Close Variant Search Terms
Last active July 24, 2019 03:11
Compare phrase and exact match Google Ads keywords with the close match variants they are shown for
// Report on how close variants relate to your keywords in Google Ads
// Free AdWords Script courtesy of Optmyzr.com
// September 12, 2018
function main() {
// -----------------
// Edit this section with your preferences
// ----------------
var time = 'LAST_30_DAYS';