Skip to content

Instantly share code, notes, and snippets.

View fabriziofeitosa's full-sized avatar
🏠
Working from home

Fabrizio Feitosa fabriziofeitosa

🏠
Working from home
View GitHub Profile
@robertainslie
robertainslie / submit-to-hubspot-forms-api-with-javascript.md
Last active April 9, 2024 02:02
Submitting to the HubSpot Forms API with JavaScript

Overview

This tutorial will walk you through how to submit to the HubSpot Forms API using Javascript. Check out the documentation for submitting to the Forms API.

  • It will use vanilla JS (i.e. no libraries or frameworks) and will provide example code.
  • It will assume that you are familiar with HubSpot, HubSpot Forms, and that the HubSpot Tracking Code is on the page.

A note on the HubSpot cookie: hubspotutk

The HubSpot tracking code is a javascript snippet that is placed on websites. It anonymously collects website visit data, similar to Google Analytics. This anonymous visit data can be associated to HubSpot Contact record through a few means, including sending a usertoken value when submitting data to the Forms API. The tracking code generates a cookie containing a unique usertoken called hubspotutk. The value of hubspotutk will be submitted in our form submission as hutk. HubSpot uses this cookie value to connect visito

@wpsmith
wpsmith / font-mimetypes
Last active April 25, 2024 00:44 — forked from localpcguy/font-mimetypes
Mime Types for .htaccess or web.config
.eot - application/vnd.ms-fontobject
.woff - application/font-woff
.ttf - application/x-font-truetype
.svg - image/svg+xml
.otf - application/x-font-opentype
IIS (Web.Config)
<remove fileExtension=".eot" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<remove fileExtension=".ttf" />