Home » Javascript » Javascript/jQuery Contractor

Javascript/jQuery Contractor

Date Posted —

Type of Work:
Gig
Salary:
N/A
Hours per Week:
0

Job Description

1. We want someone to who can use GTM and Javascript/JQuery.
2. This is NOT a FULL TIME job. This is a gig or project-based work.
3. Please answer the question for you to be considered and send it together with your resume.
4. Please send your CV and answers at (Subject: Javascript/jQuery Contractor)
5. State your rate per hour for part time/project-based job

Good Luck!

Situation :

Step 1 – add in a Divi Form listener that fires on successful completion of the form (without errors).
/documentation/developers/divi-module-hooks/
Step 2 – Variables we can add to GTM to capture the form fields in a scalable way (Not limited to field number but looks for name or email fields for example).

Something like this:

jQuery(document).ready(function () {
/** Gravity Forms Confirmation Fire **/

  jQuery(document).bind(“gform_confirmation_loaded”, function (event, formId) {
    ({
({
      event: “pathfinder-marketing-gf”,
      EventCategory: “form”,
      EventAction: “gravity-forms”,
      EventLabel: {{Forms | Lookup | GF | Form ID to Names}},
      gfformID: formId,
    });
  });

  /** Gravity Forms Collect Form Fields **/

  jQuery(“.gform_body”)
  .parent(“form”)
  .on(“submit”, function (e) {
    var eventName = “pathfinder-marketing-submit-gf”;
    var target = ;
    var formId = jQuery(target).attr(“id”).replace(“gform_”, “”);
    var data = {
      event: eventName,
      EventAction: “submit”,
      EventCategory: “form”,
      gfformId: parseInt(formId),
      values: {},
    };

    var regexCapitalize = /(\ba-z)/g;
    var inputs = jQuery(target).find(“input”);
    (inputs, jQuery(target).find(“select”));
    (inputs, jQuery(target).find(“textarea”));

    for (var i = 0; i < ; i++) {       var obj = jQuery(inputs[i]);       var id = (“id”);       var type = (“type”);       var name = (“placeholder”);       var val = ();       var tag = (“tagName”);       if (!(“:visible”)) continue;       if ((type == “checkbox” || type == “radio”) && !(“:checked”))         continue;       if (type == “submit” || type == “hidden”) continue;       if (!name && (type == “checkbox” || type == “radio”)) {         id = (/^choice_/, “”).replace(/\d$/, “”);         name = jQuery(“#field” + id + ” .gfield_label”).text();       }       if (!name && tag == “SELECT” && val) {         name = (“_placeholder”).text();         name = (regexCapitalize, function (x) {           return ();         });       }       if (!name) continue;       if (val) {         name = (/\W/g, “”);         if (type == “checkbox”) {           [name] = [name] || [];           if ([name].indexOf(val) < 0) [name].push(val);         } else {           [name] = val;         }       }     }     var dataLayer = || [];     var found = false;     for (var j = 0; j < ; j++) {       if (dataLayer[j].event == eventName) {         found = true;         dataLayer[j] = data;         break;       }     }     if (!found) (data);     = dataLayer;   });   });

APPLY FOR THIS JOB:

Company: DLRX Ventures
Name: David Toby
Email:

Skills