Skip to content

Instantly share code, notes, and snippets.

View adardesign's full-sized avatar
🎯
Focusing

Eliazer Braun adardesign

🎯
Focusing
View GitHub Profile
@adardesign
adardesign / gtm-code.txt
Last active March 26, 2024 16:01
paypal-insight-sdk-extended
​<script>
try{
var eventName = {{Event}}
if(eventName === "checkout-event"){
var data = {{dlv - data}};
if(data.includes("payment method selected")){
eventName = 'select_payment_method';
}
if(data.includes("contact info submitted")){
eventName = "submit_checkout_email";
// WPR20-101
adrma.init.add({
name: "annexCloudPixel",
cb: function() {
//if (adrma.siteSettings.enableAnnexCloud === false) return; // no need to create a siteSetting, this is just a hook in case we want to kill this.
adrma.receipt.gotSummary.then(function gotReceiptSummary(response) {
if (!adrma.receipt.isLoadedFirstTime(response.data.orderId, "annexCloud")) return;
var coupons = response.data.summary.coupons;
// TODO: since this is a array, get the coupon codes string, and the first only
@adardesign
adardesign / perf-diagnostics.css
Created January 12, 2021 15:48 — forked from tkadlec/perf-diagnostics.css
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
$.when(adrma.fetchData({
url: "https://pay.google.com/gp/p/js/pay.js",
dataType: "script",
}),
adrma.fetchData({
url: "https://js.braintreegateway.com/web/3.64.1/js/client.min.js",
dataType: "script",
}),
{
"status": "success",
"type": "GetPageData",
"data": {
"cursorData": {
"total": 2000,
"startAt": 40
},
"productList": [
"INKD750",
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="" />
<meta name="viewport" content="width=device-width">
<title>Box Style Change</title>
// WEB-48778
(function() {
if (adrma.pageInfo.pageType === "receiptPage") {
window.BOOMR_config = {
autorun: false
};
BOOMR = window.BOOMR || {};
BOOMR.debug = true;
adrma.invisibleParameterToJSON = function invisibleParameterToJSON() {
var parsedInvisParam = {},
invisParam = adrma.cookie("InvisibleParameter");
if(!invisParam) return false;
if (invisParam) {
invisParam.split('&').forEach(function(val, i) {
var tempArr = val.split("=");
var value = adrma.ifBoolParse(tempArr[1]);
if (value === '') value = null;
parsedInvisParam[tempArr[0]] = value;
@adardesign
adardesign / itemsInCart.json
Created November 26, 2015 18:53
Handling isBundle - WEB-34571
{
"125826997": {
"id": "125826997",
"rebates": [
{
"text": "This bundle is eligible for a $350 mail In rebate",
"link": "http://www.adorama.com/pdfs/rebates/CanonNMIR.pdf"
}
],
"isBundle":"ICAT5IK1Z",
@adardesign
adardesign / buyNow.js
Last active December 28, 2015 23:24 — forked from RuslanSushko/buyNow.js
(function() {
adrma.session.getSession.done(function gotSession(session) {
var buyNowButton,
productInfoContainer = $(".product-info-container");
if (productInfoContainer.find(".vipProduct").length) {
//WEB-31841
return;
}