Closed

Simple Javascript Help

Hello,

I require some help with merging 2 js scripts to make them fire together.

Logic:

The first script is an analytics script and it fires on page load(no change required). The Second script and associated html/css needs to be packaged in a way that it fires when scroll depth is 75%. Once the survey is submitted. The Data collected on survey form then need to updated on keen tag (elements below).

First Script

<scrXXX crossorigin src="[login to view URL]@4"></scrXXX>

<scrXXX>

client = new KeenTracking({

projectId: 'XXXXXXXXXXXXXX',

writeKey: 'XXXXXXXXXXXXX'

});

[login to view URL](function(){

return {

app: {

version: '4.1.5'

},

user: {

age: [login to view URL]([login to view URL]() * (70 - 15 + 1)) + 15,

gender: ([login to view URL]() >= 0.5 ? "Male" : "Female")

}

/* Custom properties for all events */

};

});

[login to view URL]('pageviews', function(){

return {

page: {

brief_id: [login to view URL]([login to view URL]()*10) + 1000,

article_name: [login to view URL]([login to view URL]()*3) + 1

/*ADD SURVEY FIELDS HERE*/

}

/* Custom properties for pageviews event */

};

});

[login to view URL]();

</scXXXX>

------------------------------------------------------------------------------------------

Second tag SURVEY

<!-- Your platform (jquery) scripts. -->

<scXXX src="[login to view URL]"></scXXX>

---

<div id="surveyContainer"></div>

---

[login to view URL] = "bootstrap";

var surveyJSON = {title:"Fabulate Survey",pages:[{name:"page1",elements:[{type:"rating",name:"question1",title:"How likely are to to BUY?"},{type:"rating",name:"question2",title:"How Likely are you to SHARE"},{type:"radiogroup",name:"question3",title:"Gender",choices:[{value:"item1",text:"Female"},{value:"item2",text:"Male"}]},{type:"dropdown",name:"question5",title:"Age?",choices:[{value:"item1",text:"18-25"},{value:"item2",text:"26-35"},{value:"item3",text:"36-50"},{value:"item4",text:"50 and above"}]}]}]}

function sendDataToServer(survey) {

[login to view URL]('68937f24-98ed-40c0-b820-1d01902aa6ff');

}

var survey = new [login to view URL](surveyJSON);

$("#surveyContainer").SurveyWindow({

model: survey,

onComplete: sendDataToServer

});

Skills: CSS, HTML, HTML5, Javascript

See more: learn javascript, javascript tutorial pdf, javascript examples, javascript tutorial, javascript tutorial for programmers, javascript editor, w3schools, javascript function, simple javascript sort, simple javascript game kids, simple javascript encrypt, simple javascript image gallery, simple javascript overlay, simple javascript color picker, simple javascript time, simple javascript redirect, javascript calculate html fields, simple javascript portfolio engine, simple javascript mp3 players, free simple javascript mp3 player button

About the Employer:
( 0 reviews ) Germany

Project ID: #19484101

26 freelancers are bidding on average €16/hour for this job

Yknox

Dear, I am Jin S, WEB developer in China. I've just read your job posting and I’m very interested. I'm a certificated freelancer with almost 1000 good reviews from clients. I have experienced knowledge in every par More

€16 EUR / hour
(149 Reviews)
8.0
Harvey888

Hi there. Nice to meet you. I'm a Javascript expert and FULL Time Developer. I have checked your requirements carefully. I have rich experience in Javascript, PHP, Html, CSS, JS UI design, etc. I can start work i More

€16 EUR / hour
(240 Reviews)
7.6
anatolygenay123

Nice to meet you. http://3.95.189.6:8080/#/dashboard [login to view URL] I've used (vuex, vue-router, vue-material etc) I can show your my code also. Before start working you can test me also about my vue.js ski More

€16 EUR / hour
(39 Reviews)
6.7
semshehovtsov4

Hi, I'm professional .NET web developer, eleven years of experience. I have solid experience with NodeJs, JavaScript, LESS, CSS3, HTML5, jQuery, CoffeeScript, TypeScript, ExtJS, Backbone, AngularJS, AJAX, Amazon s3 se More

€16 EUR / hour
(2 Reviews)
6.6
petermyvw

You can rely on my JavaScript experience to accomplish this "merging of 2 scripts" task for you. Should you decide to award the project to me, I believe you need to rephrase this part as it has punctuation usage whi More

€16 EUR / hour
(100 Reviews)
6.8
yuriyes43

Dear, sir I've read your specification carefully and I'm very interested in your job. I have rich experience of developing web projects for 5 years using PHP and JS. I ensure high quality and deadline. I would like to More

€19 EUR / hour
(77 Reviews)
6.7
krishaweb

Hello, Hope you are doing well! We at KrishaWeb are most preferred agency for our client due to 100% recommendation and “5 STAR” rating from our clients which we achieve through an excellent client support as well as More

€15 EUR / hour
(13 Reviews)
5.6
schoudhary1553

Hello, I have gone through your job posting and become very much interested to work with you. I am an expert in this field. I have already completed several projects like this. For evidence you can see my profile. Pl More

€18 EUR / hour
(25 Reviews)
5.4
WebExpertAnton

Hello! Didn't you solve this problem yet? I saw this same job a few days ago, but at that time I was so busy. If you hire me, I can do this within 2 hours. I'd like to hear from you. Kind regards. Iaroslav

€20 EUR / hour
(23 Reviews)
5.3
solexy

Hello, I'm ready to start immediately and I can done project fast, I have big experience for it (14 years). I have experience with to CSS, HTML, HTML5, Javascript. My hourly rate is 20$

€16 EUR / hour
(5 Reviews)
4.5
DesignPerfecti0n

Hi sir! Contact with me then I can show you my portfolio. I am interested to work with you. I can provide you professional graphic/web design and Illustrator services. I can design for you according to your requiremen More

€12 EUR / hour
(35 Reviews)
4.9
johnjordancsc

I’m an experienced programmer in PHP and have multiple years of experience in Frameworks such as FuelPHP, Zend Framework, CodeIgniter and Laravel, I’m also experienced in front end technologies such as jQuery and Javas More

€17 EUR / hour
(4 Reviews)
4.3
chiragsavaliya57

Hello, This is Chirag Savaliya your developer with 4+ years of experience with web development, mobile development, and scripting based technologies. I have good experience with Java, JavaScript, React.js, AngularJS, More

€15 EUR / hour
(9 Reviews)
3.7
BestService222

Hi there. I am very interested in your proposal. I can instantly help you with your starting project with a successful completion. As a professional developer, I ensure for a perfect ongoing project. I am sure that More

€16 EUR / hour
(4 Reviews)
3.8
cyberloh

hello, i'm a highly experienced javascript developer and can help you with your scripts merging. just let me know if you're interested. thanks.

€22 EUR / hour
(3 Reviews)
3.8
limillion819

Hi there. I got really excited with your project and I can say that really matches to my skills. Along as my worth experience of javascript, I can help and support you 100% bringing fully satisfactory result. I assure More

€30 EUR / hour
(2 Reviews)
3.5
avto35217

Hi,sir. I am super interested in your project - 'Simple Javascript Help' :) I believe that my 12+ years of experience in development makes me highly qualified for this project. I'm sure that I would be an asset to this More

€16 EUR / hour
(3 Reviews)
3.5
star314

Hi,Dear I read your project . I am an expert in web design and web development. i have ever been similar project with your project We have a team of web developers who have designed and developed many websites for o More

€12 EUR / hour
(6 Reviews)
3.0
prerak121

Hi , Hope you are doing well. I am excited to work on this project.I read a description and i will complete the project in 1 day. I am web developer and having 3 years of experience.  Expert: 1. Wordpress , PHP, C# More

€12 EUR / hour
(10 Reviews)
2.9
DianaBorisov

Hi Dear I read your job carefully and understand your requirement well. I am a web , android and ios expert. I have full experienced on IT projects with MEAN/Full Stack for 8 years. I have been developed many web ap More

€12 EUR / hour
(6 Reviews)
2.9