Skip to content

Instantly share code, notes, and snippets.

@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / Keywordsforshopping
Created December 23, 2022 04:44 — forked from visar-brainlabs/Keywordsforshopping
Keywords for Google Shopping Campaigns
/**
*
* Exact Match For Shopping
*
* This script reads a list of exact match keywords for Shopping campaigns from a Google Doc,
* and then excludes any search queries from those camapigns if they do not match those keywords.
*
* Version: 1.0
* Google AdWords Script maintained by brainlabsdigital.com
*
;(function(u){
/**
* @desc Map your OneTrust tag IDs here to Tealium Template IDs found in utag.loader.cfg object like this:
* @param "OneTrust_tag_id": "Tealium_tid",
* @return You can add more lines to suit your tag library in both tools
*/
// Begin Config
var oneTrustTagIdToTealiumTemplateIdConfig = {
"81878": "7110", // e.g.: Google Analytics
@mbaersch
mbaersch / bot-detection-variable-gtm.js
Last active October 25, 2024 09:32
JavaScript Variable für Google Tag Manager zur Ermittlung eines Bot Markers (zur Verwendung als Benutzerdefinierte Dimension)
function(){
//----------------------------------------------------------------
// Erkennung von Crawlern anhand User-Agent oder Feature-Detection
//----------------------------------------------------------------
//Soll ein einmal bestandender Test innerhalb der Session reichen? Dann hier einschalten
var cache2Session = true;
// --- Ende Setup ---
@mbaersch
mbaersch / callback-example.js
Last active July 16, 2020 14:16
Upgrade Your Analytics Cookies to fight ITP2.1:
/* GTM : use the following code inside a customTask, hitCallback oder a cleanup tag
GA.JS : modify your existing tracking code with a customTask or hitCallback and execute the following code
GTAG.JS : modify your existing tracking code with a manual page_view event
including an event_callback (gtag.js) and execute the following code
customTask ga.js - see: https://developers.google.com/analytics/devguides/collection/analyticsjs/tasks#adding_to_a_task
hitCallback ga.js - see: https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits#hitcallback
event_callback gtag.js - see: https://developers.google.com/analytics/devguides/collection/gtagjs/sending-data#implement_event_callback_functions
*/
@mbaersch
mbaersch / gacode-example-gtag-js.html
Last active January 17, 2023 07:03
Write Google Analytics Client ID to localStorage
<!--
Replace existing standard gtag.js tracking-code with this
snippet in order to store the Client ID in localStorage and use this ID when present
converted for direct code implementation from Simo Ahava´s solution for GTM; see
https://www.simoahava.com/analytics/use-localstorage-client-id-persistence-google-analytics/
for details
Client IDs will survive deletion of cookies by user or ITP 2.1
@mbaersch
mbaersch / adwords-script-gurkenfinder.js
Last active October 20, 2020 08:36
Identifizieren von schlecht performenden Keywords und Produkten in AdWords
/**************************************************************/
/****** "Gurkenfinder"-Script für Google AdWords *******/
/**************************************************************/
/* v1.4 2020 Markus Baersch (@mbaersch)
Reduzierte Non-MCC-Fassung
gandke marketing & software - www.gandke.de */
/*********** Start Setup **********************/
var emailAddress = "[email protected]";
@kalharbi
kalharbi / zookeeper-solr-cloud.md
Last active February 22, 2022 02:58
Setting up an external Zookeeper Solr Cluster

Setting up an external Zookeeper Solr Cluster

This is a step by step instruction on how to create a cluster that has three Solr nodes running in cloud mode. These instructions should work on both a local cluster (for testing) and a remote cluster where each server runs in its own physical machine. This was tested on Solr version 5.4.1 and Zookeeper version 3.4.6

Installing Solr and Zookeeper

  • Download and extract Solr:
    • curl -O http://archive.apache.org/dist/lucene/solr/5.5.3/solr-5.5.3.tgz
    • mkdir /opt/solr
/**
* handles application/json content type requests
*/
component {
void function configure(){}
void function preProcess(event,struct interceptData){
var rc = event.getCollection();
if(isJSONRequest())