Skip to content

Instantly share code, notes, and snippets.

@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';
@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');
@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)

@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()
{
@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.
/*********************************************
* Automated Creative Testing With Statistical Significance
* Version 2.1
* Changelog v2.1
*   - Fixed INVALID_PREDICATE_ENUM_VALUE
* Changelog v2.0
*   - Fixed bug in setting the correct date
*   - Script now uses a minimum visitors threshold
*        per Ad instead of AdGroup
*   - Added the ability to add the start date as a label to AdGroups
@mdirienzo
mdirienzo / README.md
Last active December 2, 2020 08:04
Progress Bars - An animated progress bar widget for Dashing.

Progress Bar Widget

Description

A widget made for Dashing. This widget shows multiple animated progress bars and reacts dynamically to new information being passed in. Anything with a current state and with a projected max/goal state can easily be represented with this widget. Some sample ideas would be to show progress, completion, capacity, load, fundraising, and much more.

Features

  • Animating progress bars - Both the number and bar will grow or shrink based on new data that is being passed to it.
  • Responsive Design - Allows the widget to be resized to any height or width and still fit appropriately. The progress bars will split up all available space amongst each other, squeezing in when additional progress bars fill the widget.
@earino
earino / script.js
Created November 23, 2012 22:42
Poor Man's Nagios
/**
* This function fetches a url and gets some of the instrumentation data.
*
* @param url the Url to fetch and instrument
* @return an object which contains the status code, latency, and contentLength.
*/
function fetchUrl(url) {
try {
var start = new Date().getTime();
var resp = UrlFetchApp.fetch(url);
@alexnederlof
alexnederlof / selenium-start-stop.sh
Created November 20, 2012 19:49
Selenium start-stop script
#!/bin/bash
# Note that this script requires you to have
# an X window running on Display :90
# This can be done by running: /usr/bin/Xvfb :90 -ac -screen 0 1024x768x8 &
#
# You can save this script as /etc/init.d/selenium to start and stop selenium
PORT=4443
DESC="Selenium server"
@duyamin
duyamin / gist:3834730
Created October 4, 2012 16:23 — forked from observerss/gist:3798896
Google Keyword Tool Scraper(selenium+python version)
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
import selenium.webdriver.support.wait
selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05
import re
import random
import collections
class AdwordsAutomater(object):