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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
window.utagQ = window.utagQ || {}, | |
utagQ.q = [], // the queue Array | |
utagQ.view = function (payload) { | |
utagQ.q.push({hit: "view", data: payload}); | |
}, | |
utagQ.link = function (payload) { | |
utagQ.q.push({hit: "link", data: payload}); | |
}; |
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
utagQ.view({ | |
virtualPageView: "y", | |
page: { | |
title: "the new document title", | |
language: "fr" | |
}, | |
url: "https://yoursite.com/de/theNewVirtualURL?query=somevalue", | |
user_loggedin: "n" | |
}); |
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
// This code needs to be implemented inside of Tealium! | |
// Make this your first DOM Ready Extension | |
// redefine queue functions to now fire normal utag.view / utag.link calls | |
if (window.utagQ) { | |
utagQ.view = function (payload) { | |
utag.view(payload) | |
}; | |
utagQ.link = function (payload) { | |
utag.link(payload) | |
}; |
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
const claimRequest = require('claimRequest'); | |
const getRequestBody = require('getRequestBody'); | |
const getRequestPath = require('getRequestPath'); | |
const getRequestQueryParameters = require('getRequestQueryParameters'); | |
const getTimestamp = require('getTimestampMillis'); | |
const returnResponse = require('returnResponse'); | |
const setResponseBody = require('setResponseBody'); | |
const setResponseStatus = require('setResponseStatus'); | |
const getRequestMethod = require('getRequestMethod'); | |
const getContainerVersion = require('getContainerVersion'); |
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
import os | |
from asyncio import Future | |
import json | |
from typing import Dict | |
from flask import Request | |
from google.cloud import pubsub | |
from firestore.reference import FireRef | |
publish_client = pubsub.PublisherClient() | |
def pubsub_stitcher(request: Request): |
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
//tealium universal tag - utag.loader ut4.48.##UTVERSION##, Copyright ##UTYEAR## Tealium.com Inc. All Rights Reserved. | |
// ATTENTION WHEN UPDATING THIS TEMPLATE!! | |
// CONTAINS CUSTOM CHANGES TO TEMPLATE (search for // CHANGE)!! | |
// CHANGE - Add TMSHelper Debugging Output | |
/** | |
* To start debug output to your console, open your browser console and run: | |
* TMSHelper.dbgActivate(); | |
* A cookie "teal_dbg" will be created. To stop debug output, delete that cookie | |
*/ |
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
/* Prerequisites: | |
MOCHA JS and CSS and CHAI JS Libraries must have loaded prior to this script | |
*/ | |
/* uncommenting the next row disables the test output to the console, | |
eg if you want to see the results visually in the browser window. | |
For this, a DIV with an id="mocha" must have been inserted into the page. | |
*/ | |
mocha.reporter(mocha.WebKit); |
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
/* 1. Metrics to monitor the general page loading performance. I call them "poor man's page performance metrics", | |
because they are the minimum you should do in terms of page performance measurement in your Analytics: | |
a) Time from starting to navigate to page until Server Response time: | |
While this does not represent perfectly if the server does its job, it is a good enough proxy | |
to "how long did the user see nothing" after clicking to the page and usually does indicate server response issues. | |
b) Time until DOM became interactive: A close equivalent to the good old "DOM Ready" event. | |
It shows the time when the document has been fully parsed, so that still happens before your hopefully async TMS library is loaded. |