Skip to content

Instantly share code, notes, and snippets.

View alewolf's full-sized avatar

Aleksandar alewolf

View GitHub Profile
@alewolf
alewolf / gist:daae9228b396e3fd6216b5d72af17da7
Last active November 17, 2017 20:52
AdWords Script: Triple Match
// Title: Triple Match
// Descritpion: Adds the missing match types of each keyword in every ad group
// Author: Wolf+Bär Agency, Aleksandar Vucenovic
// License: GNU GPLv3
// Version: 0.1
// URL: https://gist.github.com/alewolf/daae9228b396e3fd6216b5d72af17da7
// URL:
// START Settings
@alewolf
alewolf / gist:91bc532014453ec2eac801bf342ee1f9
Last active November 28, 2017 11:00
AdWords MCC Script: Switch all broad match keywords to modified broad match
/*
* Title: Modified Broad Match MCC
* Descritpion: Switch all broad match keywords to modified broad match
* Author: Wolf+Bär Agency, Aleksandar Vucenovic
* License: GNU GPLv3
* Version: 0.4
* URL: https://gist.github.com/alewolf/91bc532014453ec2eac801bf342ee1f9
* URL:
*/
@alewolf
alewolf / gist:e6fcecfba548c765a4ad52d46abcd81e
Last active May 5, 2020 20:41
AdWords Script: Switch all broad match keywords to modified broad match
// Title: Modified Broad Match
// Descritpion: Switch all broad match keywords to modified broad match
// Author: Wolf+Bär Agency, Aleksandar Vucenovic
// License: GNU GPLv3
// Version: 0.3
// URL: https://gist.github.com/alewolf/e6fcecfba548c765a4ad52d46abcd81e
// URL:
// START Settings
@alewolf
alewolf / search-results.php
Last active May 30, 2023 23:45
SearchWP Live Ajax Search results with thumbnails
<?php
/**
* This template adds thumbnails to your SearchWP Live Ajax Search results.
*
* Create a folder called searchwp-live-ajax-search in your child theme folder and copy this file in there.
* In order for this to work you require the SearchWP and SearchWP Live Ajax Search plugins installed and active.
*
*/
?>
@alewolf
alewolf / gist:2d8e85a9a753fa5ee4039fb1f779f878
Last active November 17, 2017 21:09
Automatic AdWords Website Phone Conversion Script
<script type="text/javascript">
// In contrary to the original AdWords Phone Conversion Tracking Script this version doesn't require changes on the website. It even can implemented using Google Tag Manager.
// The original AdWords script requires an additional <span> element with an id that encloses the phone number.
// This new script doens't require that span element anymore. It autoaticall searches through the entire document and changes all phone numbers that match. Also it searches through all href sources and changes the phone number there too (for clickable phone numbers).
// In this version of the script there is one requirement though. The phone number on the website has to bee written in the exact same format, with spaces, etc. Only then the script will find and exchange the numbers.
// AdWords phone conversion ID. Since this is a number no quotation marks are necessary.
var gak = CONVERSION_ID; // eg. 12345678912
// AdWords conversion label
@alewolf
alewolf / gist:275278f1da379b56512d
Last active May 5, 2020 09:10
MaxMind GeoIP city locator for unbounce forms
<script type="text/javascript">
$( window ).load(function(){
$.getScript("//geoip-js.com/js/apis/geoip2/v2.1/geoip2.js", function() {
var onSuccess = function(geoipResponse) {
// change '#lp-pom-form-64 #city' to match your form ID and field name
$('#lp-pom-form-64 #city')[0].value = geoipResponse.city.names.en;
};