Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
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": {
"GA4_MEASUREMENT_ID": "G-ROLANDF",
"GA4_ENDPOINT_HOSTNAME": "www.google-analytics.com",
"DEFAULT_PAGEVIEW_ENABLED": true,
"GOOGLE_CONSENT_ENABLED": false,
"WEBVITALS_TRACKING": false,
"PERFORMANCE_TIMING_TRACKING": false
@rolandfarkasCOM
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
.location
@rolandfarkasCOM
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 PHP.md

##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
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!