Skip to content

Commit 1127ad3

Browse files
author
Grant Jordan
committed
Added Get Tracking IDs Function
1 parent 3d4f635 commit 1127ad3

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
test.html
1+
*.html

funnelScripts.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const makeCalendlyUrl = (base_url) => {
124124
"null",
125125
utm_content:
126126
Cookies.get("utm_content") ||
127-
getParameterByName("utm_medium") ||
127+
getParameterByName("utm_content") ||
128128
"null",
129129
name:
130130
Cookies.get("name") ||
@@ -183,6 +183,20 @@ const delayedCta = (timeout = 3000) => {
183183
}
184184
};
185185

186+
function getTrackingId(id) {
187+
if (Cookies.get(id)) {
188+
if (
189+
Cookies.get(id) !== null ||
190+
Cookies.get(id) !== "" ||
191+
Cookies.get(id) !== "null"
192+
) {
193+
return Cookies.get(id);
194+
}
195+
} else {
196+
return getParameterByName(id) || "null";
197+
}
198+
}
199+
186200
function docReady(fn) {
187201
if (document.readyState != "loading") {
188202
fn();

0 commit comments

Comments
 (0)