Skip to content

Instantly share code, notes, and snippets.

View siggi-hs's full-sized avatar

Sigurdur Arni Svanbergsson siggi-hs

View GitHub Profile
<!-- Page hiding snippet (recommended by Google) -->
<!--
<style>.async-hide { opacity: 0 !important} </style>
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
})(window,document.documentElement,'async-hide','dataLayer',4000,
{'GTM-6JHN':true});</script>
-->
[
{
"streetAddressHeading": "Address",
"branchCode": "Mäster Samuelsgatan",
"branchImage": "https://www.happysocks.com/media/wysiwyg/Concept-stores/2018/stockholm/sthml-1.jpg",
"subtitle": "Concept store",
"streetAddress": "Mäster Samuelsgatan 9",
"postalCode": "111 44",
"addressLocality": "Stockholm",
"addressCountry": "Sweden",

Basic campaign page

A basic campaign page is a standalone page featuring selected products that are currently being promoted by the marketing team. The page usually has a custom background pattern related to the campaign as well as custom font sizes. These font sizes consist of a big header, a hero copy for the campaign (and perhaps a disclaimer) and in some cases a campaign logo is added below the HappySocks® logo.

The process of adding these campaign pages is not very elegant since they need to be added manually to local.xml and gruntfile.js. In the future this will be replace with CMS pages and widgets. But for now, this is what we got.

Examples of basic campaign pages on staging-release

/* Hotjar needs to run first */
/* _optimizely_evaluate=force */
(function() {
var returnVal = "";
if (optimizely.activeExperiments.length > 0) {
var experimentId;
var experimentName;
var variationName;
var delimiter = "_";
var namesCombo;
on run {input, parameters}
set the clipboard to "POP87-6000"
delay 0.5
tell application "Google Chrome" to activate
tell application "System Events"
-- Select prodcut from dropdown
keystroke tab
keystroke tab
<div vocab="http://schema.org/" typeof="IndividualProduct">
<h1 property="name">Faded Diamond Socks Gift Box</h1>
<a property="url" href="https://www.happysocks.com/us/faded-diamond-gift-box.html">
<img property="image" title="Origami Socks Gift Box" width="200" height="281" src="https://d3uuidmcu3kt5g.cloudfront.net/media/catalog/product/cache/15/small_image/200x281/9d1325c86aa13970ba5272241042ed09/X/O/XORI09-6000_thumb.png">
</a>
<div property="offers" typeof="Offer">
<meta property="priceCurrency" content="USD" />