This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2013-2018 Snowplow Analytics Ltd. All rights reserved. | |
# | |
# This program is licensed to you under the Apache License Version 2.0, and | |
# you may not use this file except in compliance with the Apache License | |
# Version 2.0. You may obtain a copy of the Apache License Version 2.0 at | |
# http://www.apache.org/licenses/LICENSE-2.0. | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the Apache License Version 2.0 is distributed on an "AS | |
# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="customTaskWrapper"> | |
<table> | |
<thead> | |
<tr> | |
<th>Click to select which feature(s) to include</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td data-customtask-id='cid' data-customtask-selected='false'>Client ID as a Custom Dimension</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
// Update this array with the class names | |
var classes = ['class1', 'class2', 'class3']; | |
// Fetch elements | |
var els = document.querySelectorAll('.' + classes.join(',.')) | |
return [].map.call(els, function(e) { | |
// Get first matching class name per element | |
return classes.filter(function(c) { | |
return e.className.indexOf(c) > -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _customTask = function () { | |
// customTask Builder by Simo Ahava | |
// | |
// More information about customTask: https://www.simoahava.com/analytics/customtask-the-guide/ | |
// | |
// Change the default values for the settings below. | |
// clientIdIndex: The Custom Dimension index to where you want to send the visitor's Client ID. | |
// https://bit.ly/2Ms0ZcC | |
var clientIdIndex = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var oldPush = window.dataLayer.push; | |
window.dataLayer.push = function() { | |
var states = [].slice.call(arguments, 0); | |
states.forEach(function(s) { | |
if (!s.hasOwnProperty('event')) { | |
s.event = 'default'; | |
} | |
}); | |
return oldPush.apply(window.dataLayer, states); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
___INFO___ | |
{ | |
"type": "CLIENT", | |
"id": "cvt_temp_public_id", | |
"__wm": "VGVtcGxhdGUtQXV0aG9yX0FkdmFuY2VkVW5pdmVyc2FsQW5hbHl0aWNzLVNpbW8tQWhhdmE\u003d", | |
"categories": [ | |
"ANALYTICS" | |
], | |
"version": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
___INFO___ | |
{ | |
"type": "CLIENT", | |
"id": "cvt_temp_public_id", | |
"__wm": "VGVtcGxhdGUtQXV0aG9yX0FkdmFuY2VkVW5pdmVyc2FsQW5hbHl0aWNzLVNpbW8tQWhhdmE\u003d", | |
"categories": [ | |
"ANALYTICS" | |
], | |
"version": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gtag('policy', 'all', function(container, policy, data) { | |
switch (policy) { | |
// Only allow _ga cookie to be set. | |
case 'set_cookies': | |
return data.name === '_ga'; | |
// All other permission requests are allowed. | |
case 'access_response': | |
case 'access_template_storage': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
___INFO___ | |
{ | |
"type": "TAG", | |
"id": "cvt_temp_public_id", | |
"version": 1, | |
"securityGroups": [], | |
"displayName": "Event data to BigQuery", | |
"brand": { | |
"id": "brand_dummy", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
___INFO___ | |
{ | |
"type": "TAG", | |
"id": "cvt_temp_public_id", | |
"version": 1, | |
"securityGroups": [], | |
"displayName": "Facebook", | |
"brand": { | |
"id": "brand_dummy", |
OlderNewer