Skip to content

Instantly share code, notes, and snippets.

@padicode
padicode / gist:5245976
Created March 26, 2013 14:54
Custom PadiAct Action Template
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<style>
#padiact_overlay_div
{ }
@padicode
padicode / gist:5066547
Last active December 14, 2015 09:38
JavaScript hooks for PadiAct actions
<script type="text/javascript">
window.nrlskOnEvent = function(padiact)
{
if (padiact.type=='open')
{
// the code that needs to run when the PadiAct pop-up is displayed goes here
// example:
console.log ('PadiAct Showed Up');
// available vars:
// padiact.id (padiact campaign ID)
@padicode
padicode / gist:4731996
Last active December 12, 2015 06:49
dataLayer example for Google Tag Manager
dataLayer = [{
'page': 'search',
'searchedKeyword': 'rc car',
'visitorType': 'high-value',
'nrDisplayedResults': '70',
'appliedFilters': [ 'price' : '<10' , 'color' : 'red' ], //applied filters
'nrAvailableFilters': '4', // number of available filters
'priceRanges': [ '0-10$' : '23' , '11$-49$' : '2' , '50$-99$' : '45' ], //pricing range of products
'searchCategory': 'boyToys',
'productReviews': [ '0 reviews' : '68' , 'positive reviews' : '0' , 'negative reviews' : '2' ]