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

Non-Browser / React Native / Node / Universal / Isomorphic Support #164

Closed
blazzy opened this issue Nov 13, 2018 · 15 comments
Closed

Non-Browser / React Native / Node / Universal / Isomorphic Support #164

blazzy opened this issue Nov 13, 2018 · 15 comments

Comments

@blazzy
Copy link
Contributor

blazzy commented Nov 13, 2018

The JavaScript SDK currently assumes its running in a browser environment and depends on all kinds browser APIs related to cookies, localStorage, the presence of a global window object and so on.

Ideally the SDK would support server side instrumentation in an environment like node.js. This would also make server side rendering of isomorphic/universal apps easier to pull of with amplitude instrumentation. And presumably this would enable us to use the JavaScript SDK in React Native apps.

Tying all these feature requests together into this one issue here. It's not actively being worked on just yet, but we definitely want to tackle it.

(PS: We're hiring in case you want to help us take this on. 😉See product engineer)

@tkazec
Copy link

tkazec commented Nov 30, 2018

See also #123.

@mding5692
Copy link

mding5692 commented Aug 26, 2019

Is there any fallbacks for now, some quick hack to be able to implement it with server-side react?

Nevermind: used this #110 for now

@Vadorequest
Copy link

Very much need this. It's been asked since 2017 (#110), maybe time to tackle this issue?

I suggest an official example with Next.js framework (universal framework), definitely the most used out there.

@jakebenn
Copy link

+1. I'm having the same problem (with Node / NextJS) and looking for the same solution (i.e. server-side JavaScript support).

@Elyx0
Copy link

Elyx0 commented Nov 15, 2019

We totally need server side support, https://github.com/crookedneighbor/amplitude is too much behind

@fwouts
Copy link

fwouts commented Jan 20, 2020

Hello from 2020! Are there plans to make this happen relatively soon?

@haoliu-amp
Copy link
Contributor

Just wanna let all of you know that we're not forgetting any of the issues from our customers. This year, we definitely will provide better support for all of our the SDKs.

@nicolasgarnil
Copy link

Is there a workaround to use the js SDK with server-side rendering?

@haoliu-amp
Copy link
Contributor

haoliu-amp commented Feb 11, 2020

Hey all, could you let me know which platform you wanna have support first for server side SDK?
Python?
Node?
Java?
Please leave your comments here, much appreciated!

@tkazec
Copy link

tkazec commented Feb 11, 2020

@haoliu-amp This issue is about server-side JavaScript, so I would guess everyone's answer is Node.

@ghost
Copy link

ghost commented Feb 12, 2020

For us having the SDK usable in Electron's main process would be really useful.

@haoliu-amp
Copy link
Contributor

@k4113h First time hearing this, what kind of library dependency it uses?

@ghost
Copy link

ghost commented Feb 13, 2020

@k4113h First time hearing this, what kind of library dependency it uses?

I'm not sure I fully understood what you're asking, but in an Electron app you have all the Node.js APIs available. In the Electron renderer process you have also the browser APis available, so this SDK works there, but code running in Electron main process can't use it currently.

@haoliu-amp
Copy link
Contributor

We started developing our Node.js SDK. Now it's under BETA. Feel free to try it and request what you want by creating issues.

https://github.com/amplitude/Amplitude-Node

I am also closing this ticket too.

@stas-karmanov
Copy link

Hello @haoliu-amp. Separate SDK for node.js doesn't solve the issue with server side rendering. It's still necessary.

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

10 participants