Skip to content

Instantly share code, notes, and snippets.


VA79 vanaf1979

View GitHub Profile
View swap-text-colors-with-variables.html
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Using css variables to change color in a specific section</title>
<link rel="stylesheet" href="./styles.css">
View align-lists-lsp.css
ul {
padding-left: 0;
list-style-position: inside;
View align-lists-background.css
ul {
padding-left: 0;
background-color: lightblue;
View ga-cf7-submit.js
document.addEventListener( 'wpcf7mailsent', function( event ) {
var form = 'input[name="_wpcf7"]' ).getAttribute("value");
if( parseInt( form ) == 4839 ) {
gtag('event', 'form_submit', {
event_category: 'Forms',
event_action: 'Submit',
View ga-send-email-link-click.js
View ga-send-phone-link-click.js
View ga-send-form-submit.js
const form = document.getElementById('my_form');
form.addEventListener('submit', function(event){
gtag('event', 'form_submit', {
event_category: 'Forms',
event_action: 'Submit',
event_label: 'Test form' // Name of your form.
View ga-send-page-view.js
gtag('event', 'page_view', {
page_title: 'Page title',
page_location: location.href,
page_path: location.pathname