Google App Script jQuery ajax request failed


I create a Google App Script to save form data in a spreadsheet. But I have some issues with communication between my jQuery script and Google App Script (MIME, CORS etc…)

It’s my Google App script:

function doGet(e) {
  var ss = SpreadsheetApp.openById("xxxxxxxxxxxxx");

  var SheetResponses = ss.getSheetByName("Responses");

  // Create a 'Responses' sheet if it does not exist.
    SheetResponses = ss.insertSheet("Responses");

  SheetResponses.appendRow([new Date(),e.parameter.firstname, e.parameter.lastname,,]);
  return ContentService.createTextOutput(e.parameter).setMimeType(ContentService.MimeType.JAVASCRIPT);

And my jQuery request:

        method: "GET",
        contentType: "application/javascript",
        crossDomain: true,
        dataType: "jsonp",
        url: "",
        data: { lastname: lastname, firstname: firstname, email: email, company: company }
.done(function(received) {
.fail(function(received) {
        console.log('fail ',received);

The issue returned is it:

Uncaught SyntaxError: Unexpected identifier



also Consider changing .done to success:function(response) to make sure that the ajax call was successful.
@AliSheikhpour Thanks, you are right, but with my issue, it’s the fail method called.
– tibeoh
4 hours ago
Are you sure the url is or ?
@AliSheikhpour Yes I’m sure, I did Publish menu > Deploy as a web app… And URL is OK.
– tibeoh
4 hours ago