Skip to content

Commit

Permalink
Updated makeCalendly URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Jordan committed Jun 21, 2022
1 parent 1127ad3 commit addb9b6
Showing 1 changed file with 16 additions and 25 deletions.
41 changes: 16 additions & 25 deletions funnelScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,32 +109,23 @@ const makeCalendlyUrl = (base_url) => {
try {
$(function () {
if ($("#iframe-inject-cal").length) {

let name = getTrackingId('name');
if (name === "null") {
name = getTrackingId('fullname');
}
let email = getTrackingId('email');
if (email === 'null') {
email = '';
}

let linkInject = {
utm_source:
Cookies.get("utm_source") ||
getParameterByName("utm_source") ||
"null",
utm_medium:
Cookies.get("utm_medium") ||
getParameterByName("utm_medium") ||
"null",
utm_campaign:
Cookies.get("utm_campaign") ||
getParameterByName("utm_medium") ||
"null",
utm_content:
Cookies.get("utm_content") ||
getParameterByName("utm_content") ||
"null",
name:
Cookies.get("name") ||
getParameterByName("name") ||
getParameterByName("fullname") ||
"",
email:
Cookies.get("email") ||
getParameterByName("email") ||
"",
utm_source: getTrackingId('utm_source'),
utm_medium: getTrackingId('utm_medium'),
utm_campaign: getTrackingId('utm_campaign'),
utm_content: getTrackingId('utm_content'),
name: name,
email: email
};

for (const key in linkInject) {
Expand Down

0 comments on commit addb9b6

Please sign in to comment.