Skip to content

Instantly share code, notes, and snippets.

@burtyish
burtyish / custom variable.js
Last active June 25, 2019 14:05
GTM: override oauth referrals
/*
Based on:
- https://www.simoahava.com/gtm-tips/implement-referral-exclusions-via-gtm/
- https://medium.com/@postman31/dont-let-oauth-fools-your-analytics-88d56523f6b1
- https://www.thyngster.com/tip-maintaining-proper-session-attribution-in-ga-when-using-oauth-providers-with-google-tag-manager/
*/
function() {
/* When the user goes thru oauth, the referrer is FB so the session is restarted
See: https://medium.com/@postman31/dont-let-oauth-fools-your-analytics-88d56523f6b1
@burtyish
burtyish / custom.html
Last active July 29, 2019 06:01
Webflow custom code
<!-- remodal -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/remodal/1.1.0/remodal.min.js"></script>
<!-- remodal - youtube API -->
<script>
var tag = document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName("script")[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// 3. This function creates an <iframe> (and YouTube player)