Skip to content

Instantly share code, notes, and snippets.

[
{
"url": "//www.onionstudios.com/embed?id=4838",
"weight": 11
},
{
"url": "//www.onionstudios.com/embed?id=4839",
"weight": 11
},
{
@spra85
spra85 / FMG-SDK-GA-Notes.md
Created October 24, 2017 23:13
FMG SDK GA notes

FMG SDK notes on direct GA implementation

Mapping of GA dimensions to object properties

Should be a central configuration in the SDK that contains a mapping of dimension[1,2,33,44,etc] to what metadata key they should be using to retrieve the value.

For instance, given the following central config mapping:

{

FMG Video Event - Examples

Below making assumption that these are the following dimensions:

  • dimension42 - video id
  • dimension121 - player position (NEW?)
  • dimension50 - player version (NEW)
  • dimension129 - content source (NEW)

Requirement is that each instance of a JWPlayer video player has its own namespaced client-side GA tracker

Add lazy attribute to campaign-display

<campaign-display
                  class="campaign-display-drawerered"
                  preamble-text="{{ special_coverage.name }} by"
                  src="{% content_tunic_campaign_url special_coverage.tunic_campaign_id %}"
                  placement="recirc"
                  name-only
 no-link

Currently

var adUnits = require('./ad-units');
var ERROR = 'error';
var TABLE = 'table';

var AdManager = function(options) {
  var defaultOptions = {
    doReloadOnResize: true,
@spra85
spra85 / Rick Roll.js
Created February 10, 2017 10:52
RickRoll
var audio,music,musicParse;audio="",musicParse=function(f){return eval("for(var t=0,S='RIFF_oO_WAVEfmt "+atob("EAAAAAEAAQBAHwAAQB8AAAEACAA")+"data';++t<3e5;)S+=String.fromCharCode("+f+")")},(music=function(){var a;return a="(t<<3)*[8/9,1,9/8,6/5,4/3,3/2,0][[0xd2d2c8,0xce4088,0xca32c8,0x8e4009][t>>14&3]>>(0x3dbe4688>>((t>>10&15)>9?18:t>>10&15)*3&7)*3&7]&255",audio=new Audio("data:audio/wav;base64,"+btoa(musicParse(a))),audio.play()})();
@spra85
spra85 / American-Voters.md
Last active February 6, 2017 09:31
Example of super features JSON

Amazon Notes

All of this work should be isolated to the bulbs-public-ads-manager.

This custom criteria key they use is amznslots. We do use async mode, e.g. amznads.setTargetingForGPTAsync

Step 1

<script type='text/javascript'>

Evented

DFP creative:

// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent
<script>
  let event = new CustomEvent('post:scroll', { post_id: 1 });
  document.dispatchEvent(event);
</script>
<html>
<head>
<link href="//assets3.onionstatic.com/onionstatic/onion/static/css/main.a57903f7bd2d.css" rel="stylesheet" type="text/css" />
</head>
<body>
<share-tools class="circle-transparent current-video-share-tools" share-url="http://www.theonion.com/video/salt-lake-city-hoping-to-boost-tourism-by-remindin-36744/v/2158" share-title="Salt Lake City Hoping To Boost Tourism By Reminding Visitors They’re Free To Leave At Any Time" share-track-action="Single Series: Share">
<share-via-facebook icon=""><a data-reactroot="" class="share-via-facebook" href="#" data-track-label="Facebook"><i class="share-button-icon fa fa-facebook"></i></a></share-via-facebook>
<share-via-twitter icon="" twitter-handle="the-onion"><a data-reactroot="" class="share-via-twitter" href="#" data-track-label="Twitter"><i class="share-button-icon fa fa-twitter"></i></a></share-via-twitter>
<share-via-email icon="" message="via%20theonion.com"><a data-reactroot="" class="share-via-email" href="mailto:?subj