Skip to content

Instantly share code, notes, and snippets.

View lucasjahn's full-sized avatar
🏠
Working from home

Lucas Jahn lucasjahn

🏠
Working from home
View GitHub Profile
@lucasjahn
lucasjahn / .htaccess
Created February 25, 2016 07:45 — forked from seoagentur-hamburg/.htaccess
Die optimale .htaccess-Datei für mehr Speed und Sicherheit
# ----------------------------------------------------------------------
# | Komprimierung und Caching |
# ----------------------------------------------------------------------
# Serve resources with far-future expires headers.
#
# (!) If you don't control versioning with filename-based
# cache busting, you should consider lowering the cache times
# to something like one week.
#
@lucasjahn
lucasjahn / gtm-maps-initeraction-tracking.js
Created November 28, 2019 00:01
Google Tag Manager (GTM) - Google Maps Interaction Tracking
(function () {
/**
* sends a custom event with a given type to google analytics
*
* @param {String} type - type of the event to send
*/
function sendMapEvent(type) {
if(!readCookie('googleMapInteracted')) {
dataLayer.push({
'event': 'googlemaps',
@lucasjahn
lucasjahn / functions.php
Last active March 9, 2024 11:30
Woocommerce Checkout - Display custom inline error messages (including custom validation messages)
<?php
/**
* adds custom js file to handle inline error messages
*/
add_action( 'woocommerce_after_checkout_form', 'add_custom_validation_script', 20 );
function add_custom_validation_script() {
wp_enqueue_script(