balena-io-modules / analytics-client

Client part of analytics services used at balena
5 stars 0 forks source link

Created new declareClient function un url-params #48

Closed laziob closed 3 years ago

laziob commented 3 years ago

This new function expects a a client to be passed, and sets this client on the AnalyticsUrlParams class for it to be used on functions such as getSessionId, getQueryString and so on.

Without it, those functions wont work with the new way to init the analytics client.

Change-type: Minor Signed-off-by: Ezequiel Boehler ezequiel@balena.io

laziob commented 3 years ago

@gelbal Right, I wanted to avoid rewriting cookies and going through all that code again since there was no purpose for it. When possible please take a look at the new approach for setClient(). I left come of the code commented with my observations as to why, but basically, there was some redundancy on its tasks due to how we handle deviceIds since the last change and I couldnt think of a case where that was needed now.

laziob commented 3 years ago

For some reason, after I merge master into this branch, squash that merge commit to the older one and push, it asks me again to merge master into this branch :S . Aside from that I think the rest of the commits were all properly squashed.

laziob commented 3 years ago

@balena-ci rebase