Skip to content

Instantly share code, notes, and snippets.

View Webmasterei's full-sized avatar

Bernhard Prange Webmasterei

View GitHub Profile
<script>
/*
Put this in a Matomo Tag Manager Container in order to copy each fresh event from the dataLayer to Matomo.
*/
window.dataLayer = window.dataLayer || [];
window._mtm = window._mtm || [];
var originalPush = dataLayer.push;
dataLayer.push = function() {
var args = Array.prototype.slice.call(arguments);
originalPush.apply(dataLayer, args);
@Webmasterei
Webmasterei / search-queries-in-google-docs
Created September 20, 2017 19:18 — forked from derekmartinla/search-queries-in-google-docs
Perform Search Query Analysis In One Google Doc
/**********************************************************************************************
* AdWords Account Management -- Review Search Queries & Post Adjustments via Google Docs.
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com & MixedMarketingArtist.com
*********************************************************************************************/
var GOOGLE_DOC_URL = "put your url here";
var START_DATE = '20150401';
var END_DATE = '20150415';
var DESIRED_ROAS = 3.0; // this is the Return on Ad Spend that you are seeking (i.e. 3x1), different from ROI
var PROFIT_MARGIN = 0.25; // this is the standard profit margin that will be used for bid calculations
var MERCHANT_ID ='12345'; // this is the id found at the top right of your Merchant Center account
var DEFAULT_CONVERSION_RATE = 0.02; // set a minimum conversion rate expectation. More on this later
var START_PERIOD = '20160101'; // beginning of the optimization window
var END_PERIOD = '20160131'; // end of optimization window
@Webmasterei
Webmasterei / autoExcludeAdGroupKeyWords.js
Last active February 15, 2018 09:26
[Adwords Script] Auto Exclude keywords from labeled AdGroups in another labeled AdGroup
//------------------------------------------------
// This Script aims to Auto-Exclude Keywords
// from source labeled AdGroups and place them as
// negative Keywords within another AdGroup within
// the same Campaign
// This Script was built for Campaigns splitted in
// BROAD MATCH and EXACT MATCH Keywords AdGroups.
// More info: https://webmasterei-prange.de/adwords-script-automatisches-ausschliessen-von-keywords-in-anzeigengruppen
// Strongly inspiered by: Remko van der Zwaag & PDDS see: http://remkovanderzwaag.nl/blog/updated-adwords-script-auto-add-negative-keywords-dsa
@Webmasterei
Webmasterei / cacheCleaner.sh
Created February 5, 2016 10:40
Script to delete Magento Cache that is older than...
#!/bin/sh
MAGENTOROOT="htdocs"
### Delete Frontpage Cache that is older than one day. ###
find $MAGENTOROOT/var/cache/fpc* -type f -mmin +3600 -exec rm {} \;
### Delete Magento Caches that are older than 120min ###
find $MAGENTOROOT/var/cache/mage* -type f -mmin +120 -exec rm {} \;
#### Delete repotrts older than 7 days ###
find $MAGENTOROOT/var/report/ -mtime +7 -exec rm -f {} \;
#### Delete session data (should be the same time as session cookie time) ###
find $MAGENTOROOT/var/report/ -mmin +120 -exec rm -f {} \;