Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:
- chrome://help in a browser window
- Click Detailed Build Information
- Change Channel
- Select Beta (Or Dev, if you're feeling adventurous)
const puppeteer = require('puppeteer') | |
const browser = await puppeteer.launch() | |
const page = await browser.newPage() | |
await page.goto('https://e-food.gr/') | |
const dl = JSON.parse( | |
await page.evaluate(() => JSON.stringify(window.dataLayer)) | |
) |
(function() { | |
// Set the timeout for when the dataLayer history should be purged. The default is 30 minutes. | |
// The timeout needs to be in milliseconds. | |
var timeout = 30*60*1000; | |
// Change dataLayerName only if you've defined another named for the dataLayer array in your | |
// GTM container snippet. | |
var dataLayerName = 'dataLayer'; | |
// Don't change anything below. |
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) |
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; |
# based on https://github.com/ryansb/sklearn-build-lambda | |
$ mkdir ~/.aws | |
$ cat >> ~/.aws/config | |
[default] | |
aws_access_key_id=YOUR_ACCESS_KEY_HERE | |
aws_secret_access_key=YOUR_SECRET_ACCESS_KEY | |
region=YOUR_REGION (such as us-west-2, us-west-1, etc) | |
import io | |
import picamera | |
import cv2 | |
import numpy | |
def hitGA(faces): | |
print("Sending to GA") | |
requests.get("http://www.google-analytics.com/collect?v=1" \ | |
+ "&tid=YOUR_UA_TRACKING_ID_HERE" \ | |
+ "&cid=1111" \ |
#!/bin/bash | |
# Usage: mkproj [projectname] | |
# projectname defaults to name of current directory | |
template="Version: 1.0\nRestoreWorkspace: Default\nSaveWorkspace: Default\nAlwaysSaveHistory: Default\n\nEnableCodeIndexing: Yes\nUseSpacesForTab: Yes\nNumSpacesForTab: 4\nEncoding: UTF-8\n\nRnwWeave: knitr\nLaTeX: pdfLaTeX" | |
wd=$(basename `pwd`) | |
if [ -z $1 ]; then |
let Nightmare = require('nightmare'); | |
let harPlugin = require('nightmare-har-plugin'); | |
let options = { | |
waitTimeout: 1000 | |
}; | |
harPlugin.install(Nightmare); | |
let nightmare = Nightmare(Object.assign(harPlugin.getDevtoolsOptions(), options)); |
""" | |
Using "requests" to access Google Analytics Realtime Reporting API from python service | |
NOTE on google docs: The realtime reporting docs have samples for google-api-python-client. | |
**They do not work** at the time of this writing. The GA docs sample seems to refer to features that don't actually exist. | |
In any case, the new RR API is restfull and requests is a pleasent library so here is how to use it instead. | |
pip requirements: oauth2client, requests | |
""" |