Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appengine/analytics got error #771

Closed
jontore opened this issue Oct 17, 2018 · 1 comment
Closed

appengine/analytics got error #771

jontore opened this issue Oct 17, 2018 · 1 comment

Comments

@jontore
Copy link

jontore commented Oct 17, 2018

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
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants