Skip to content

Instantly share code, notes, and snippets.

View zackphilipps's full-sized avatar
🤘

Zack Philipps zackphilipps

🤘
View GitHub Profile
// Pass Tracking Parameters to a Form on Another Page Using GTM
// https://zackphilipps.dev/posts/store-gclid-cookie-send-to-hubspot/
/**
* Assigns the supplied URL parameter to a cookie and each form field with a name that matches.
* You can keep calling this function multiple times for each URL parameter you want to pass along, e.g.
*
* window.onload = function () {
* assignTrackingParameterToCookie("gclid", "hubspot");
* assignTrackingParameterToCookie("utm_source", "gform");
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->