This file contains hidden or 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
<html> | |
<head> | |
<!-- Google Analytics snippet --> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | |
</script> | |
</head> |
This file contains hidden or 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
<html> | |
<head> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | |
</script> | |
</head> | |
<body> |
This file contains hidden or 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
<html> | |
<head> | |
<style media="screen"> | |
.red { | |
background-color: #F55D5B; | |
padding: 30px; | |
} | |
.bordered { | |
border: 2px solid #518CB6; |
This file contains hidden or 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
<script> | |
(function(i,s,o,g,r,a,m){ // Modified UA function to pre-set 'ga' queue forming. | |
var ga2fb = function(tracker) { // plugin constructor | |
this.tracker = tracker; | |
console.log('hello from constructor'); | |
// Copy the original hit dispatch function | |
var originalSendHitTask = this.tracker.get('sendHitTask'); | |
// Modify the existing hit dispatcher to log a copy of the hit | |
this.tracker.set('sendHitTask', function(model) { |
This file contains hidden or 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 customTask = function(model) { | |
// if using other task then custom don't forget to save and call the original task | |
// save the original task | |
var originalOtherTask = model.get('checkProtocolTask') | |
var hitType = model.get('hitType'); | |
if (hitType == 'event') { | |
var eventCategory = model.get('eventCategory') | |
var eventAction = model.get('eventAction') | |
} |
This file contains hidden or 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
/** | |
* Checks if campaig has and end date later then today | |
* | |
* @return {string} 'ENDED' if true 'IN PROGRESS' otherwise. | |
* example usage: | |
* while (campaignIterator.hasNext()) { | |
* var campaign = campaignIterator.next(); | |
* if (endedStatus(campaign) == 'ENDED') continue | |
* } | |
*/ |
This file contains hidden or 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 myFunction() { | |
try { | |
var message = '' | |
var response = TagManager.Accounts.list() | |
response.account.map(function(account) { | |
Logger.log('fetching changes for %s', account.name) | |
var containers = TagManager.Accounts.Containers.list(account.path) | |
Utilities.sleep(5000) | |
if (!containers.container) { | |
Logger.log('no containers for %s', account.name) |
This file contains hidden or 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
//Options setcion | |
var OPTIONS = { | |
'REPORT_URL': '', // url of existing report sheet. leave empty string to create new report when script runs | |
'LOOKBACK': '', // optional lookback for items selectors that picks non removed items in loookback period. Defolts to 'LAST_7_DAYS' | |
'EXTENSIONS': ['sitelinks', 'callouts', 'snippets'], // list of extnesions to check. Defaults to ['sitelinks', 'callouts', 'snippets', 'phoneNumbers'] | |
'FORCE_CHECK': true // If true will report if adgroup doesn't contain particular extension but it's available at campaign level. Defaults to false | |
} | |
function getOptions () { | |
var options = {} |
This file contains hidden or 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 someArray = [] | |
someArray.push = function (element){ | |
//Do what you want here... | |
if (element) { | |
console.log (element) | |
} | |
return Array.prototype.push.apply(this,arguments); | |
} |
This file contains hidden or 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 plain = { | |
'data.analytics.name': 'coehn', | |
'data.analytics.role': 'ninja' | |
} | |
var converted = function (plainObj) { | |
var converted = {} | |
for (var plainKey in plainObj) { | |
var nextStep = converted | |
var splitted = plainKey.split('.') |
OlderNewer