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

Update Segment's loading snippet #240

Merged
merged 2 commits into from
May 1, 2020
Merged

Update Segment's loading snippet #240

merged 2 commits into from
May 1, 2020

Conversation

dcyriller
Copy link
Collaborator

@dcyriller dcyriller commented Apr 29, 2020

Description

With this PR, I propose to upgrade Segment's loading snippet (and only the snippet, not the library itself).

The currently loading snippet is taken from an old version of Segment's documentation. I took this one from more recent Segment documentation. This small snippet is versioned. The proposed changes upgrade it from 2.0.9 to 4.1.0.

To ease the review, I have prettyfied the snippet in a first commit. So that you can review - if you'd like - the snippet itself by comparing the first and the second commit.

Note that I have been using it in production for roughly two years (on a fork that I'm trying to remove 😄).

Why

The main change to this snippet is that Segment library will support two new methods: reset and debug.

It loads the same library than before from http://cdn.segment.com/analytics.js/v1/${segmentKey}/analytics.min.js.

I ran `prettier --write segment-snippet`
I took it from more recent Segment documentation. This small snippet is
versioned. These changes upgrade it from 2.0.9 to 4.1.0
@poteto
Copy link
Collaborator

poteto commented Apr 30, 2020

@dcyriller Thanks for this Cyrille! I added you as a collaborator. Once you merge this, LMK and I'll add you on npm as well so you can publish :)

@dcyriller dcyriller merged commit 06b3a87 into adopted-ember-addons:master May 1, 2020
@dcyriller dcyriller deleted the segment-upgrade branch May 1, 2020 20:52
@dcyriller
Copy link
Collaborator Author

Thank you Lauren! :)
I'll try to cut a release next week.

@dcyriller
Copy link
Collaborator Author

@poteto I'm ready to release!

I'm thinking of using lerna-changelog to generate a Changelog. I could configure it if you agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants