Skip to content

appengine/analytics got error #771

@jontore

Description

@jontore

There is minor bug in the analytics example that stops the request to be posted correctly.

According to the got documentation https://www.npmjs.com/package/got#form, form is a boolean and the formdata should be added as the body property.

that means that https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/analytics/app.js#L50
should be

   return got.post('http://www.google-analytics.com/collect', {
    form: true,
    body: data,
   });

not

  return got.post('http://www.google-analytics.com/collect', {
    form: data
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions