Skip to content

Instantly share code, notes, and snippets.

Hey! Want to work together? Get in touch!

Roland Farkas rolandfarkasCOM

Hey! Want to work together? Get in touch!
View GitHub Profile
View ga4.json
"cookies": {
"_ga": {
"value": "$IF(LINKER_PARAM(_gl, _ga),GA1.0.LINKER_PARAM(_gl, _ga),)"
"linkers": {
"_gl": {
"enabled": true,
"ids": {
View AMP Analytics GA4 Tag
<amp-analytics type="googleanalytics" config="/ga4.json" data-credentials="include">
<script type="application/json">
"vars": {
rolandfarkasCOM / typeformparams.js
Created Mar 1, 2022
JS - Typeform - Pass UTM & Click ID (Google, Facebook, Microsoft) to Iframe
View typeformparams.js
!function (window, document, undefined) {
document.addEventListener('DOMContentLoaded', function() {
var urlParams;
var parser = document.createElement('a');
var pattern = /utm_|gclid|fbclid|msclkid/i;
parser.href = window.location.href.replace('%20#', '?').toLowerCase();
if (pattern.test(parser.href)) { // url contains utms
var utms = window
rolandfarkasCOM / amp-responsive-image-preload-link-srcset-opt-in.php Enable preload links for responsive hero images which have srcset and sizes attributes. This is disabled by default because only Chrome supports imagesrcset and imagesizes on preload links. This eliminates the Optimizer from raising this notice: CannotPreloadImage: Not preloading the hero image because of the presence of a srcset attribute…
View amp-responsive-image-preload-link-srcset-opt-in.php
View Install Composer to use MAMP's

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

rolandfarkasCOM / Freelance
Created Apr 2, 2021
Freelance Demo Asset
View Freelance
👋 Hi, I’m a freelance developer
👀 I’m interested in open source, php, amp, nginx, secuirty and pretty much everything digital!
🌱 I never stop learning!
💞️ I’m looking to collaborate on open source projects!