Skip to content

Instantly share code, notes, and snippets.

View JacobLett's full-sized avatar
🤠
hello!

Jacob Lett JacobLett

🤠
hello!
View GitHub Profile
@JacobLett
JacobLett / gist:95095db7c31d5aea287a0d97ee8b3fc5
Created March 19, 2019 14:29
Remove default stylesheet from hubspot or other
$('link[href*="HubSpot_Default.css"]').remove()
@JacobLett
JacobLett / gist:86be1b4cb21df98a711a2358b6bcbdc6
Last active March 9, 2023 08:46
hubspot custom module boilerplate template
{% set moduleClass = "module-boilerplate" %}
<!--
{{ moduleClass }}
2020 created by Jacob Lett
docs:
https://www.dropbox.com/sh/d6ds1bptov4ou1x/AADRGt1-8UecJbff9BAj2EJta/Developers/CustomModulesV2%20_CMS.pdf?dl=0
https://designers.hubspot.com/blog/developer-day-2018-videos
https://designers.hubspot.com/docs/hubl/if-statements
https://designers.hubspot.com/docs/hubl/tags
@JacobLett
JacobLett / gist:a62a9bc4c644c31f9f99190d29abc02e
Created March 11, 2019 18:05
HubSpot Form Conversion Tracking - Google Analytics Event Script
######## Add to HEAD
<!-- Global site tag (gtag.js) - Google Ads: 802890537 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-802890537"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-ID');
@JacobLett
JacobLett / if else conditional
Last active March 6, 2019 08:51
html email responsive images
<!--[if (gte mso 9)|(IE)]>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td valign="top" width="260">
<![endif]-->
<p><a href="#"><span style="color: #666666;"> <img src="#" alt="#" style="width: 100%; max-width: 600px; display: block; border: 0px; margin-bottom: 5px;" border="0"> </span></a></p>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
@JacobLett
JacobLett / gist:ae0c8157eef56873e8e9bded0a723143
Created February 27, 2019 20:35
google analytics event on button click
<script>
$( document ).ready(function() {
$('.button').click(function() {
var URL = window.location.href;
gtag('event', URL, {
'event_category': 'button click',
'event_label': $(this).attr('href')
});
(function ensightenInit() {
var ensightenOptions = {
client: "altair",
clientId: 2538,
publishPath: "prod",
isPublic: 1,
serverComponentLocation: "nexus.ensighten.com/altair/prod/serverComponent.php",
staticJavascriptPath: "nexus.ensighten.com/altair/prod/code/",
ns: 'Bootstrapper',
nexus: "nexus.ensighten.com",
<?php
if($_POST["submit"]) {
$toEmail=$_POST["toEmail"];
$fromEmail=$_POST["fromEmail"];
$subject=$_POST["subject"];
$message=$_POST["message"];
$mailBody="From: $fromEmail\nTo: $toEmail\n\n$message";
mail($toEmail, $subject, $mailBody, "From: $fromEmail <$fromEmail>");
@JacobLett
JacobLett / drag and drop modules
Last active November 12, 2020 09:48
hubspot boolean hide content
// https://developers.hubspot.com/docs/cms/building-blocks/modules/export-to-template-context
<!-- drag and drop module - start hide boolean hide condition -->
{% boolean "show_sharing_buttons" label='Show Sharing Buttons?', value=True, export_to_template_context=True %}
{% if widget_data.show_sharing_buttons.value %}
<div class="footer__sharing-buttons"></div>
{% module "sharing_buttons" path="/industrial-theme-pro/modules/blog-svg-sharing-buttons", label="Sharing Buttons" %}
</div>
{% endif %}
.active
.affix
.alert
.alert-danger
.alert-dismissable
.alert-dismissible
.alert-info
.alert-link
.alert-success
.alert-warning
@JacobLett
JacobLett / gist:331c8e5ee9f82071fc7f623fc9b84ae7
Created November 15, 2018 21:52
ensighten error script
(function anon(){ var histArr = (!!window.gateway && !!window.gateway.history)?gateway.history.complete:(!!Bootstrapper.gateway && !!Bootstrapper.gateway.history)?Bootstrapper.gateway.history.complete:[]; if(histArr.length<1){console.log("Could not locate history array");return;} console.log('Privacy History Not Loaded Content:'); for(var x in histArr){ if(histArr[x].request.status !== "load") console.log(histArr[x].request.destination+"|status:"+histArr[x].request.status); } })()