Skip to content

Commit

Permalink
Added Get Tracking IDs Function
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Jordan committed Jun 21, 2022
1 parent 3d4f635 commit 1127ad3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test.html
*.html
16 changes: 15 additions & 1 deletion funnelScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const makeCalendlyUrl = (base_url) => {
"null",
utm_content:
Cookies.get("utm_content") ||
getParameterByName("utm_medium") ||
getParameterByName("utm_content") ||
"null",
name:
Cookies.get("name") ||
Expand Down Expand Up @@ -183,6 +183,20 @@ const delayedCta = (timeout = 3000) => {
}
};

function getTrackingId(id) {
if (Cookies.get(id)) {
if (
Cookies.get(id) !== null ||
Cookies.get(id) !== "" ||
Cookies.get(id) !== "null"
) {
return Cookies.get(id);
}
} else {
return getParameterByName(id) || "null";
}
}

function docReady(fn) {
if (document.readyState != "loading") {
fn();
Expand Down

0 comments on commit 1127ad3

Please sign in to comment.