Skip to content

Instantly share code, notes, and snippets.

View rickydazla's full-sized avatar

Rick Davies rickydazla

View GitHub Profile

Getting out on Monday...

  • Brooke and Juicy Lou meeting R&K @ Camp Avo. ~9am
  • Distribute provisions and hit the road

🚦 Probable route (101, I-5, CA-99, CA-180) stopping at:

  • ℹ️ Hume Lake Ranger District Office for campfire permits and info about:
    • Western & Eastern Big Meadows Road: dispersed road-side sites > "Many big free sites, some with picnic tables and fire rings, views of the mountains and the sunsets were mind blowing. Very quiet."
{% comment %}
See here for getting Conversion ID and Label
https://www.en.advertisercommunity.com/t5/AdWords-Tracking-and-Reporting/Finding-you-Google-Adwords-Conversion-ID/td-p/1119060#
{% endcomment %}
{% if first_time_accessed %}
{% assign google_conversion_id = 123456 %}
{% assign google_conversion_label = 'xyz789' %}
{% assign shopify_store_country = 'US' %}
<script type="text/javascript">
var google_tag_params = {
@rickydazla
rickydazla / redirect.liquid
Last active May 3, 2023 13:04
Liquid Re-Direct Snippet
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url={{ redirect }}">
<script type="text/javascript">
window.top.location.href = "{{ redirect }}"
</script>
<title>Page Redirection</title>
</head>
@rickydazla
rickydazla / settings_schema.json
Created April 10, 2017 15:16
Custom social widget for Shopify using SymbolSet Social Icon fonts
{
"name": "Socializer",
"settings": [
{
"default": "disabled",
"id": "socializer_style",
"label": "Select social icons style",
"options": [
{
"label": "Disabled",
var KlaviyoSubscribe = KlaviyoSubscribe || {};
(function() {
if (!KlaviyoSubscribe._loaded) {
KlaviyoSubscribe._loaded = !0;
var m = {
"modal.html": '<div class="klaviyo_modal" style="display:none;"><div class="klaviyo_inner"><a href="#" class="klaviyo_close_modal klaviyo_header_close">&times;</a><form action="" method="POST" novalidate="novalidate" class="klaviyo_subscription_form"><input type="hidden" name="g" value="" /><p class="klaviyo_header"></p><p class="klaviyo_subheader"></p><div class="klaviyo_fieldset"></div><div class="klaviyo_fine_print"></div><div class="klaviyo_form_actions"><button type="submit" class="klaviyo_submit_button"><span></span></button></div><div class="klaviyo_below_submit"></div><div class="error_message" style="display:none;"></div></form><div class="success_message" style="display:none;"></div></div></div>',
"flyout.html": '<div class="klaviyo_flyout" style="display:none;"><div class="klaviyo_inner"><div class="klaviyo_topbar" /><a href="#" class="klav
@rickydazla
rickydazla / table-highlighting.js
Created July 15, 2016 12:30
Tables highlighting jazz
var SizeTableApp = (function(HighLightLogik, $){
HighLightLogik = {
init:function(){HighLightLogik.prepareActiveSizeTable();},
prepareActiveSizeTable: function() {
$(document).ready(function() {
var tableWrap = $("#table-wrapper");
var u;
var t = 1;
tableWrap.find("table").find("td").mouseover(function() {
var x = $(this).parent();
{% comment %}
Adds the following events:
* ViewContent on all pages
* Dynamic AddToCart on Product pages
* Dynamic InitiateCheckout from Cart page into Checkout
* Purchase on Checkout complete
{% endcomment %}
<!-- Shopify Theme Facebook Pixel Code -->
<script type="text/javascript">
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
@rickydazla
rickydazla / product-grid-item.liquid
Last active December 17, 2017 02:16
Shopify Collection thumbnail:hover image swap
<a href="{{ product.url | within: collection }}">
{% assign imgSize = 'medium' %}
{% assign canSwap = false %}
{% if product.images.size > 1 %}
{% assign canSwap = true %}
{% assign swapImg = product.images[1] %}
{% assign swapImgSrc = swapImg.src | product_img_url: imgSize %}
{% assign swapImgAlt = swapImg.alt | escape %}
{% endif %}
<img{% if canSwap %} class="has-swap"{% endif %} src="{{ product.featured_image.src | product_img_url: imgSize }}" alt="{{ product.featured_image.alt | escape }}">
@rickydazla
rickydazla / shopify-adroll.html
Created January 6, 2016 22:50
AdRoll Pixel for Shopify
<!--
add below and exclude checkout.shopify.com/orders/*
see: https://ecommerce.shopify.com/c/ecommerce-marketing/t/adroll-setup-157948
-->
<script type="text/javascript">
adroll_segments = "online-customers";
var conversion_value = '{{ subtotal_price }}';
conversion_value = conversion_value / 100;
adroll_conversion_value_in_dollars = conversion_value;
adroll_custom_data = {
@rickydazla
rickydazla / ajax-submit-form.js
Created December 10, 2015 03:13
Shopify AJAX Form submit
/* Build the Shopify Parameters
//---------------------------------------*/
var action = '/contact?';
action += encodeURIComponent('form_type') +'='+ encodeURIComponent('contact');
action += '&'+ encodeURIComponent('utf8') +'='+ encodeURIComponent('✓');
action += '&'+ encodeURIComponent('contact[email]') +'='+ encodeURIComponent(contact_email);
action += '&'+ encodeURIComponent('contact[body]') +'='+ encodeURIComponent(contact_body);
/* Submit the form
//---------------------------------------*/