This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="form_[FORM_ID]">Loading...</div> | |
| <script> | |
| (function(l,o,a,d,e,r){ | |
| var formId = "[FORM_ID]"; | |
| e=o.createElement(a);e.onload=d(formId); | |
| e.src="https://[SLATE_HOST]/register/?id=" + formId + "&div=form_" + formId + "&output=embed"; | |
| r=o.getElementsByTagName(a)[0];r.parentNode.insertBefore(e,r); | |
| })(window, document, 'script', function(formId) { | |
| const targetNode = document.querySelector(`#form_${formId}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const parseGa4SessionId = (str) => { | |
| let value; | |
| const parts = str.split('.'); | |
| const parser = { | |
| v1: (str) => { | |
| let parsed = {}; | |
| const data = str.split('.').slice(2); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| goToFolder() { | |
| local primary_directory="Sites" | |
| # Default base - change to whatever default folder you want to use inside the primary_directory | |
| local base="Level" | |
| local client="" | |
| # Check if argument contains a slash | |
| if [[ "$1" == */* ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| /** | |
| * Start Custom HubSpot form CSS | |
| */ | |
| [data-hs-forms-root] { | |
| --form-col-gap: 0.75rem; | |
| --form-row-gap: 1rem; | |
| --form-input-padding-y: 0.75rem; | |
| --form-input-padding-x: 1rem; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :root { | |
| --font-import-uri: 'https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:ital,wght@0,400..900;1,400..900&display=swap'; | |
| --font-family: 'Schibsted Grotesk', sans-serif; | |
| --lvl-pacing-green: #d9ead3; | |
| --lvl-pacing-purple: #d9d2e9; | |
| --lvl-pacing-yellow: #fff2cc; | |
| } | |
| @import url(var(--font-import-uri)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * HubSpot Embedded Form Accessibility Pollyfills | |
| * | |
| * This script fixes the HubSpot HTML blunders that make their embedded forms inaccessible for assistive technology. | |
| * - Replaces/removes improper use of <fieldset>, <legend>, <label>, and role attributes. | |
| * - Note - this can cause forms configured for mulitple column field layouts to break - you will need to adjust your CSS accordingly. | |
| **/ | |
| hubspotFormA11y = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * You'll want to add this to GTM using an "All Pages" trigger - | |
| * Note - make sure you set it to only fire "once per-page" to prevent issues with re-registering the listener on SPAs | |
| **/ | |
| window.addEventListener('message', function(message){ | |
| if (message.origin != 'https://play.hubspotvideo.com') return; | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| if ( window.parent.postMessage ) { | |
| window.parent.postMessage({ | |
| 'event': 'Form Submission', // Never change this | |
| 'form_id': '1234', // The Pardot form ID (you can get this from the form edit page URL) | |
| 'form_label': '[Whitepaper] - The 2020 State of Digital Accessibility', // This can really be whatever you want.. but make sure its descriptive | |
| 'form_action': 'Gated Resource Download' // See suggested Form Actions | |
| }, '*'); | |
| } | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| (function() { | |
| var dataArrayToObject = function(data) { | |
| var fields = {}; | |
| for ( var i = 0; i < data.length; i++ ) { | |
| fields[data[i].name] = data[i].value; | |
| } |
NewerOlder