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
<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 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 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 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 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 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 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 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 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('.') |
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 main() { | |
var budgetOrderIterator = AdWordsApp.budgetOrders() | |
.withCondition("Status = ACTIVE") | |
.get(); | |
while (budgetOrderIterator.hasNext()) { | |
var budget = budgetOrderIterator.next(); | |
Logger.log('getName %s, getSpendingLimit %s, getStartDateTime %s', | |
budget.getName(), budget.getSpendingLimit(), budget.getStartDateTime()) | |
} | |
var available = budget.getSpendingLimit() |
OlderNewer